fix(policy): allow real sandbox clients in docker preset (Fixes #1406)#1434
fix(policy): allow real sandbox clients in docker preset (Fixes #1406)#1434deepujain wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
Fixes NVIDIA#1406 Signed-off-by: Deepak Jain <deepujain@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughReplaced the Docker preset's single binary allowlist entry Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/policies.test.js`:
- Around line 515-522: The test "docker preset targets clients that exist inside
the sandbox" is missing an assertion for the fourth binary path; update the test
(in the it block calling policies.loadPreset("docker")) to include an expect
that content.includes("/usr/local/bin/curl") is true so all four allowed docker
preset binaries are validated by the test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9f607f9a-7e7e-44b3-a156-f84fa7b93c1a
📒 Files selected for processing (2)
nemoclaw-blueprint/policies/presets/docker.yamltest/policies.test.js
|
✨ Thanks for submitting this fix, which proposes a way to make the Docker policy preset usable by allowing real sandbox clients like Node and curl. This addresses a key usability issue and adds helpful regression coverage. Possibly related open issues: |
Fixes NVIDIA#1406 Signed-off-by: Deepak Jain <deepujain@gmail.com>
|
Added the missing |
Summary
Fixes #1406.
The
dockerpolicy preset only allowed/usr/bin/docker, but the sandbox image does not ship a Docker CLI there. That made the preset effectively unusable because no real sandbox client could match the binary filter and reach Docker Hub ornvcr.io.Changes
nemoclaw-blueprint/policies/presets/docker.yamlto allow the clients that actually exist in the sandbox image:/usr/local/bin/node*,/usr/bin/node*)/usr/local/bin/curl*,/usr/bin/curl*)test/policies.test.jsto make sure the preset no longer points at/usr/bin/dockerand still includes all four real sandbox client paths.Testing
npm run build:clinpm test -- test/policies.test.jsEvidence it works
test/policies.test.jspasses with the updated preset and confirms the Docker policy now targets binaries that exist in the sandbox image.npm testsuite in this worktree. The Docker preset change did not introduce any policy-test regressions, but the broader suite still hit unrelated existing failures in:test/security-c2-dockerfile-injection.test.jssrc/lib/preflight.test.tstest/install-preflight.test.jsSigned-off-by: Deepak Jain deepujain@gmail.com
Summary by CodeRabbit
Configuration Updates
Tests