Skip to main content

Aegis

Claude Code's sandbox lets an agent read your SSH keys and AWS credentials by default. Aegis doesn't.

Two layers, both verified on real hardware.

Kernel sandbox — the agent's own shell cannot reach a denied path:

$ ! cat ~/.ssh/id_rsa
cat: /Users/you/.ssh/id_rsa: Operation not permitted

$ ! cat ~/.aws/credentials
cat: /Users/you/.aws/credentials: Operation not permitted

$ tail ~/Library/Application\ Support/Aegis/denials.log
kernel denied file-read-data /Users/you/.ssh/id_rsa to cat(pid 41560)
kernel denied file-read-data /Users/you/.aws/credentials to cat(pid 42180)

MCP proxy — same tool, same file, with and without Aegis in front:

direct to the server:   allowed: TOKEN=proof-env-secret
through aegis proxy:    AEGIS DENIED: read_text_file
                        Reason: path matches deny rule '.env'
                        Rule: deny_paths

What it does

Sits between your AI coding agent and your machine:

  • Deny by default on every tool call
  • Kernel sandbox on subprocesses — cat .env can't bypass it
  • Tamper-evident audit log — hash-chained, integrity checked by aegis doctor, and checkpointed from outside the sandbox under a key the sandbox can't read or write
  • Outbound requests checked before they're made
  • Secrets never reach the MCP server

Install (macOS Apple Silicon)

New here? docs/getting-started.md is the step-by-step path, including the two questions that default to No.

Followed earlier instructions that said aegis-mcp? That package is not Aegis — it is an unrelated project installed under the same import name, aegis. Remove it first:

python3 -m pip uninstall aegis-mcp

If aegis-sandbox is already installed, that uninstall also deletes two of its files, so reinstall it afterwards: python3 -m pip install --force-reinstall aegis-sandbox.

python3 -m pip install aegis-sandbox
aegis init      # detects Claude Code / Cursor, asks a few questions
aegis doctor    # proves the boundary is actually in place

Upgrading? Re-run aegis init. Your policy.json is yours and is never rewritten behind your back, so a new sandbox domain does not appear on its own — and without the OAuth token endpoint a sandboxed client stops working when its token expires. aegis init offers the new hosts; accepting is one keystroke.

Prefer an app? Download the .dmg

SHA256: bcccaa957fd3a0a15413eb1207a012f0328e309d078e7b7f2af853915e64c6dc

Unsigned build — right-click the app → Open the first time (macOS will warn about an unidentified developer, that's expected). Or build from source.

What it does NOT do

  • Does not stop prompt injection
  • Kernel escape defeats the sandbox
  • The audit database is still writable from inside the sandbox. Checkpoints make tampering with already-checkpointed history detectable — not impossible, and the newest rows aren't covered yet
  • A sandboxed client can't log in at all. Log in to Claude Code before aegis init; aegis doctor fails if a wrapped client isn't logged in
  • A sandboxed client can't renew an expired login token — run it once outside the sandbox to refresh
  • The sandbox can still read your OAuth token from the Keychain
  • Tool results larger than 16 MiB are refused
  • No external security review, no certifications
  • Not audited by anyone but me — read the source, that's why it's MIT

Full threat model: THREAT-MODEL.md

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aegis_sandbox-0.8.1.tar.gz (156.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aegis_sandbox-0.8.1-py3-none-any.whl (169.5 kB view details)

Uploaded Python 3

File details

Details for the file aegis_sandbox-0.8.1.tar.gz.

File metadata

  • Download URL: aegis_sandbox-0.8.1.tar.gz
  • Upload date:
  • Size: 156.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for aegis_sandbox-0.8.1.tar.gz
Algorithm Hash digest
SHA256 0b0a8468521d17a518cc6d830d1a46a5fb4ef7ecd30111fcac80f0bb59925f52
MD5 a9ee76f1e39114d515fbdcc03ebe8cf5
BLAKE2b-256 6cfc35a7b264d17e52c41997eb4ca7f24b54e5a7fddbcb5a1b1db075315649bd

See more details on using hashes here.

File details

Details for the file aegis_sandbox-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: aegis_sandbox-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 169.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for aegis_sandbox-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00c0e9098c0c4114b7ced23e5ac2c2baf2de7e3fbce9709acb63b4d7ce8ee325
MD5 8a853223d0f715b3633c38f4043fc39e
BLAKE2b-256 77640b13e47a087d1871e839a0119081c3769f944d1c5113c35582070a13ca21

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 files

0.8.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page