Review Sandbox Hardening
The NemoClaw sandbox image applies several security measures to reduce the attack surface and limit damage from untrusted workloads.
Immutable Managed Image Selection
Stock onboarding through the OpenShell Docker driver selects an exact managed-image digest and validates the complete OpenClaw, Hermes, and LangChain Deep Agents Code publication cohort before sandbox creation.
If registry or catalog availability prevents resolution, stock onboarding stops before sandbox creation and does not build a shipped Dockerfile.
An available but incomplete, mixed, mutable, wrong-platform, or identity-inconsistent cohort fails closed before sandbox creation.
Passing --from <Dockerfile> remains a separate explicit opt-in whose complete custom image must be reviewed independently.
Removed Unnecessary Tools
NemoClaw explicitly purges build toolchains (gcc, g++, make) and network probes (netcat) from the runtime image.
These tools are not needed at runtime and would 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 utilities 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.
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 with the --ulimit nproc=512:512 flag if you launch with docker run directly.
Open File Descriptor Limits
The same ENTRYPOINT also sets ulimit -n 65536 to cap the number of open file descriptors a sandbox user can hold.
Without this cap, the sandbox inherits the Docker daemon default (nofile ~1048576), which can exceed the host runtime limit and let a runaway process exhaust file descriptors.
The startup script (nemoclaw-start.sh) applies the same limit.
Adjust the value with the --ulimit nofile=65536:65536 flag if you launch with docker run directly.
Like the process limit, this limit applies to the PID 1 entrypoint process tree, which includes the gateway and agent.
openshell sandbox connect shells spawn outside that tree and still inherit the runtime default (tracked upstream in NVIDIA/OpenShell#1452).
Enforce both limits at the container runtime when that residual risk matters to you.
Dropping Linux Capabilities
OpenShell owns capability enforcement for managed entrypoints, exec processes, and connect shells.
The OpenClaw and Hermes entrypoints do not maintain a second capability drop, verification, sentinel, or fallback layer.
A direct container runtime that explicitly overrides the image user to root retains the existing capsh compatibility drop and NEMOCLAW_REQUIRE_CAP_DROP=1 fail-closed option.
OpenShell-managed launches do not call that path.
The managed images install setpriv from util-linux and require it for the switch from root to the sandbox and gateway users.
When CAP_SETPCAP is available, the same setpriv operation also removes the remaining privilege-separation capabilities from the child process bounding set.
For root-to-user transitions, the extra bounding-set drop is best effort: if capsh or CAP_SETPCAP is unavailable, the entrypoint warns and uses setpriv without that drop.
When a root entrypoint must change identity, it fails closed if setpriv is missing instead of starting an agent service as root.
When you launch the image directly, make the container runtime the capability owner and drop all Linux capabilities there.
In the examples below, nemoclaw-sandbox is a placeholder for the sandbox image NemoClaw builds during onboarding; substitute the image tag your install produced, which you can find with docker images.
Docker Compose Example
The Dockerfile itself cannot enforce --cap-drop.
The container orchestrator controls that runtime setting.
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:
The Access column reflects the Landlock policy declaration only.
Actual write success additionally requires POSIX (DAC) ownership and permissions to allow it.
For example, Landlock lists /sandbox/.nemoclaw as writable, but the sandbox user cannot create files directly under it because the parent directory is root-owned; writes must target the sandbox-owned subdirectories listed above.
This writable default is intentional.
Seeing the sandbox user create files under /sandbox or /sandbox/.openclaw in a fresh sandbox does not mean Landlock failed.
Landlock still enforces the fixed read-only system paths below.
System paths remain read-only for these protections:
- Agents cannot replace system binaries with trojanized versions.
- Agents cannot modify DNS resolution or TLS trust stores.
- Agents cannot tamper with libraries or shell configuration outside
/sandbox.
Personal shell files .bashrc and .profile belong to the sandbox user and can be edited.
System-wide shell hooks load runtime proxy settings from /tmp/nemoclaw-proxy-env.sh, which retains mode 0444.
After updating NemoClaw, rebuild existing sandboxes to apply these profile permissions.
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.
Verify Landlock availability:
On a kernel with Landlock support, the path exists and ls succeeds.
If it reports No such file or directory, the kernel does not expose Landlock, and the sandbox falls back to DAC-only enforcement as described above.
For production deployments, use kernel 5.13+ with Landlock enabled.
The test/e2e/e2e-cloud-experimental/checks/04-landlock-readonly.sh script validates enforcement at runtime.