Understand Process Controls
OpenShell limits the capabilities available to managed sandbox processes. NemoClaw entrypoints retain only direct root-to-user transitions and resource-limit hooks for the paths that still consume them.
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 Ownership
OpenShell owns capability enforcement for managed agent processes. The OpenClaw and Hermes entrypoints do not inspect, drop, record, or reconcile Linux capabilities. This keeps one enforcement owner for the entrypoint, later exec processes, and connect shells.
A direct container runtime can explicitly override the image user to root.
That compatibility path retains the existing capsh bounding-set drop and supports NEMOCLAW_REQUIRE_CAP_DROP=1 for fail-closed verification.
It is not used by OpenShell-managed launches and is not a substitute for container-runtime capability configuration.
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.
That direct root-to-user transition is separate from managed OpenShell enforcement and removes cap_setuid, cap_setgid, cap_fowner, cap_chown, and cap_kill from the child bounding set when the runtime permits it.
For root-to-user transitions, the extra bounding-set capability drop is best effort.
If capsh or CAP_SETPCAP is unavailable, the root entrypoint logs a warning and uses setpriv 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.
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=sandbox for its reviewed release images because OpenShell 0.0.116 rejects a root OCI image 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 keeps the entrypoint, gateway, and agent commands under the sandbox UID for OpenShell 0.0.116.
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.