Your coding agent leaked the key. It was only following orders. Apiiro found 2,539 real secrets across 1,994 public GitHub repositories by scanning 104,185 public copies of Claude Code's .claude/settings.local.json, the file where the agent stores commands users have approved. The exposed credentials included a production Azure Postgres password, a Square production token and the owner password of a medical-records database, and The Hacker News reported that half of the affected files had sat on default branches for more than 200 days, with forks carrying copies that survived deletion of the original. Two popular open-source secret scanners missed 215 of the leaked files, and Apiiro advised security teams to treat .claude/, .cursor/, .gemini/ and .specstory/ directories like a .env file. Your coding agent leaked the key. It was only following orders. We’ve all done it. Your coding agent asks, for the fourteenth time today, whether it can run a command you’ve already approved thirteen times, and you click the button that makes the question go away. It’s one of the small joys of working with agents, right up there with watching a test suite go green on the first try. It turns out that button has a very good memory. Earlier this month, security firm Apiiro https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again went looking through public GitHub repositories for one of the files where an agent keeps the commands you’ve approved, Claude Code’s .claude/settings.local.json . Out of 104,185 public copies, 1,122 held a real secret, and once you add git history, shared settings files, and saved agent chat transcripts, the count reached 2,539 secrets across 1,994 repositories. The list included database passwords, cloud keys, API tokens, and SSH root logins, among them a production Azure Postgres password, a Square production token, and the owner password of a medical-records database. One company Apiiro contacted confirmed that its key had been live. The Hacker News https://thehackernews.com/2026/11/claude-codes-dont-ask-again-file.html reported that half of these files had been sitting on default branches for more than 200 days, and that forks carried copies of the same secrets, so deleting the original file didn’t make them go away. It’s careful research, too: Apiiro traced files across more than 100,000 repositories, checked git history and forks, benchmarked the scanners teams rely on, and contacted affected companies. How a password ends up in a settings file Nobody sets out to commit their database password. What happens is much more ordinary. You ask the agent to check something in the database or call an API, it reads the credential it needs from your project’s config, and it proposes a perfectly reasonable command with that credential filled in. You approve it for good, and the agent dutifully saves the exact command as an allow rule illustrative values : { "permissions": { "allow": "Bash PGPASSWORD=EXAMPLE-ONLY psql -h db.example.com -U app ", "Bash curl -H \"Authorization: Bearer sk-live-EXAMPLE-ONLY\" https://api.example.com/v1/orders " } } The file is meant to stay on your laptop, but nothing in the repository says so, and a broad git add doesn’t ask. Secret scanners also have a hard time with this, because a password sitting after PGPASSWORD= looks like any other word to a tool that searches for known key formats. When the researchers ran two popular open-source scanners over the leaked files, 215 of them got past both. This study happened to look at one agent’s settings file, and the team behind it has said it’s working on secret scanning. But the pattern isn’t about one tool. Every agent harness writes things down: approved commands, chat transcripts, memory files, generated scripts. That’s why Apiiro’s advice to security teams covers .claude/ , .cursor/ , .gemini/ , and .specstory/ directories alike, and suggests treating all of them the way you’d treat a .env file. When a Postman engineer ran Passport’s Lens traffic inspector on their own laptop for three weeks, it found 22 distinct secrets going out https://blog.postman.com/what-passport-found-in-3-weeks-of-ai-agent-traffic/ , and only four of them came from the project’s .env . An agent is very good at taking what you give it and putting it to work. If you give it a working key, that key ends up in whatever it builds, and you can’t count on every one of those places staying private. Give the agent something not worth stealing Apiiro’s recommendations are sound: rotate first, ignore the local file, keep secrets out of commands, approve patterns instead of exact strings, and scan agent folders. But taken together, they ask thousands of developers to handle credentials perfectly, many times a day, and this research shows how well that holds up at scale. A sturdier fix is changing what the agent holds in the first place, which is the idea behind Passport from Postman https://docs.usepassport.ai/passport/get-started/overview . With Passport, your project’s config holds a secret reference, something like {{vault: