Claude Code "don't ask again" file leaks passwords and keys: 1,122 public copies of .claude/settings.local.json on GitHub hold secrets
Anthropic Claude Code (.claude/settings.local.json permission allow rules)
Sponsored
Brought to you byTinkerer Club
The private club for people who own their servers, run their own AI, and pay $0/month for software.
When a Claude Code user picks "Yes, and don't ask again" on a shell command, Claude Code can save the exact command, including any password or token typed into it, as an allow rule in .claude/settings.local.json in the project. Claude Code adds that file to the user's global git excludes on one machine, but never to the project's own .gitignore, and does nothing for a file that is already tracked. Apiiro researchers Shmulik Cohen and Matan Giladi published research on Nov 5 2026 that found 104,185 public copies of the file on GitHub, 1,122 of them (about 1.1%) holding at least one secret, 1,379 distinct secrets in total, including 379 database passwords, 43 SSH logins, 42 GitHub/GitLab/npm tokens and 23 AWS keys. Counting git history, the shared .claude/settings.json and saved agent chat logs, they counted 2,539 secrets across 1,994 repositories. Apiiro did not test the credentials, but one notified company confirmed its key had been live. Earlier bug reports about the behavior were closed by an automated bot without a reply from Anthropic.
Why this severity: No CVE or score. Exposure risk rather than a demonstrated breach: Apiiro did not test the secrets, but one company confirmed a live key, and more than a third of the found secrets open a database directly.
- Started
- Nov 5, 2026
Affected
- Claude Code: saving exact approved Bash commands to .claude/settings.local.json is documented default behavior (reproduced by Apiiro with current models)
Fixed in
No fixed release yet
Timeline4
The Hacker News covers the research; the four related Claude Code bug reports the researchers cite have all been closed by a bot with no reply from Anthropic.
Apiiro publishes the research: 1,122 of 104,185 public .claude/settings.local.json copies hold secrets, 2,539 secrets across 1,994 repositories overall; gitleaks and TruffleHog together missed 215 of the files with secrets.
Apiiro finishes collecting public GitHub data (Nov 1 to 3) and notifies affected organisations on Nov 2 and 3; one company confirms its exposed key had been live.
A Claude Code user files a bug report that approved commands with API keys and tokens are stored word for word in settings.local.json; an automated bot later closes it as not planned after 60 days without activity.
Advisories1
News & write-ups3
- Claude Code's "Don't Ask Again" File Exposes Passwords and Keys in 1,122 Public Copies on GitHubThe Hacker News · Nov 7, 2026
- Claude Code approval files found exposing company secrets on GitHub, says Apiiro researchersiTWire
- [BUG] Sensitive tokens stored in .claude/settings.local.json and not ignored by git by defaultGitHub
Get an email when a new major security incident drops. No spam, unsubscribe any time.