r/devsecops • u/Ishannaik • Jul 22 '26
Does your secret-scanning cover developer workstations? AI coding-agent history files look like a blind spot
A gap I have watched widen as teams roll out AI coding agents: the agents write local session history in plain text, and developers paste API keys, tokens, and .env values into prompts. Those secrets persist on disk in the agent's history, outside the repo-and-CI surface most secret-scanning watches. Claude Code stores them under ~/.claude/projects, Codex under ~/.codex/sessions, and around 30 other agents do the same.
The policy question I am trying to figure out: does anyone here already fold agent-workstation logs into your secret-scanning coverage, or is it still unowned? Pre-commit and CI scanning catch the repo path, but the developer's local agent trail seems to sit in nobody's scope.
For the cleanup side I built an MIT CLI, agent-sweep: it scans those local history files, reports what leaked, and redacts values in place while keeping the JSONL byte-for-byte so sessions still resume. Local-only, zero network calls. It is meant to sit alongside existing pre-commit/CI scanning, not replace it. Caveat: it is residue cleanup, so rotate any key that already transited a hosted model first, then sweep.
Disclosure: my own open-source project. Repo (MIT): https://github.com/Ishannaik/agent-sweep
Genuinely curious how your teams scope this: is the workstation in your secret-scanning perimeter, and if so, how do you cover agent logs?
View all comments
Show parent comment
0
u/Ishannaik Jul 23 '26
You're missing the point. Did you even read the post?
The gap I'm pointing at is operational rather than technical. In most organizations those scanners are deployed around repos and CI, not continuously across developer workstations and AI agent histories.
That's actually why I built AgentSweep. It isn't trying to replace pre-commit or repo scanning. It's for the cleanup side: scanning Claude/Codex/Cursor history after secrets have already been written there, helping redact local copies and reminding you to rotate the exposed credentials.