Critical issues:
- Default full autonomy
skipPermissions = true means --dangerously-skip-permissions by default. That is the biggest red flag. Any agent compromise becomes arbitrary command execution as that Unix user.
- Remote control enabled by default
remoteControl = true exposes the session to Claude apps by default. That expands the control plane. Should be opt-in, not default.
- Normal users, persistent homes
It creates real isNormalUser accounts with writable /home/<name>. Good for isolation from root, bad for persistence and lateral movement if secrets, SSH keys, git creds, or dotfiles accumulate.
- Passwordless sudo with SETENV
The sudo allowlist supports NOPASSWD and SETENV. SETENV is risky because env vars can alter behavior of many binaries/scripts. I’d remove it unless absolutely needed.
- Secrets via
EnvironmentFile
Better than Nix store, but services get tokens as env vars. Child processes can inherit them; tools may leak them to logs, crash dumps, process inspection by same user, shell history, etc.
- Token dir is 0755
/etc/claude-box is world-readable/traversable by default. Files may be 600, but the module does not enforce file ownership/mode for ${name}.env. Easy footgun.
- No systemd hardening
Missing NoNewPrivileges, PrivateTmp, ProtectSystem, ProtectHome, RestrictSUIDSGID, SystemCallFilter, CapabilityBoundingSet, etc. For an AI agent runner, that’s weak.
- Command construction smells
claudeCmd is built via string concatenation, then wrapped into shell/tmux. Some args are escaped later as a whole command string, but extraArgs and remoteControlName are not individually shell-escaped before joining. The docs say “keep it shell-safe,” which is not enforcement.
Verdict: usable only as a trusted-dev-box toy, not production-safe. I’d change defaults to:
skipPermissions = false;
remoteControl = false;
Also remove SETENV, make token dir 0710 or 0700, enforce token file modes, shell-escape every arg individually, add systemd sandboxing, and consider ephemeral users/homes.
Critical issues:
skipPermissions = truemeans--dangerously-skip-permissionsby default. That is the biggest red flag. Any agent compromise becomes arbitrary command execution as that Unix user.remoteControl = trueexposes the session to Claude apps by default. That expands the control plane. Should be opt-in, not default.It creates real
isNormalUseraccounts with writable/home/<name>. Good for isolation from root, bad for persistence and lateral movement if secrets, SSH keys, git creds, or dotfiles accumulate.The sudo allowlist supports
NOPASSWDandSETENV.SETENVis risky because env vars can alter behavior of many binaries/scripts. I’d remove it unless absolutely needed.EnvironmentFileBetter than Nix store, but services get tokens as env vars. Child processes can inherit them; tools may leak them to logs, crash dumps, process inspection by same user, shell history, etc.
/etc/claude-boxis world-readable/traversable by default. Files may be 600, but the module does not enforce file ownership/mode for${name}.env. Easy footgun.Missing
NoNewPrivileges,PrivateTmp,ProtectSystem,ProtectHome,RestrictSUIDSGID,SystemCallFilter,CapabilityBoundingSet, etc. For an AI agent runner, that’s weak.claudeCmdis built via string concatenation, then wrapped into shell/tmux. Some args are escaped later as a whole command string, butextraArgsandremoteControlNameare not individually shell-escaped before joining. The docs say “keep it shell-safe,” which is not enforcement.Verdict: usable only as a trusted-dev-box toy, not production-safe. I’d change defaults to:
Also remove
SETENV, make token dir 0710 or 0700, enforce token file modes, shell-escape every arg individually, add systemd sandboxing, and consider ephemeral users/homes.