-
Notifications
You must be signed in to change notification settings - Fork 3.1k
docs: add gateway auth controls and update legacy setup description #1374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
.agents/skills/nemoclaw-deploy-remote/references/sandbox-hardening.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Sandbox Image Hardening | ||
|
miyoungc marked this conversation as resolved.
|
||
|
|
||
| The NemoClaw sandbox image applies several security measures to reduce attack | ||
| surface and limit the blast radius of untrusted workloads. | ||
|
|
||
| ## Removed Unnecessary Tools | ||
|
|
||
| Build toolchains (`gcc`, `g++`, `make`) and network probes (`netcat`) are | ||
| explicitly purged from the runtime image. These tools are not needed at runtime | ||
| and would unnecessarily widen the attack surface. | ||
|
|
||
| If you need a compiler during build, use the existing multi-stage build | ||
| (the `builder` stage has full Node.js tooling) and copy only artifacts into the | ||
| runtime stage. | ||
|
|
||
| ## Process Limits | ||
|
|
||
| The container ENTRYPOINT sets `ulimit -u 512` to cap the number of processes | ||
| a sandbox user can spawn. This mitigates fork-bomb attacks. The startup script | ||
| (`nemoclaw-start.sh`) applies the same limit. | ||
|
|
||
| Adjust the value via the `--ulimit nproc=512:512` flag if launching with | ||
| `docker run` directly. | ||
|
|
||
| ## Dropping Linux Capabilities | ||
|
|
||
| When running the sandbox container, drop all Linux capabilities and re-add only | ||
| what is strictly required: | ||
|
|
||
| ```console | ||
| $ docker run --rm \ | ||
| --cap-drop=ALL \ | ||
| --ulimit nproc=512:512 \ | ||
| nemoclaw-sandbox | ||
| ``` | ||
|
|
||
| ### Docker Compose Example | ||
|
|
||
| ```yaml | ||
| services: | ||
| nemoclaw-sandbox: | ||
| image: nemoclaw-sandbox:latest | ||
| cap_drop: | ||
| - ALL | ||
| cap_add: | ||
| - NET_BIND_SERVICE | ||
| ulimits: | ||
| nproc: | ||
| soft: 512 | ||
| hard: 512 | ||
| security_opt: | ||
| - no-new-privileges:true | ||
| read_only: true | ||
| tmpfs: | ||
| - /tmp:size=64m | ||
| ``` | ||
|
|
||
| > **Note:** The `Dockerfile` itself cannot enforce `--cap-drop` — that is a | ||
| > runtime concern controlled by the container orchestrator. Always configure | ||
| > capability dropping in your `docker run` flags, Compose file, or Kubernetes | ||
| > `securityContext`. | ||
|
|
||
| ## References | ||
|
|
||
| - [#807](https://github.com/NVIDIA/NemoClaw/issues/807) — gcc in sandbox image | ||
| - [#808](https://github.com/NVIDIA/NemoClaw/issues/808) — netcat in sandbox image | ||
| - [#809](https://github.com/NVIDIA/NemoClaw/issues/809) — No process limit | ||
| - [#797](https://github.com/NVIDIA/NemoClaw/issues/797) — Drop Linux capabilities | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.