freshcrate
Skin:/
Home > Security > greywall

greywall

Container-free, deny-by-default sandbox for AI coding agents. Kernel-enforced filesystem, network, and syscall isolation for Linux and macOS

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

Container-free, deny-by-default sandbox for AI coding agents. Kernel-enforced filesystem, network, and syscall isolation for Linux and macOS

README

Greywall — Sandbox for AI Coding Agents

GitHub stars License Go Release Product Hunt

Greywall is a container-free, deny-by-default sandbox for AI agents on Linux and macOS. It restricts filesystem access, network connections, and system calls to only what you explicitly allow, so tools like Claude Code, Cursor, Codex, and other AI coding agents can't access your SSH keys, environment secrets, or anything outside the working directory.

Use --learning to trace what a command needs and auto-generate a least-privilege config profile. All network traffic is transparently redirected through greyproxy, a deny-by-default transparent proxy with a live allow/deny dashboard.

Supports Linux and macOS. See platform support for details.

0304.mp4

Key features

  • Deny-by-default filesystem — only the working directory is accessible unless you allow more
  • Network isolation — all traffic blocked or routed through greyproxy with a live dashboard
  • Command blocking — dangerous commands like rm -rf / and git push --force are denied
  • Built-in agent profiles — one-command setup for Claude Code, Cursor, Codex, Aider, Goose, Gemini, OpenCode, Amp, Cline, Copilot, and more
  • Learning mode — traces filesystem access and auto-generates least-privilege profiles
  • Five security layers on Linux — Bubblewrap namespaces, Landlock, Seccomp BPF, eBPF monitoring, TUN-based network capture
  • No containers required — kernel-enforced sandboxing without Docker overhead
# Sandbox a command (network + filesystem denied by default)
greywall -- curl https://example.com

# Sandbox an AI coding agent with a built-in profile
greywall -- claude

# Learn what filesystem access a command needs, then auto-generate a profile
greywall --learning -- opencode

# Block dangerous commands
greywall -c "rm -rf /"  # → blocked by command deny rules

Install

Homebrew (macOS):

brew tap greyhavenhq/tap
brew install greywall

This also installs greyproxy as a dependency.

Linux / Mac:

curl -fsSL https://raw.githubusercontent.com/GreyhavenHQ/greywall/main/install.sh | sh
Other installation methods

Go install:

go install github.com/GreyhavenHQ/greywall/cmd/greywall@latest

mise:

mise use -g github:GreyhavenHQ/greywall
mise use -g github:GreyhavenHQ/greyproxy

Build from source:

git clone https://github.com/GreyhavenHQ/greywall
cd greywall
make setup && make build

Linux dependencies:

  • bubblewrap - container-free sandboxing (required)
  • socat - network bridging (required)
  • xdg-dbus-proxy - filtered D-Bus proxy for notify-send support (optional)
  • libsecret-tools - keyring credential injection for gh/glab (optional)

Check dependency status with greywall check.

Usage

Basic commands

# Run with all network blocked (default)
greywall -- curl https://example.com

# Run with shell expansion
greywall -c "echo hello && ls"

# Route through a SOCKS5 proxy
greywall --proxy socks5://localhost:1080 -- npm install

# Expose a port for inbound connections (e.g., dev servers)
greywall -p 3000 -c "npm run dev"

# Enable debug logging
greywall -d -- curl https://example.com

# Monitor sandbox violations
greywall -m -- npm install

# Show available Linux security features
greywall --linux-features

# Show version
greywall --version

# Check dependencies, security features, and greyproxy status
greywall check

# Install and start greyproxy
greywall setup

Agent profiles

Greywall ships with built-in sandbox profiles for popular AI coding agents (Claude Code, Codex, Cursor, Aider, Goose, Gemini CLI, OpenCode, Amp, Cline, Copilot, Kilo, Auggie, Droid) and toolchains (Node, Python, Go, Rust, Java, Ruby, Docker).

On first run, greywall shows what the profile allows and lets you apply, edit, or skip:

$ greywall -- claude

[greywall] Running claude in a sandbox.
A built-in profile is available. Without it, only the current directory is accessible.

