Claude Code's "Don't Ask Again" setting left secrets in 1,122 public GitHub files
Apiiro says commands developers approved in Claude Code, secrets included, were saved word-for-word into project settings files that ended up in public repositories.
Passwords and API keys that developers typed into commands they approved in Claude Code are sitting in public GitHub repositories, according to software security company Apiiro.
The mechanism is the approval prompt. When someone picks "Yes, and don't ask again," Anthropic's coding assistant can write the command into a project settings file exactly as typed, secret included. If that file gets committed and pushed to a public repo, the credential is readable by anyone.
Apiiro said yesterday that it found 1,122 public copies. The report, as summarised by The Hacker News on 7 November 2026, doesn't break those down by repository, by credential type, or by whether any of the exposed keys were still live. It also doesn't say whether Anthropic has changed the behaviour or plans to.
The practical question for anyone running Claude Code is whether a settings file in a project has ever been committed. Checking git history for the file, and rotating anything that turns up in it, is the obvious first step. Secrets already pushed should be treated as spent even if the commit was later removed.
We'd also look at how much of this is a tooling problem and how much is a habit problem. Approving a command once and forgetting it is the whole point of the setting.
Sources
- Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHubPrimarythehackernews.com
If something here is wrong, tell us. Every correction is listed on the corrections page.
Don’t Just Read About Cyberattacks. Learn How They Work.
Go beyond the headlines. Explore hands-on cybersecurity labs, understand real-world vulnerabilities, and build practical security skills with HackZoneLabs.
Start Learning