Claude Code, Codex, Cursor and every other coding agent keep a plain-text log of each session. Every key you pasted and every .env the agent read is in there. spillage finds them, tells you how they got there, cleans them out and stops the next one.
pipx install spillagespillage. Or uvx spillage, or brew install maximilianfeix/tap/spillage
Everything runs on your machine. Keys are only ever shown as a masked prefix and a fingerprint.
Finds the keys in every agent's logs and says whether you pasted them, a tool printed them or the model repeated them, with a link to rotate each one.
Redacts them in place without breaking the JSON your agent reads back when you resume a session.
Blocks the next leak with hooks in Claude Code, Codex and Gemini CLI: prompts with keys, reading .env, printenv. In Claude Code also as a plugin: /plugin install spillage --marketplace maximilianfeix/spillage.
Notifies you within seconds when a key lands in any agent's log, Cursor and Aider included.
Claude Code, Codex CLI, Cursor, Gemini CLI, Cline, Roo, Kilo, OpenCode, Aider, SpecStory, Qwen Code, Goose, Crush, Continue and Copilot CLI. Plus the MCP server tokens and allowed commands saved in their settings, and any folder you point it at.
SpecStory and Aider save conversations inside the project, and from there they get committed. spillage repo finds them and the keys inside, and ships as a GitHub Action and a pre-commit hook.
GitHub code search, September 2026: about 16,000 SpecStory histories and 5,000 Aider histories.
Run them too. They're built for repositories, spillage is built for what your agent kept on your disk.
| spillage | gitleaks, TruffleHog | ggshield AI hooks | |
|---|---|---|---|
| Built for | Agent logs and settings on your machine | Git repositories and their history | Live agent sessions |
| Keys already in the logs | Found, with the session, the project and whether you, a tool or the model wrote them | Found as plain text, without the conversation around them | Not covered, it scans sessions as they happen |
| Cleaning up | Redacts in place, --resume keeps working | No | No |
| Blocking the next one | Hooks for Claude Code, Codex and Gemini CLI | pre-commit, not inside the agent | Hooks for Cursor, Claude Code, Codex, Copilot CLI and more |
| Detection | 100 rules plus the exact values from your .env files | Hundreds of detectors; TruffleHog also tests whether a key is live | 600+ secret types |
| Account and network | None | None for gitleaks; TruffleHog calls the provider to verify | GitGuardian account, scans go through its API |
Sources: the gitleaks and TruffleHog READMEs and GitGuardian's AI coding tools docs, October 2026.
No dependenciesStandard-library Python 3.9 and up. Nothing to audit but the code.
No networkNo telemetry, no update check, no key validation calls.
Few false alarmsChecksums for GitHub tokens, decodable JWTs, placeholder filtering.
100 rulesIncluding the AI stack gitleaks doesn't cover: Claude Code OAuth, Supabase, LangSmith, Pinecone.
FastAbout 240 MB of real agent history in under 4 seconds on a laptop.
MIT licensedIssues and new rules welcome.