diff --git a/.agents/skills/nemoclaw-user-manage-policy/SKILL.md b/.agents/skills/nemoclaw-user-manage-policy/SKILL.md index 15cca8fb7b1..cd5e3ab15ca 100644 --- a/.agents/skills/nemoclaw-user-manage-policy/SKILL.md +++ b/.agents/skills/nemoclaw-user-manage-policy/SKILL.md @@ -8,6 +8,10 @@ description: "Reviews and approves blocked agent network requests in the TUI. Us # Approve or Deny NemoClaw Agent Network Requests +## Gotchas + +- Custom preset hosts bypass NemoClaw's review process and can widen sandbox egress to arbitrary destinations. + ## Prerequisites - A running NemoClaw sandbox. @@ -307,10 +311,19 @@ Files are processed in lexicographic order. Processing stops at the first failure; presets already applied are not rolled back. Fix the failing file and re-run the command to continue. -> [!WARNING] -> Custom preset hosts bypass NemoClaw's review process and can widen sandbox egress to arbitrary destinations. +> **Warning:** Custom preset hosts bypass NemoClaw's review process and can widen sandbox egress to arbitrary destinations. > Review every host in a custom preset before applying it, especially when the file originates outside your team. +### Remove a Custom Preset + +Custom presets applied with `--from-file` or `--from-dir` are recorded in the NemoClaw sandbox registry alongside their full YAML content, so they can be removed by name — the original file does not need to be kept on disk: + +```console +$ nemoclaw my-assistant policy-remove my-internal-api --yes +``` + +`policy-remove` accepts both built-in and custom preset names. Run `nemoclaw policy-list` to see every preset currently applied to the sandbox. + ## Related Skills - `nemoclaw-user-reference` — Network Policies (use the `nemoclaw-user-reference` skill) for the full baseline policy reference diff --git a/src/lib/sandbox-build-context.ts b/src/lib/sandbox-build-context.ts index f86718059cc..f8f9882d9bf 100644 --- a/src/lib/sandbox-build-context.ts +++ b/src/lib/sandbox-build-context.ts @@ -85,6 +85,11 @@ function stageOptimizedSandboxBuildContext( path.join(rootDir, "scripts", "lib", "sandbox-init.sh"), path.join(stagedScriptsDir, "lib", "sandbox-init.sh"), ); + // OpenClaw config generator extracted in #2449 + fs.copyFileSync( + path.join(rootDir, "scripts", "generate-openclaw-config.py"), + path.join(stagedScriptsDir, "generate-openclaw-config.py"), + ); return { buildCtx, stagedDockerfile }; } diff --git a/test/sandbox-build-context.test.ts b/test/sandbox-build-context.test.ts index 1ce63cade63..89c668878b4 100644 --- a/test/sandbox-build-context.test.ts +++ b/test/sandbox-build-context.test.ts @@ -27,6 +27,7 @@ describe("sandbox build context staging", () => { ), ).toBe(true); expect(fs.existsSync(path.join(buildCtx, "scripts", "nemoclaw-start.sh"))).toBe(true); + expect(fs.existsSync(path.join(buildCtx, "scripts", "generate-openclaw-config.py"))).toBe(true); expect(fs.existsSync(path.join(buildCtx, "scripts", "setup.sh"))).toBe(false); } finally { fs.rmSync(tmpDir, { recursive: true, force: true });