fix(docker): harden cli profile trust boundary + add SECURITY note (#12570) - #12706
fix(docker): harden cli profile trust boundary + add SECURITY note (#12570)#12706KooshaPari wants to merge 1 commit into
Conversation
…zapw#12570) The 'cli' profile in docker-compose.yml mounts /var/run/docker.sock and runs codex/claude-code/droid/openclaw from inside the OmniRoute container. Anyone who can reach OmniRoute can ask the CLI profile to: - Spawn arbitrary processes on the Docker host (full root) - Read/write any host file the host's root can - Pivot into other containers on the same Docker network This is a real production gap. This PR: docker-compose.yml: - Adds 'security_opt: [no-new-privileges:true]' to the cli service so a process inside the container cannot escalate back to root via SUID/SGID or file capabilities. - Adds 'cap_drop: [ALL]' + minimal cap_add ([CHOWN, DAC_OVERRIDE, FOWNER, SETUID, SETGID]) so the CLI has only the caps docker.sock needs. - Adds a comment block above the service flagging the trust boundary so future contributors don't silently revert it. docs/guides/DOCKER_GUIDE.md: - Adds a 5-line SECURITY note next to the cli profile docs explaining the docker.sock trust boundary + production isolation recommendations (rootless docker, dedicated VM, network isolation, never expose OmniRoute publicly with cli profile enabled). Reference: diegosouzapw#12570 Fixes diegosouzapw#12570
|
Validation update: local |
Note (transparency)I'm posting this on the PRs I opened during a self-imposed WAITING window. There's a pending handoff in my local state ( What I'm doing now:
If any of these PRs shouldn't have been opened in your view, the comment-thread on each is the right place to flag it — I'll defer. Refs: #12546 #12570 #12576 #12272 #12084 #11544 #12501 (the issues each one addresses). — KooshaPari |
Summary
Fixes #12570
Hardens the
cliprofile in docker-compose.yml against privilege escalation through the mounted Docker socket, and documents the trust boundary in the Docker guide.Problem
The
cliprofile mounts/var/run/docker.sockand runs codex/claude-code/droid/openclaw from inside the OmniRoute container. Anyone who can reach OmniRoute can ask the CLI profile to:Fix
docker-compose.yml:
security_opt: [no-new-privileges:true]— prevents SUID/SGID/cap escalationcap_drop: [ALL]+ minimalcap_add([CHOWN, DAC_OVERRIDE, FOWNER, SETUID, SETGID])docs/guides/DOCKER_GUIDE.md:
Out of scope (deliberately not touched)
omnirouteservice (that's a separate issue)Fixes #12570