What it is for
- An agent that makes a mistake, such as deleting the wrong directory, pushing to the wrong branch or running a write against production.
- An agent steered by prompt injection in code, an issue or a web page. Piper does not try to detect injection. Its rules apply to the action, whatever the reason the agent asked for it.
- An agent overstepping its project: reading your home directory, editing another project, reaching services it has no business with.
The layers
Each session runs in its own container
hole starts the session in a Docker container. Mounted: the project (read-write) and the agent's configuration; files and libraries you configure; and the worktrees the session uses. Your home directory is not mounted. Paths you exclude, for example .env files and keys in the example settings, are masked inside the container.
A gateway filters DNS and outbound connections against your hole settings and denies the rest. Piper's "unfiltered network" option turns that filter off for a session.
Inside, the agent has passwordless sudo. Docker for the agent, when you allow it, is a separate Docker-in-Docker sidecar; hole's generated configuration does not mount the host's Docker socket (your own hole settings could), and Piper removes the host's Docker API port from what the gateway allows.
Actions outside the sandbox go through Piper
Git on the host, GitLab and GitHub, other projects' files, databases, HTTP requests and other sessions are tools the agent calls through Piper (an MCP server). Piper checks each call on the host and, when the rule says so, shows a card: the session, the action, a risk level, the details (git arguments, SQL, a diff) and the rule that asked.
A card nobody answers is a refusal. You can allow once or for the rest of the session. Turning a rule off approves that action on its own, and it is still written to the audit log.
Commands the agent runs inside its container do not go through Piper. Layer 1 contains them.
Checks before and after a sandbox starts
Piper refuses mounts of its own state and code, keeps the sandbox away from Piper's own port and the host's Docker port, and rejects project settings that would swap the agent image. By default, git on the host runs with hooks and local-path remotes off. Optional guards strip secrets from the environment, scan for unexcluded sensitive files, review changes to a project's .hole/settings.json, and give each session its own ~/.claude and ~/.codex.
A record, and a GUI only you can open
~/.piper/audit.log records session starts, checks, every decision (also automatic approvals and timeouts) and the outcome of each Piper tool call. It does not record every command inside a container.
The GUI listens on 127.0.0.1 only and needs a token; non-loopback addresses are refused. Remote access is opt-in, through tailscale serve, with its own revocable token and an optional list of allowed tailnet users.
A fresh install
The first-use preset is Minimal. It is meant to get in the way as little as plain hole would, while keeping the boundaries that matter.
Asks you
- HTTP to test, production or unknown hosts
- reading production data, any write to a test or production database
- allowing a new network domain, changing Piper settings
- editing another project's files that run on the host, such as hooks and build files
Does on its own
- commits and pushes
- merges and CI jobs
- other edits in other projects through Piper
- stopping and starting sessions
~/.claude and ~/.codex (memory, settings, history, login), and changes to a project's sandbox settings are not reviewed. Recommended adds cards for push, merge, CI jobs and other projects' files, and hides secrets. Strict turns on every guard, including a separate ~/.claude and ~/.codex per session. Every switch is in Settings › Security.What it does not cover
- Anything inside the sandbox. The agent can edit or delete project files and run any code in its container without asking. Commit early, and use worktrees for work you may throw away.
- What the agent sends to its model. The gateway filters where traffic goes, not what it contains. Whatever the agent can read can reach Anthropic or OpenAI, and any other host you allowed.
- What you approve. A card shows exactly what will run; after you allow it, Piper runs it.
- Container escapes. The boundary is Docker on a shared kernel, not a separate virtual machine. Keep Docker up to date.
- Extensions you trust. An extension's Python code runs inside Piper with its permissions. The optional IntelliJ IDEA bridge forwards tools to your IDE on the host.
- Guards you turned off, writable caches you share with host builds, and the security of the host machine itself.
Reporting a vulnerability
Please report privately through GitHub: Security › Report a vulnerability, with steps to reproduce and synthetic data, never real tokens or transcripts. The policy is in SECURITY.md. Releases and their signing are described in the code signing policy.