"Yes, and don't ask again" put passwords into 1,122 public GitHub files
AI · Nov 2026 · 8 min read
Approve a command in Claude Code with "don't ask again" and the whole command, password included, is saved to a settings file in your project. Then it gets committed. Researchers found 1,122 of those files on public GitHub. Here's the five-minute check and the habits that stop it.
Coding agents ask before running a command. Click "Yes, and don't ask again" and Claude Code remembers your answer by writing an allow rule into .claude/settings.local.json in your project, so it never has to ask twice.
It writes the whole command. If you typed a database password, an API key or a token into that command, it's now in the file. And unless the file is ignored, it gets committed with everything else.
Researchers at Apiiro went looking on public GitHub. The Hacker News thread about their write-up is titled "Claude Code's 'Don't Ask Again' exposes passwords in 1,122 public GitHub files" (Hacker News , linking Apiiro ).
Nobody wrote insecure code. A convenience feature quietly turned a chat into a credential store.
One click, one committed file.
Two problems in one file
The leaked secrets are the obvious problem. The quieter one is what the allow list says about the agent. As quoted in the thread, "5% allow any shell command outright, and another 43% have interpreter rules like Bash(python:*) or Bash(node:*)". An interpreter rule is effectively any command: anything the agent wants to do can be written as a Python or Node one-liner.
So the file is two things at once: a list of credentials and a list of everything your agent may do without asking you. Both belong to you, not to your repository.
The Claude Code team responded in the same thread. Boris Cherny: "Historically Claude Code has not done secret scrubbing," adding that the team is looking at what it can do. He also argued that auto mode, which decides per action instead of keeping a growing allow list, is "significantly safer than manual approval in practice".
It isn't just one tool
GitGuardian's 2026 secrets report found that commits made with Claude Code assistance leaked secrets at 3.2%, against a 1.5% baseline, and counted 24,008 unique secrets in MCP configuration files, 2,117 of them still valid (GitGuardian ). Agent configuration has become a place where keys collect, and most secret-scanning habits were built before it existed.
Five minutes, today
Search your repositories for .claude/settings.local.json. On GitHub, code search with path:.claude/settings.local.json inside your organisation finds them. Add .claude/settings.local.json to .gitignore in every project and in your global gitignore. Read the file. Remove interpreter wildcards such as Bash(python:*) and anything you wouldn't approve again today. Rotate every key or password you find in it. Deleting the file doesn't remove it from git history or from anyone who cloned it. Stop putting secrets inside commands. Use environment variables or a secrets manager, so the approved command contains a variable name, not a value.
Also check: Run a secret scanner as a pre-commit hook so the next one is caught before it's pushed, and add MCP config files to its scan paths. GitGuardian's numbers suggest that's where the next leak is.
This is the fifth door from Vibe coding ships open doors : the secret you pasted into the chat. It just found a new way out.
Checked 16 November 2026: Apiiro's own page blocked automated reading, so the 1,122 figure is from the thread title and the percentages are as quoted by a commenter from the article. Cherny's quotes are from his replies in the thread. GitGuardian figures are from its report.
References
Takeaways
"Don't ask again" saves the full approved command, secrets included, to .claude/settings.local.json. Researchers found 1,122 such files on public GitHub. Many allow lists permit any shell or interpreter command, so the file is also a map of your agent's power. Gitignore the file, rotate what's in it, and keep secrets out of commands.
All notes · Shehzad Aslam