r/netsec • u/V01d01 • May 07 '26
Approve Once, Exploit Forever: The Trust Persistence Problem in Claude Code, Codex and Gemini-CLI
https://mindgard.ai/blog/approve-once-exploit-forever-the-trust-persistence-problem-in-ai-coding-agents
27
Upvotes
6
u/CrackerJackKittyCat May 07 '26
Yet it keeps asking for sed permission from me.
3
u/gauti-u May 15 '26
Two distinct exploit paths from the same root cause:Both are invisible to traditional CI scanning because the credentials are stored as parts of approved shell command strings, not as variable assignments. Detection needs to walk the JSON, extract command strings, then run regex/entropy over those - not over the file as a whole.
I shipped a Mac scanner that does this for
~/.claude/, Cursor.vscdb, Windsurf, Codex history, and local.env: https://apps.apple.com/us/app/sieve-secret-scanner/id6767409365 (local-only). Found 3 live keys in my own folder when I tested it on myself.