AgentScrub — Secrets Cleaner for Coding Agent History
Automatically scan and redact leaked API keys from coding agent histories so AI-assisted dev doesn't silently leak secrets.
- Problem
- Developers are discovering that their coding agents (Claude Code, Cursor, OpenHands) store plaintext API keys, tokens, and passwords in their local history files — because conversations, code snippets, and shell commands are all logged. These files often live in hidden folders in the home directory, easily synced to the cloud or exposed on shared machines. One developer said 'I found API keys in my coding agent history so I built Agent Scrub,' confirming the problem is real and widespread, yet existing tools barely address it.
- Solution
- A local-first CLI tool that automatically scans all major coding agents' local history stores (JSONL, SQLite, log files) and detects secrets using regex and entropy analysis. It then offers interactive cleanup: redact or delete selected entries with one command, with backup and restore. It can also hook into pre-commit or cron to prevent future leaks.
- Users
- Developers using AI coding agents, security engineers, and teams working in shared or synced directories.
- MVP
- Parse history formats for 2-3 major agents; secret detection via regex + entropy; interactive selection to redact or delete entries; automatic backup of original files; one-line install via npm / brew.
- Revenue
- Core open-source and free; monetize through GitHub Sponsors or a paid enterprise version (central team scanning dashboard, compliance reports, Slack alerts).
- Why now
- AI coding agents are rapidly proliferating, but the security risks of their history are still overlooked. An indie developer can cover multiple agent formats quickly, outpacing big players in responding to new tools.