Allow read:  ~/.claude  ~/.claude.json  ~/.config/claude  ~/.local/share/claude  ~/.gitconfig  ...  + working dir
Allow write: ~/.claude  ~/.claude.json  ~/.cache/claude  ~/.config/claude  ...  + working dir
Deny read:   ~/.ssh/id_*  ~/.gnupg/**  .env  .env.*
Deny write:  ~/.bashrc  ~/.zshrc  ~/.ssh  ~/.gnupg

[Y] Use profile (recommended)   [e] Edit first   [s] Skip (restrictive)   [n] Don't ask again
>

Combine agent and toolchain profiles with --profile:

# Agent + Python toolchain (allows access to ~/.cache/uv, ~/.local/pipx, etc.)
greywall --profile claude,python -- claude

# Agent + multiple toolchains
greywall --profile opencode,node,go -- opencode

# List all available and saved profiles
greywall profiles list

Learning mode

Greywall can trace a command's filesystem access and generate a config profile automatically:

# Run in learning mode - traces file access via strace
greywall --learning -- opencode

# List generated profiles
greywall profiles list

# Show a profile's content
greywall profiles show opencode

# Next run auto-loads the learned profile
greywall -- opencode

Configuration

Greywall reads from ~/.config/greywall/greywall.json by default (or ~/Library/Application Support/greywall/greywall.json on macOS).

{
  // Route traffic through an external SOCKS5 proxy
  "network": {
    "proxyUrl": "socks5://localhost:1080",
    "dnsAddr": "localhost:5353"
  },
  // Control filesystem access
  "filesystem": {
    "defaultDenyRead": true,
    "allowRead": ["~/.config/myapp"],
    "allowWrite": ["."],
    "denyWrite": ["~/.ssh/**"],
    "denyRead": ["~/.ssh/id_*", ".env"]
  },
  // Block dangerous commands
  "command": {
    "deny": ["git push", "npm publish"]
  }
}

Use greywall --settings ./custom.json to specify a different config file.

By default, traffic routes through the GreyProxy SOCKS5 proxy at localhost:43052 with DNS via localhost:43053.

Platform support

Feature Linux macOS
Sandbox engine bubblewrap sandbox-exec (Seatbelt)
Filesystem deny-by-default (read/write) ✅ ✅
Syscall filtering ✅ (seccomp) ✅ (Seatbelt)
Filesystem access control ✅ (Landlock + bubblewrap) ✅ (Seatbelt)
Violation monitoring ✅ (eBPF) ✅ (Seatbelt denial logs)
Transparent proxy (full traffic capture) ✅ (tun2socks + TUN) ❌
DNS capture ✅ (DNS bridge) ❌
Proxy via env vars (SOCKS5 / HTTP) ✅ ✅
Network isolation ✅ (network namespace) N/A
Command allow/deny lists ✅ ✅
Environment sanitization ✅ ✅
Learning mode ✅ (strace) ✅ (eslogger, requires sudo)
PTY support ✅ ✅
External deps bwrap, socat, xdg-dbus-proxy (optional) none

See platform support for more details.

Greywall can also be used as a Go package.

Documentation

Full documentation is available at https://docs.greywall.io/greywall.

Attribution

Greywall is a fork of Fence, originally created by JY Tan at Tusk AI, Inc. Copyright 2025 Tusk AI, Inc. Licensed under the Apache License 2.0.

Inspired by Anthropic's sandbox-runtime.

Release History

VersionChangesUrgencyDate
v0.3.7## Changelog ### New Features * 5581056d0523bfa244d8061008744ed9f72a0361 feat: add NixOS support (#93) High6/1/2026
v0.3.6## Changelog ### New Features * 1ab2de35d61c7bb9ef49aa3230b32efdde05215e feat(cli): --allow-path / --allow-read-path for per-session filesystem grants (#100) ### Bug fixes * 6a9556506d840924052e39c7a1d7e4d22144b838 fix(cli): keep --allow rules working under --proxy-user (#96) (#97) High5/22/2026
v0.3.4## Changelog ### New Features * efde7def88b2c29b3f7c7669f0f58873dd10a0bf feat(watch): --watch observability mode and greywatch alias (#94) * 2868d61241a7f151b73e9bcf500439f8b94541d3 feat: macos per session tmpdir (#90) ### Bug fixes * ffb2515b9b1afc92297ada64072fba7fb2748c5c fix(brew): expose greywatch alias in PATH via cask binary target (#95) * dba3c338c45e7e5bb12e2bab4256cf2dc490bce7 fix: allow terminal ioctls under landlock (#92) High5/20/2026
v0.3.3## Changelog ### New Features * 57cf0cdba0457832751718b06182bcd68999745a feat(cli): --proxy-user to inject a caller-chosen SOCKS5 username (#87) High4/23/2026
v0.3.2## Changelog ### New Features * 49842339136c465dbc1219f3f8fcc6e71403258f feat(prompt): show profile network rules in first-run prompt (#82) ### Documentation updates * fdd9f1da149e620b7ec60f08a39f7d216023f0dd docs: sync from docusaurus site (#78) ### Other work * eba81a972702525c09d80d0a5da900ff2c6676e6 Session-scoped network rules from profiles (#80) High4/14/2026
v0.3.1## Changelog ### New Features * 9973ee16912a867bbe7f3ff81e8ff4146f8d7862 feat: set SSL_CERT_FILE when greyproxy TLS interception is active (#73) ### Bug fixes * b0cec48ae57d5a4aa0e38fc4cdf1738c02395c3b fix: add macOS stub, docs, and Merge() for allowAudio (#72) (#75) * 64ca048ad3db8269350665b936304eef524dc79e fix: expose PulseAudio and PipeWire sockets for audio output in Linux sandbox (#72) High4/10/2026
v0.3.0## Changelog ### New Features * 1906877fd3b26cde69fa0ce9fb6d29b0dab32fc6 feat: add credential substitution for sandboxed environments (#63) * 09c75887eaf80de322cfe1e8fbb6e8934bc85138 feat: add ph badge (#68) * aedbfefdf80734a1a064e35c45bd631b9e7db045 feat: add profiles edit command (#64) * ff9836a51bf6202195f7437f4938f2d8f136f7bc feat: beta release channel (#38) * 3da5e8a15d27184c65633d502ee68fa6afbcdeed feat: forward host localhost ports into Linux sandbox (#42) (#43) ### Bug fixes * 2010aaf16fMedium4/1/2026
v0.2.8## Changelog ### New Features * bb4f688d312ef7fd391feb11a3fcb745d06ec366 feat: inject keyring credentials for gh/glab profiles via secret-tool (#34) * 35a8efaef18bff0874be2c8b8348fc5c3d4b76ca feat: readme seo optimization (#30) ### Bug fixes * a8bcc60c9d4624714c109fcedacc813d15729b3c fix: block D-Bus session bus to prevent sandbox escape via GVFS (#33) Low3/20/2026
v0.2.7## Changelog ### Bug fixes * 76c07b0ae8b6d1328aad3d54b95f9bdb33422a7a fix: allow TLS certificate verification in macOS sandbox (#29) Low3/18/2026
v0.2.6## Changelog ### Bug fixes * 9615dfa7251b23d70497f28ebfc4fad26914d72c fix: forward signals and drop --new-session for TUI support (#15) * a9aecf3d658ee1156704ccaefedf6558866874fa fix: use file-read-data instead of file-read* in macOS Seatbelt deny rules (#20) ### Other work * 99ae165105d76f3b072d5f5c75ad2c200c66fc97 chore: add logo (#16) Low3/13/2026
v0.2.5## Changelog ### Bug fixes * 2d17bfc01ed0299e679d67020015d7663f76b374 fix: always allow localhost bind/inbound in macOS Seatbelt profile (#12) Low3/13/2026
v0.2.4## Changelog ### New Features * 23990b3a413ff6b32623c9142d7aae0f197d85be feat: first-run UX with built-in agent profiles (#10) ### Bug fixes * 3925d672abfee197708c99005cf3a7369ccb2717 fix: add user-configured allowRead paths to Landlock ruleset (#8) ### Documentation updates * a953abad0fcf22db6f230bee16b56cea2104fccb docs: add brew installation method Low3/12/2026
v0.2.3## Changelog ### Bug fixes * 92973b49eef29938995c25d63f0395a2c8091149 fix: update cask caveats now that greyproxy auto-starts on brew install Low3/12/2026
v0.2.2## Changelog ### Bug fixes * 12dfff5ae0d3054f98e72ff9252e623872040e09 fix: strip macOS quarantine attribute on brew install * 93a674d09b15e81887918b18acb4976d4b986a8e fix: use hooks instead of preflight for quarantine removal Low3/12/2026
v0.2.1## Changelog ### New Features * 5f670ab6820ae76ebf20c6fb73a116ac67e15fc9 feat: Homebrew tap formula with brew-aware setup and check commands (#2) ### Documentation updates * dcfc338e252db8566ec161eac1d64d041483934c docs: indicate mac for installation script Low3/12/2026
v0.2.0## Changelog ### New Features * 386e91c14cf4da942d0fd9fb9026cdcd0c135295 feat: macOS sandbox support (learning mode, network proxy) (#1) ### Bug fixes * 0640eb0beefba859b0270aa4dd0518d513db43a9 fix: only show 'no learned template' message in debug mode Low3/6/2026
v0.1.4## Changelog ### New Features * cc4c54b0264c2df548cf747c060277d333f71695 feat: auto-upgrade greyproxy in setup and skip install prompt * 731d2b1ea561b186b0524cb891c7f4def8d0b74a feat: show outdated greyproxy warning in greywall check ### Bug fixes * 92cfac80dbc4e9054199139914883390286d3ba9 fix: fix remaining smoke test failures on Linux and macOS * 1065343226f881af72d1f05e2c88c532a7fb5f46 fix: improve install prompts and always install greyproxy Low3/5/2026
v0.1.3## Changelog ### New Features * fa9f72f89c091f9d3e436fc26d4fa9e8e104de6e feat: run greywall check after install and clean up output formatting ### Bug fixes * 21045b290b3a574c4f1c1d6f492faa2fc024c86e fix: allow unprivileged user namespaces on Ubuntu 24.04 CI runners * 4e491dc6b11b97d00bbbba29c9514c3de4732d0a fix: fix path typos in smoke test script * 647a3151c45c8c27ac868eb977355e49539630fb fix: resolve CI lint and test-linux failures Low3/5/2026
v0.1.2## Changelog ### New Features * 4bd8b7ed89706e79ab9d751bb0334e4d47f321e6 feat: improve greywall check with flat checklist, colors, and onboarding ### Bug fixes * 18a1d719b12bcab1c0fbf75558d5f3d8910de869 fix: resolve CI failures for lint, test-linux, and test-macos * 6bb38e7e920ce322e95e6643c6d05773a2965f61 fix: use http not https for dashboard URL ### Documentation updates * 54a3902daacac11b529b7e0c552877ad1599c406 docs: add greywall check example to README Low3/5/2026
v0.1.1## Changelog ### Bug fixes * 10bf47ebb782b4b2a511f0a560823b388b891015 fix: connect greyproxy install stdin to /dev/tty for piped installs * b268228f1fbeadca42526c5b8339bf42d1f40431 fix: read interactive prompts from /dev/tty in install script * 084d44daab48757d84fa3468faef1794d8a07735 fix: show install plan before downloading in install script * b9b8e2e50cceb5e72ce8bc6cd99c6862fb5b1e89 fix: use correct GitHub raw URL for install script ### Documentation updates * a43e5c86b7f6e14e23c847e2a4d09332Low3/4/2026
v0.1.0## Changelog ### New Features * f3ac2d72f4e97bc0ebe9823a9a4e0b1678370843 feat: ability to import claude code settings as configs (#7) * 3dd772d35a50fcbbd1ea01f212c2de7536957547 feat: add --learning mode, --template flag, and fix DNS relay * f4a5c9832893f4b4ecc831b0d24059b4f97befce feat: add `greywall check` and `greywall setup` commands * 7679fecf060809fb490dc6e20e85f9c850197568 feat: add defaultDenyRead mode for strict filesystem isolation (#24) * b55b3364af2be4c8a1f24ba27d772e90a6db00eb feat: Low3/4/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

clampdownRun AI coding agents in hardened container sandboxes.v0.1
node9-proxyThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.v1.29.0
open-computer-useMCP server that gives any LLM its own computer — managed Docker workspaces with live browser, terminal, code execution, document skills, and autonomous sub-agents. Self-hosted, open-source, pluggable v0.9.6.0
outputThe open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code describe what you want, Claude builds it, with all the best practices already in place.main@2026-06-05
openclaw-codex-agentImplement a contract-first dev workflow that plans, runs, verifies, and fixes code tasks for reproducible, auditable, and verifiable development.main@2026-06-04

More in Security

clineAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
E2BOpen-source, secure environment with real-world tools for enterprise-grade agents.
vm0the easiest way to run natural language-described workflows automatically
AgenvoyAgentic framework | Self-improving memory | Pluggable tool extensions | Sandbox execution