Security
Apiiro says Claude Code’s ‘don’t ask again’ approvals saved passwords and keys in settings files found in 1,122 public GitHub copies, while an Anthropic engineer is reported to say the file is meant to stay local
Apiiro found secrets in 1,122 of 104,185 public Claude Code settings.local.json copies. Anthropic reportedly says it should stay local. Rotate exposed secrets.
Disclosure: Anthropic makes Claude, which helps draft articles on this site. Security firm Apiiro reported on November 5, 2026, and The Hacker News covered on November 7, that choosing “Yes, and don’t ask again” in Claude Code can save the approved command, word for word, in a project file named .claude/settings.local.json. When the command contained a password or key, the secret was saved with it. Apiiro found 1,122 public copies of that file holding at least one secret, out of 104,185 it scanned, so about 1.1 percent. If you use Claude Code, check your repositories and rotate any exposed secret.
The essentials
- The mechanism: per Apiiro as relayed by The Hacker News, the “don’t ask again” choice stores the exact command as an allow rule. If a credential was typed inside that command, it ends up in plain text in .claude/settings.local.json.
- The numbers: Apiiro scanned 104,185 public copies in 103,617 repositories; 1,122 held at least one secret, 1,379 distinct secrets in all, including 379 database passwords, 43 SSH logins, 42 GitHub, GitLab or npm tokens and 23 AWS keys, per an aggregator summary.
- The wider count: adding older file versions, the team-shared settings.json and saved agent transcripts, Apiiro puts the total at 2,539 secrets in 1,994 repositories, affecting 63 organizations, per The Hacker News and GBHackers.
- Who commits the file: in 539 of 1,105 traced repositories, a commit listing Claude as co-author changed the file, which Apiiro takes to mean Claude often commits it. Boris Cherny of the Claude Code team is reported, via SaaSCity, to have said on Hacker News that the file is meant to stay local, is gitignored when Claude Code creates it, and that in these cases it was created manually and checked in.
A disputed point: is the file protected from commits?
Sources disagree on how the file is kept out of Git. The Hacker News says Claude Code never adds it to the project’s own .gitignore. Hackerposts says it is added to the user’s global git excludes on first write, which would not protect a teammate’s clone. Cherny’s reported answer is that it is gitignored when created. We could not test these claims, and we did not read Apiiro’s write-up, which Hackerposts says was not publicly reachable at publication.
What to do if you use Claude Code
Check .claude/settings.local.json and .claude/settings.json in your repositories and their Git history, since deleting a file does not remove old versions or forks. Treat any secret found there as compromised and rotate it first. Avoid typing credentials inline in commands you approve; use environment variables or a secrets manager instead. This is general hygiene, not a statement that every Claude Code user is affected.
What is not established
- How many private repositories are affected: not measured; the study covers public GitHub only.
- Whether Claude Code ignores the file by default: sources disagree.
- Whether the leaked secrets were abused: not established.
- Apiiro’s original write-up: not read directly.
Summary table
| Point | What is stated as of November 7, 2026 | Source |
|---|---|---|
| Reported by | Apiiro (Nov. 5–6); The Hacker News (Nov. 7) | The Hacker News |
| Files scanned | 104,185 public copies, 103,617 repositories | The Hacker News |
| Files with a secret | 1,122 (about 1.1%), 1,379 distinct secrets | The Hacker News |
| Wider total | 2,539 secrets, 1,994 repositories, 63 organizations | GBHackers |
| Anthropic’s reported view | File meant to stay local; checked in manually | SaaSCity (relaying Hacker News) |
FAQ
Does Claude Code leak secrets on its own?
Per Apiiro, secrets typed inside commands you approve with “don’t ask again” can be saved in a local file; they only become public if that file is committed and pushed.
What should I do first?
Rotate any credential that may have been in an approved command, then check your repositories and Git history for the file.
Is 1,122 the total number of leaks?
It is the number of public file copies with secrets. The wider study count is 2,539 secrets in 1,994 repositories.
Method and limits
Sources checked on November 8, 2026. Disclosure: Anthropic makes Claude, which helps draft articles on this site. We read The Hacker News, GBHackers, Hackerposts and SaaSCity as search extracts; Apiiro’s write-up and the Hacker News thread were not read directly. Findings are Apiiro’s. Not security or legal advice.
Sources
- The Hacker News: Claude Code’s “Don’t Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub (verified 2026-11-08)
- GBHackers: Claude Code’s “Don’t Ask Again” Feature Exposes 2,539 Secrets Across 1,994 GitHub Repositories (verified 2026-11-08)
- Hackerposts: Claude Code approvals expose secrets in 1,122 public repos (verified 2026-11-08)
- SaaSCity: A Hidden Settings File Put Real Secrets in 1,122 Public GitHub Repos (verified 2026-11-08)
Spotted an error in this article? Report it · Our corrections policy