Understand Process Controls
NemoClaw limits the capabilities, user privileges, and resource quotas available to processes inside the sandbox.
OpenShell enforces additional process-level controls not covered here, including seccomp BPF socket domain filters and a specific enforcement application order (namespace entry, privilege drop, Landlock, seccomp). Refer to the Process Controls section of the OpenShell Security Best Practices.
Capability Drops
The entrypoint drops dangerous Linux capabilities from the bounding set at startup using capsh.
This limits what capabilities any child process (gateway, sandbox, agent) can ever acquire.
The managed images install setpriv from util-linux and require it when the entrypoint switches from root to the sandbox and gateway users.
When CAP_SETPCAP is available, the same setpriv operation removes the remaining privilege-separation capabilities from the child process at the same time as the user change.
The initial entrypoint drop removes cap_sys_admin, cap_sys_ptrace, cap_net_raw, cap_dac_override, cap_sys_chroot, cap_fsetid, cap_setfcap, cap_mknod, cap_audit_write, and cap_net_bind_service.
When the additional setpriv bounding-set drop runs, the child process also loses cap_setuid, cap_setgid, cap_fowner, cap_chown, and cap_kill.
The extra bounding-set capability drop is best effort.
If capsh is not available or CAP_SETPCAP is not in the bounding set, the entrypoint logs a warning and retains the runtime-provided bounding set.
The entrypoint still uses setpriv to change the user, group, and supplementary groups without the extra bounding-set drop.
When a root entrypoint must change identity, it fails closed if setpriv is unavailable instead of starting an agent service as root.
To make the drop fail-closed instead of best-effort, set NEMOCLAW_REQUIRE_CAP_DROP=1 in the entrypoint environment.
The agent then refuses to start unless it verifies that the agent process tree’s bounding set is free of dangerous capabilities.
It does not boot on a host whose bounding set still holds them, typically one that cannot perform the drop because CAP_SETPCAP or capsh is missing and the container runtime did not provide a clean bounding set.
This is opt-in because such hosts are common, including many cloud VMs, Docker Desktop, and WSL. Leaving it unset preserves the best-effort default.
The check covers the agent process tree only.
The container runtime spawns a nemoclaw connect shell outside that tree, so the check does not affect it (tracked in NVIDIA/OpenShell#1452).
For additional protection, pass --cap-drop=ALL with docker run or Compose.
Refer to Review Sandbox Hardening.
Gateway Process Isolation
Gateway and agent UID isolation depends on the container process topology.
The stock OpenClaw image defaults to the sandbox user for OpenShell compatibility.
An OpenShell-managed container has OpenShell as PID 1 and launches nemoclaw-start as a non-root process, so the supervisor, gateway, and agent all use the sandbox UID.
The managed-image publication workflow explicitly sets NEMOCLAW_MANAGED_IMAGE_RUNTIME_USER=root for its reviewed release images.
That build-time setting lets the entrypoint run the gateway as the separate gateway user and agent commands as the sandbox user.
A direct container runtime can override the image user to root.
That root-entrypoint topology runs the gateway as the separate gateway user and agent commands as the sandbox user.
No New Privileges
The no-new-privileges flag prevents processes from gaining additional privileges through setuid binaries or capability inheritance.
Process Limit
A process limit caps the number of processes the sandbox user can spawn.
The entrypoint sets both soft and hard limits using ulimit -u 512.
This behavior is best effort.
If the container runtime restricts ulimit modification, the entrypoint logs a security warning and continues without the limit.
Open File Descriptor Limit
An open file descriptor limit caps the number of files, sockets, and pipes the sandbox user can hold open at once.
The entrypoint sets both soft and hard limits using ulimit -n 65536.
This behavior is best effort.
If the container runtime restricts ulimit modification, the entrypoint logs a security warning and continues without the limit.
Non-Root User
The sandbox runs agent processes as a dedicated sandbox user and group.
The stock OpenClaw image starts the entrypoint as sandbox for OpenShell compatibility.
A build from the managed-image publication workflow can select root so the entrypoint starts the gateway and agent commands under separate UIDs.
A direct runtime can override the image user to root, which lets the entrypoint separate the gateway and sandbox UIDs before it runs agent commands.
PATH Hardening
The entrypoint locks the PATH environment variable to system directories, preventing the agent from injecting malicious binaries into command resolution.
Build Toolchain Removal
The Dockerfile removes compilers and network probes from the runtime image.
Image Digest Pinning
The managed blueprint references the sandbox image by an immutable @sha256: digest instead of a mutable tag such as :latest.
A registry-side tag change cannot silently select another managed sandbox image.
Auth Profile Permissions
The entrypoint and migration flows enforce chmod 600 on all auth-profiles.json files under ~/.openclaw.
This prevents other users on the host from reading stored credentials.