enforcedenforced tieranti-bypass
No bypassing
Lock out 'skip all permission prompts' mode and stop a personal setting from switching off every hook. Without this, every other pack can be bypassed in one step.
Details
- Protects against
- Bypassing every prompt with --dangerously-skip-permissions
- Disabling managed hooks with disableAllHooks in personal settings
- Tradeoffs
- bypassPermissions mode is unavailable (auto mode is not affected)
- Limits
- A local administrator can still edit the managed directory. Protecting against the administrator requires MDM.
handrail enable anti-bypass
partialenforced tierdestructive
Confirm destructive commands
Force-push, hard reset, recursive delete, git clean and similar irreversible commands always ask first. sudo is denied outright.
Details
- Protects against
- git push --force overwriting others' commits
- git reset --hard / git clean discarding uncommitted work
- Accidental rm -rf
- Reusing a sudo credential you entered recently
- Tradeoffs
- These commands stop and ask even in auto mode
- Limits
- Rules match command prefixes. Wrapping rm in a script, an alias or a different spelling gets around them. This is a speed bump, not isolation.
handrail enable destructive
enforcedenforced tiersandbox
OS-level sandbox
Enforced by the operating system (macOS Seatbelt, Linux bubblewrap): Bash and every child process cannot read credential directories and can only reach allowlisted domains.
Details
- Protects against
- Any process, including Python or Node scripts, reading ~/.ssh, ~/.aws and similar
- Sending data to arbitrary domains
- Tradeoffs
- Network commands can only reach allowlisted domains (package registries and GitHub by default); ssh to your own servers fails until you add them
- If the sandbox cannot start, Claude Code refuses to run instead of silently falling back
- A command that fails in the sandbox cannot be retried outside it
- Limits
- Commands you type yourself after the ! prefix are not sandboxed. Native Windows is not supported; use WSL2.
handrail enable sandbox
partialenforced tiersecrets
Credentials and secret files
Stop Claude's own file tools from reading or editing SSH keys, cloud credentials, .env files and private keys.
Details
- Protects against
- ~/.ssh, ~/.aws, ~/.gnupg, ~/.kube, ~/.docker, ~/.netrc, cloud CLI credentials
- .env, *.pem and *.key files in projects
- macOS keychain files
- Tradeoffs
- You edit .env files yourself
- Legitimate *.key files in a project are blocked too
- Limits
- Covers Claude's built-in file tools and the file commands it recognizes in Bash (cat, head, sed, ...). A Python script that opens a file itself is not covered. For OS-level blocking, add 80-sandbox.
handrail enable secrets
enforcedenforced tiersupply-chain
Run only your own hooks
Run only hooks from managed policy; hooks shipped inside cloned repositories never run. Also disables automatic installation from the official plugin marketplace.
Details
- Protects against
- When you trusted a parent folder or run claude -p, hooks defined in a cloned repository's .claude/settings.json run arbitrary commands
- Tradeoffs
- Hooks in your own ~/.claude/settings.json stop running too (terminal integrations, custom notifications)
- To keep one of your hooks, package it as a pack of your own
- Limits
- Does not cover MCP servers or skills shipped in a repository. Inspect an unfamiliar repository's .claude/ directory before working in it.
handrail enable supply-chain
enforcedenforced tierprivacy
Keep data on this machine
Turn off every optional upload: Remote Control, cloud agents, hosted artifacts, claude.ai connectors, telemetry, error reports, feedback and transcript uploads.
Details
- Protects against
- Sessions synced to the cloud
- Output published to claude.ai
- Feedback reports that attach the whole conversation and code
- Telemetry and error reports
- Tradeoffs
- No Remote Control from your phone
- The Artifact tool and claude.ai connectors (Gmail, Drive, ...) are unavailable
- /feedback, /bug and /share are unavailable
- Limits
- Model inference itself must send the conversation to the model API. No local setting can change that. See the README section 'Limits'.
- Requires
- Claude Code 2.1.242 or later
handrail enable privacy
enforcedenforced tierretention
Keep local transcripts 7 days
Session transcripts are stored in plaintext under ~/.claude/projects/ for 30 days by default. Reduce that to 7 days.
Details
- Protects against
- Passwords and customer data that appeared in a conversation lingering on disk
- Exposure if the machine is lost or someone else logs in
- Tradeoffs
- Sessions older than 7 days can no longer be resumed
- Limits
- Does not delete copies already taken by backups or cloud sync. Also enable full-disk encryption and exclude ~/.claude from cloud sync.
handrail enable retention
enforcedenforced tieraudit
Local audit log
Every tool call leaves one line on this machine: when, which session, which directory, what was called. Written locally, never sent anywhere.
Details
- Protects against
- Answering 'what exactly did it do?' after the fact
- Spotting unexpected network access or deletions
- Tradeoffs
- The log can contain sensitive command-line arguments (common password patterns are masked); files are mode 600
- Limits
- The log is written as you, so any process running as you can edit it. It protects against mistakes, not deliberate tampering.
handrail enable audit