A deny-by-default sandbox for AI agents, MCP servers, and local AI tools.
Stop AI tools from accessing files, secrets, or network hosts you did not approve. Warden turns broad user permissions into a small, reviewable policy.
Website · Documentation · npm · License
Warden is pre-1.0 security software. Read the security model and limitations before protecting sensitive workloads. Verify native enforcement on the operating system where you will run it.
AI tool → ./project ✅ allowed
AI tool → .env ❌ denied
AI tool → ~/.ssh/id_rsa ❌ denied
AI tool → api.github.com ✅ allowed when declared
AI tool → evil.example.com ❌ denied
The exact result depends on the policy and backend. Warden refuses to run when it cannot establish the requested sandbox instead of silently running without protection.
npm install -g warden-sandbox-cli@beta
warden doctorThe current preview is 0.2.0-beta.10. Pin that exact version when reproducing
this release: npm install -g [email protected].
Use warden doctor before the first protected run. It checks whether the
selected platform backend and its required primitives are ready. For release
downloads, source builds, and platform prerequisites, see the
installation guide.
Observe a trusted local command, turn the observed accesses into a starter policy, review it, then run the command inside Warden:
warden trace -- npx your-server
warden init
warden run --policy policy.yaml -- npx your-serverTracing is intentionally unsandboxed. Use disposable data and fake credentials, then narrow the generated policy before running it.
filesystem:
read:
- ./project
network:
allow:
- api.github.com
env:
allow:
- GITHUB_TOKENWith this policy, the process receives only the declared filesystem, network, and environment access. Anything else is not an implicit permission. The full policy reference explains write grants, limits, MCP rules, redaction, and platform differences.
When an agent needs to edit code near credentials, use a sanitized workspace:
warden agent --policy agent-policy.yaml -- claudeWarden creates a temporary project projection. Selected environment values and fields in dotenv, JSON, YAML, or TOML files become placeholders. The agent can edit the surrounding code, but Warden shows a sanitized diff and requires your approval before applying changes to the real project.
Read the AI agent workspace guide for the policy format, supported clients, fixed credential requests, limits, and failure behavior.
- Files: grant selected paths read or write access.
- Secrets: pass only named environment variables, or hide selected values from an agent workspace.
- Network: allow only declared hosts through Warden's policy-aware path.
- Processes: run the whole child process tree inside the selected sandbox, with supported timeout and memory supervision.
AI agent / MCP server / local tool
↓
Warden
↓
policy + OS sandbox backend
↓
approved resources only
MCP is a first-class workflow, not the product boundary. Warden can wrap local commands directly, and it also provides MCP proxy, gateway, and client setup workflows.
The repository maintains an 18-entry MCP compatibility matrix: 14 pass, 2 are conditional, and 2 are documented failures. These are fixture classifications, not a promise that every upstream service works without configuration.
Native platform status and reproducible proof are documented separately:
- Linux: bubblewrap namespaces and the native proof harness, verified in hosted CI.
- macOS: Seatbelt with platform-specific limitations and fallback paths.
- Windows: AppContainer/WFP/Job Objects; native sandbox, escape, lifecycle, audit, and cross-build tests are verified in the Windows CI job. Hosted CI cannot provide every local WFP egress condition; verify required elevation and host prerequisites before production use.
- Docker: explicit fallback backend with a larger trust surface.
The current release proof also covers macOS and Windows native checks, cross-builds, docs, website, and attack-simulation jobs in hosted CI. See test evidence, the compatibility matrix, and the security review. Windows is verified in CI; that result does not remove the need to verify native enforcement and required privileges on the machine where you deploy Warden.
- Quickstart
- Installation
- AI agent workspace
- Policy reference
- CLI reference
- Compatibility
- Security model and limitations
- Architecture
- Verification and testing
- Contributing
Contributions are welcome, especially platform evidence, escape tests, policy fixtures, documentation, and reproducible bug reports. Start with CONTRIBUTING.md. Security issues should follow SECURITY.md.
Warden is released under the MIT License.