Sandboxing & Isolation
Sandboxing & Isolation
Section titled “Sandboxing & Isolation”Untrusted agent code is executed inside an isolated Docker container (Dockerfile.sandbox with WITH_SANDBOX=1).
Security Controls
Section titled “Security Controls”- Blocked shell deny patterns (e.g.
curl | sh, fork bombs, reverse shells). - Host
execdenies commands that name the gateway data dir. A tenant agent’s run may still use its own tenant directory (for example its skills store), and a command that names another tenant’s directory is denied. Master-tenant runs get no tenant directory. Subagents and native workers use the sameexecand the same rules. This check matches path text, so it is a guard, not an isolation boundary. - On Linux with Landlock (kernel 6.2 or later, including inside Docker with the default seccomp profile), host
execfor a tenant agent also runs under a kernel filesystem policy: it can reach only its own tenant data and workspace directories (which hold its team workspace and uploads), plus the shared runtime packages and the system skills of the shared skills store, read-only. Packages a tenant agent installs (pip install,npm install -g) go to a runtime directory inside its own tenant data directory and are visible to that tenant only. Other tenants’ files, the main workspace, the gateway database and the config file fail withPermission denied, whatever the command does (cd .., symlinks, scripts). The command also cannot read the environment, memory or open files of the gateway, MCP servers or other tenants’ commands under/proc, even when the gateway runs as root. A confined command also cannot list or create entries directly in the parent directories of those paths, such asls /, or$HOMEwhen the data dir lives there. The policy covers file contents, not metadata or signals: use the sandbox when tenants must not affect each other at all. - Where Landlock is not available, the gateway logs
security.exec_fs_confinement_unavailableand tenant runs cannot use their tenant directory from hostexec. Enable the Docker sandbox forexecin multi-tenant deployments on such hosts: a command that runs in the sandbox keeps its own tenant directory, mounted read-only. If the sandbox is disabled for a call on such a host, a command that names the tenant directory is refused instead of running on the host. tools.exec.tenant_host_policy(envGOCLAW_EXEC_TENANT_HOST_POLICY) decides whether tenant agents may runexecon the host:denyrefuses it,warn(the default in this release) runs it and logssecurity.exec_tenant_host_would_deny, andallowruns it with the operator accepting that tenant agents can read other tenants’ files, the gateway token and same-uid process env. Underdeny, credentialed CLIs that tenant runs would start on the host are refused too. For multi-tenant installs, enable the Docker sandbox and setdeny. Master-tenant runs are not affected. ACP terminals and the Claude CLI built-in Bash run outsideexecand are not covered by this setting.- Claude CLI agents run
execthrough the MCP bridge. On the host, bridgeexecnever gets the tenant directory. In the Docker sandbox it does: the container mounts the agent’s own tenant directory read-only at the same path, so its skill scripts run, while no other tenant’s directory exists in the container. If the sandbox is disabled for the call, bridgeexecfails instead of running on the host. - Timeouts on all subshell processes (default 60s).
- Isolated virtual filesystem boundaries.