FAQ
General
Section titled “General”What is BlastShield?
Section titled “What is BlastShield?”BlastShield is a macOS tool that wraps AI coding agents and GUI launchers (Claude Code, Codex, Grok Build, Conductor, Cursor, Gemini) in sandbox-exec profiles to protect against destructive cloud CLI commands. It provides two layers of defense: kernel-level filesystem sandboxing and command-argument filtering with biometric/password authentication.
Why do I need this? My agent has a built-in sandbox.
Section titled “Why do I need this? My agent has a built-in sandbox.”Built-in agent sandboxes (Claude’s /sandbox, Codex’s approval policies) only gate their own tools. An agent that shells out via Bash or Python bypasses all of it. OS-level enforcement can’t be bypassed — the kernel doesn’t care what the agent thinks it’s allowed to do.
Which AI agents does BlastShield support?
Section titled “Which AI agents does BlastShield support?”Any command-line tool. BlastShield doesn’t need to know about the agent — it wraps any process in a sandbox. Commonly used with:
- Claude Code (
blastshield claude) - OpenAI Codex (
blastshield codex) - Grok Build (
blastshield grokorblastshield grok --always-approve) - OpenCode (
blastshield opencode) - Conductor (
blastshield -p gui-app open /Applications/Conductor.app) - Cursor (
blastshield cursor) - Google Gemini (
blastshield gemini) - Any other CLI tool (
blastshield bash)
Grok Build has first-class runtime-state support in the base profile: sessions, memory, logs, and auto-update binaries under ~/.grok can write, while auth, config, skills, plugins, and hooks stay protected. BlastShield also has first-class support for Conductor as a macOS GUI app. See the Conductor guide for the launch command and workspace write policy.
How do I run Grok Build under BlastShield?
Section titled “How do I run Grok Build under BlastShield?”# Interactive / YOLO-style tool approvalblastshield grok --always-approve
# Headless one-shotblastshield grok -p "Summarize this repo"
# With explicit cloud profilesblastshield -p terraform -p gh grok --always-approveAuthenticate Grok outside BlastShield first (grok login) or use XAI_API_KEY. BlastShield intentionally blocks writes to ~/.grok/auth.json and ~/.grok/config.toml so a sandboxed agent cannot replace credentials, policy, skills, plugins, or hooks. Session history, memory, logs, sockets, and auto-update binaries under ~/.grok remain writable so normal Grok workflows work.
If token refresh fails because auth.json is write-protected, set XAI_API_KEY or re-login outside the sandbox, then relaunch with BlastShield.
Couldn't create session: FS_PERMISSION_DENIED when running Grok
Section titled “Couldn't create session: FS_PERMISSION_DENIED when running Grok”Grok stores sessions under ~/.grok/. BlastShield ≥ v0.1.19 allows those runtime writes; v0.1.18 and earlier do not.
blastshield --version # need 0.1.19+which blastshield # confirm you are not on an older Homebrew installIf Homebrew is still on 0.1.18, either upgrade when the tap publishes a newer bottle, or run from a checkout that includes Grok support:
cd /path/to/blastshieldexport PATH="$PWD:$PATH" # put the repo ahead of /opt/homebrew/binblastshield --version # expect v0.1.19 or newerblastshield grok -p "Reply with: pong"Grok opens but the prompt stays “queued” / setup never finishes
Section titled “Grok opens but the prompt stays “queued” / setup never finishes”Grok’s interactive session blocks on MCP and auth setup before a turn can run. If that setup cannot complete inside the sandbox, the UI can sit on queued indefinitely.
Common causes and fixes:
-
Old BlastShield without Grok runtime writes
See theFS_PERMISSION_DENIEDsection above. Confirmblastshield --versionis ≥ 0.1.19. -
First login / expired OAuth / MCP browser auth
Complete login and MCP OAuth outside the sandbox first:Terminal window grok logingrok mcp doctor # e.g. Sentry pluginThen relaunch:
blastshield grok --always-approve.
BlastShield ≥ v0.1.20 allows Launch Services browser opens (lsopen) so OAuth can open a browser when needed; credentials still must be stored outside the sandbox because~/.grok/auth.jsonis write-protected. -
Folder trust cannot be saved under BlastShield
Writes to~/.grok/trusted_folders.tomlare denied so an agent cannot expand trust. Check and grant trust outside the sandbox:Terminal window grok inspect # look for "Project trusted: yes"If it is not trusted, start a normal (unsandboxed) interactive session in that directory and run the slash command
/hooks-trust(or use the Trust action in the/hooksmodal). There is no top-levelgrok --trustflag on current Grok Build builds — onlygrok plugin install … --trustfor plugins. -
Nested
sandbox-execis impossible
macOS does not support recursive Seatbelt. If Grok also has--sandbox/[sandbox] profileenabled, the inner apply fails. Use BlastShield as the OS sandbox and leave Grok’s sandbox off (its default). -
Quick health check
Terminal window # Should return quickly if auth/MCP are healthy (requires BlastShield ≥ 0.1.19)blastshield grok -p "Reply with: pong"blastshield --violations # recent Seatbelt denials
sandbox-exec & macOS
Section titled “sandbox-exec & macOS”Is sandbox-exec deprecated?
Section titled “Is sandbox-exec deprecated?”Yes. Apple deprecated sandbox-exec (the command-line interface to the Seatbelt framework) in macOS 10.15 Catalina. However:
- It still works on macOS Sequoia (15.x) as of 2025
- No replacement exists for ad-hoc CLI sandboxing
- Apple’s deprecation was about the public API, not the underlying framework (which Apple still uses internally)
- The Seatbelt profile language (SBPL) remains functional
BlastShield will continue to work as long as Apple maintains the sandbox-exec binary.
What if Apple removes sandbox-exec entirely?
Section titled “What if Apple removes sandbox-exec entirely?”If Apple removes sandbox-exec, there is currently no equivalent replacement for ad-hoc CLI sandboxing on macOS. Possible alternatives at that point:
- Entitlement-based sandboxing — Requires code signing and an Apple Developer account; not suitable for CLI tools
- Containerization — Docker or Podman, but these have different threat models and significant overhead
- Virtualization — Run agents in VMs, but this is heavyweight and changes the workflow significantly
For now, sandbox-exec remains the best option for macOS CLI sandboxing.
Can I use BlastShield on Linux?
Section titled “Can I use BlastShield on Linux?”No. sandbox-exec is Apple-specific and does not exist on Linux.
For Linux, consider:
- bubblewrap — Lightweight namespace-based sandboxing (similar capabilities to sandbox-exec)
- Firejail — Another Linux sandbox tool using namespaces and seccomp
- Docker/Podman — Container-based isolation
The BlastShield concept (deny-by-default profiles, credential path blocking) could be adapted to bubblewrap or Firejail, but this is not currently implemented.
Network Access
Section titled “Network Access”Can BlastShield block network access?
Section titled “Can BlastShield block network access?”Not by default. The sandbox profiles focus on file and process restrictions. Network access is allowed because:
- AI agents need network access to function (API calls, package downloads, git operations)
sandbox-execcan technically restrict network, but doing so breaks most agent workflows
Can secrets be exfiltrated over the network?
Section titled “Can secrets be exfiltrated over the network?”Yes, in certain scenarios. The sandbox operates at file paths, not content:
- If a secret is in an environment variable and you don’t use
-c(clean env), the agent can read it and send it over the network - If a secret is fetched via a credential helper (e.g.,
aws sts get-session-token), the result enters the process and could be exfiltrated - If a secret is in a file protected by the sandbox, it cannot be read at all
Mitigation: Use -c / --clean-env to strip API keys and secrets from environment variables:
blastshield -c claude --dangerously-skip-permissionsWhy is Keychain access allowed?
Section titled “Why is Keychain access allowed?”Keychain access is allowed so credential helpers work. Many cloud CLIs use the Keychain as their credential store. Blocking Keychain access would break authentication for legitimate operations (e.g., git push, aws s3 ls).
The trade-off: an agent can perform authenticated actions via credential helpers, but cannot read raw tokens from files. The guard layer provides additional protection by intercepting destructive subcommands.
Can an agent bypass blastshield-guard?
Section titled “Can an agent bypass blastshield-guard?”Yes, if it knows to use full paths. Running /usr/local/bin/terraform destroy bypasses the PATH wrapper. This is why:
- Layer 1 (sandbox) is the hard boundary — Even with the guard bypassed, the agent cannot read credentials
- The guard is a speed bump — It catches accidental and casual misuse, and makes deliberate misuse require more effort
- Use both layers — Together they provide defense in depth
Does BlastShield block package manager install commands?
Section titled “Does BlastShield block package manager install commands?”Yes. The install profile and guard protect against 10 package managers: npm, yarn, pnpm, pip, brew, gem, cargo, hermit, apt, and dnf. Install/add subcommands are classified as mutating and require authentication. Read-only operations (npm list, pip show, brew info, cargo search, etc.) pass through immediately.
The sandbox profile also blocks writes to global package directories and project lockfiles at the kernel level, so even bypassing the PATH wrapper won’t allow global installs.
Note: Project-local installs (e.g., pip install into a venv under the project directory) are only caught by the guard, since the base profile allows project writes. Use both layers for full protection.
Can I add custom destructive patterns?
Section titled “Can I add custom destructive patterns?”Not currently through a configuration file. The destructive command definitions are in the blastshield-guard script in the DESTRUCTIVE_COMMANDS associative array. You can modify them directly, or create custom wrappers in your guard directory.
Limitations
Section titled “Limitations”What are BlastShield’s known limitations?
Section titled “What are BlastShield’s known limitations?”- macOS only —
sandbox-execis Apple-specific - sandbox-exec is deprecated — Still works, but no guarantee for future macOS versions
- Network is open by default — Secrets in env vars can be exfiltrated (use
-c) - Guard is bypassable — Full paths bypass PATH wrappers
- No nested sandboxes — Cannot use sandbox-exec inside another sandbox-exec
- Keychain is allowed — Credential helpers can authenticate on the agent’s behalf
- Content-level filtering is impossible — sandbox-exec operates on paths, not file contents
When Conductor is launched through BlastShield, agents inside that Conductor session already inherit the sandbox. Do not run blastshield again from inside those agents; macOS may reject nested sandbox-exec launches.
Can I use BlastShield inside a Docker container?
Section titled “Can I use BlastShield inside a Docker container?”Not for its primary purpose. Docker on macOS runs inside a Linux VM, so sandbox-exec is not available. However, you can use BlastShield on the macOS host to sandbox a Docker CLI:
blastshield -p kubectl docker run ...This would protect the Docker socket and kubeconfig files from being read by the agent.
Troubleshooting
Section titled “Troubleshooting”sandbox-exec not found
Section titled “sandbox-exec not found”BlastShield requires macOS. If you’re on macOS and see this error, your system may have a non-standard configuration.
Sandbox violations in logs
Section titled “Sandbox violations in logs”Check violations with:
blastshield --violationsThis requires Full Disk Access for the terminal app. Grant it in System Settings → Privacy & Security → Full Disk Access.
Agent can’t access files it needs
Section titled “Agent can’t access files it needs”The sandbox may be too restrictive. Options:
- Disable auto-detection and specify only the profiles you need:
blastshield --no-detect -p terraform claude(orcodex,opencode) - Create a custom profile with additional allow rules:
~/.config/blastshield/profiles/custom.sb - Check violations to understand what’s being blocked:
blastshield --violations