nvidia.com

Command Palette

Search for a command to run...

Sandbox Image Hardening — NVIDIA NemoClaw Developer Guide

Last updated: 5/13/2026

Sandbox Image Hardening #

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.

The runtime image keeps a small set of operational utilities for normal sandbox workflows, including vi, jq, and dos2unix. Use these for lightweight inspection and file cleanup inside the sandbox, but make durable image or policy changes in the NemoClaw source tree and rebuild the sandbox.

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:

$ docker run --rm \ --cap-drop=ALL \ --ulimit nproc=512:512 \ nemoclaw-sandbox

Copy to clipboard

Docker Compose Example #

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

Copy to clipboard

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.

Filesystem Layout #

The sandbox Landlock policy declares which paths are writable. The agent’s home directory (/sandbox) is writable by default:

PathAccessPurpose
/sandboxread-writeHome directory — agents can create files and use standard home paths
/sandbox/.openclawread-writeAgent config, state, workspace, plugins
/sandbox/.nemoclawread-writePlugin state and config; blueprints within are DAC-protected (root-owned)
/tmpread-writeTemporary files and logs

System paths remain read-only to prevent agents from:

  • Replacing system binaries with trojanized versions

  • Modifying DNS resolution or TLS trust stores

  • Tampering with libraries or shell configuration outside /sandbox

The image build pre-creates shell init files .bashrc and .profile. These files source runtime proxy configuration from /tmp/nemoclaw-proxy-env.sh.

Landlock Kernel Requirements #

Landlock LSM requires Linux kernel 5.13 or later with CONFIG_SECURITY_LANDLOCK=y. The NemoClaw sandbox policy uses compatibility: best_effort, which means Landlock enforcement is silently skipped on kernels that do not support it.

On such kernels, protection falls back to DAC (file ownership and permissions) only. Files outside the writable paths would be inaccessible to the agent regardless of DAC permissions.

Operators should verify Landlock availability:

$ ls /sys/kernel/security/landlock

Copy to clipboard

For production deployments, kernel 5.13+ with Landlock enabled is strongly recommended. The test/e2e/e2e-cloud-experimental/checks/04-landlock-readonly.sh script validates enforcement at runtime.

References #

  • #804: Filesystem layout and Landlock policy

  • #807: gcc in sandbox image

  • #808: netcat in sandbox image

  • #809: No process limit

  • #797: Drop Linux capabilities

Related Articles