
How Claude Code's "don't ask again" turned an approved command into a saved rule holding the password, what 1,122 public copies of that file exposed, and the artifact inventory a product team can use to find the same failure inside its own agent.
.claude/settings.local.json, inside the project folder. The rule is the command. The password is inside the rule..claude/settings.local.json at the root of the git repository, resolved through worktrees to the main checkout. From then on it applies to any session anywhere in that repository, including sessions started in subdirectories 3.
npm test *, so no secret becomes part of it. When the prompt can only offer the literal command, the literal command is what gets saved. Screenshot from Claude Code's permission documentation.Bash(npm test *) carries no secret. A literal Bash(PGPASSWORD=… psql -h …) carries the password, because the password is in the command.Bash(python:*) that amount to the same thing in practice. The share was growing about five points every five weeks. Beyond allow rules, 62% of users had used bypassPermissions or clicked "don't ask again" on Bash, and 25% of interactive sessions started in bypass mode 4..gitignore, so nothing in the repo marks it as private, and a second machine, a container, or a copied folder has no protection at all 1.
PGPASSWORD=, sshpass -p or mysql -p is an ordinary word inside an ordinary command line, and both tools let it through 1.
.claude/settings.local.json, and that it held his whitelisted commands complete with the secrets inside them. He wrote a scanner and found sensitive material in the history of about 2.4% of repositories containing AI tool configuration directories, on a 100-repository sample, with findings verified against the providers rather than guessed from entropy 9..claude/settings.json that teams commit deliberately, and found 298 files with a real secret out of 76,011. Agent chat transcripts held 120 secret-bearing files across 87 repositories. Memory files held 9. Handoff and deploy notes held 33, a third of them written by the agent itself. VS Code Copilot auto-approve settings held 9. Outside GitHub, 126 of 31,053 Hugging Face Spaces carry the file, and 2 of 69 public copies on GitLab.com held a secret 1.--no-verify, keep working without checking in. Seven in ten of those lines apply unconditionally rather than only inside CI. Skills that run shell code, install packages or use sudo carry 1.7 to 1.8 times the odds of containing one, and they do not compensate with more tightening elsewhere. Public skill scanners caught at most 46% of the directives they were tested against 12.User-Agent header of web requests made during searches, so third parties were receiving an address that later attracted scam mail. The issue has since drawn 987 reactions and 106 comments, and it remains open 13.@author tags, because it had no context about the signed-in account. The team fixed that by putting the account email into the model's context. Then, when Claude wrote a command itself, such as a curl call, it sometimes put that email into the User-Agent as a contact address, because some sites ask agents to supply a contact 2.curl-style command containing the email. It does not cover every case, notably a script Claude writes and then runs on its own. The permanent fix, removing the email from the model's context, is slated for a release the engineer expected early next week. The stable channel was still on 2.1.311 at the time of that reply 2.| Artifact | What it holds | How it travels | Design lever |
|---|---|---|---|
| Permission allowlist | The literal approved command, credential included | Committed by the agent; then clones, forks, history, images, archives | Persist a pattern, never the invocation |
| Shared project settings | Team-committed allow rules | Committed on purpose, read by everyone | Review it like code; assume it is public |
| Agent transcripts | Whole conversations, commands and output | Committed or exported by users | Exclude by default; redact on export |
| Agent memory files | Notes the agent wrote for itself | Committed with the project | Treat as a .env, not as documentation |
| Handoff and deploy notes | Agent-written runbooks | Committed, often by the agent | Scan on write, not on push |
| Model context | Account identity, org, repo visibility | Every request, and into tool calls the model writes | Keep identity out of anything that can reach the network |
| IDE auto-approve settings | Tool permissions | Committed or synced | One policy across every harness |
git rm --cached and add it to the repository's own .gitignore. Open the file on each laptop and delete every rule containing a secret. Rewrite any command that needs a credential to read $DB_URL from a secrets manager, so the rule records the variable name. Approve patterns rather than single commands.PGPASSWORD= and see whether it fires. If it does not, it will not catch the most common case in this dataset 1.news.ycombinator.com
code.claude.com
arxiv.org
news.ycombinator.com
news.ycombinator.com
ironpeak.be
arxiv.org
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.