fix(docker): restore base capabilities in sandbox overlay (#523)

Sandbox overlay's cap_add replaces (not merges) the base compose, dropping
SETUID, SETGID, CHOWN. This causes credential copy to fail with Permission
denied when combining sandbox + claude-cli overlays.

Changes:
- Re-include base capabilities in sandbox overlay's cap_add
- Use umask 077 for atomic permission-safe credential copy
- Add ENABLE_CLAUDE_CLI build arg to pre-install Claude CLI in image
- Add runtime warning when credentials mounted but CLI binary missing
- Add WITH_CLAUDE_CLI to Makefile for overlay consistency
- Add security warning comment for sandbox overlay attack surface
This commit is contained in:
therichardngai-code authored and GitHub committed 2026-03-28 13:17:08 +07:00
1 parent 0cfe5800ca
commit 6bfad07ed8
6 files changed
+38 -6

No files matched your search

+4
View File
@@ -13,5 +13,9 @@ POSTGRES_PASSWORD=
# Docker Compose auto-builds this from POSTGRES_USER/PASSWORD/DB.
# GOCLAW_POSTGRES_DSN=postgres://user:pass@host:5432/dbname?sslmode=disable
# --- Sandbox (only when using docker-compose.sandbox.yml) ---
# Docker socket GID: 999 on Linux, 0 on Windows/macOS Docker Desktop.
# DOCKER_GID=0
# --- Debug ---
# GOCLAW_TRACE_VERBOSE=1