You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] sandbox: NOPASSWD:ALL + workspace-writable firewall script lets the agent disable the firewall #208
The claude-code-sandbox image's firewall isn't a boundary against the agent it sandboxes. The shared Dockerfile stage grants node ALL=(ALL) NOPASSWD:ALL to both targets, and the sandbox template bind-mounts init-firewall.sh from the workspace, which the agent can write to, then runs it as root via sudo on every start. Combined with claudeCode.allowDangerouslySkipPermissions: true, a prompt-injected agent can run sudo iptables -P OUTPUT ACCEPT && sudo iptables -F (or edit the script) and reach any host.
Sandbox target: drop /etc/sudoers.d/node-nopasswd; allow only NOPASSWD: /usr/local/bin/init-firewall.sh plus the specific chown/find used by postCreateCommand (or move those into the image/entrypoint).
Don't run a workspace-writable script as root: bake a root-owned firewall runner into the image that reads a project allowlist file (domains only, validated) instead of executing project code.
Activity