Published
Claude Code "Don't Ask Again" Leak: Check Your settings.local.json Now
Apiiro found 1,122 public GitHub copies of Claude Code's local settings file holding real secrets. Here is why it happens and how to fix it in a few minutes.
1. What happened
When you approve a command with "Yes, and don't ask again", Claude Code saves that exact command to .claude/settings.local.json. If the command contained a password or key, the file now does too.
2. The numbers
Apiiro found 104,185 copies in 103,617 public repos. 1,122 held at least one real secret, 1,379 distinct secrets, including 379 database passwords and 23 AWS keys. 215 of those files were missed by both gitleaks and TruffleHog.
3. Check your repos
Search every repo you own for the file, including its history.
git log --all -- .claude/settings.local.json
4. Rotate first
Change every password, token or key that was ever in the file before you delete it. Git history and forks keep old copies.
5. Stop tracking it
Remove it from Git and ignore it from now on. Keep secrets in environment variables and approve command patterns, not literal commands.
git rm --cached .claude/settings.local.json && echo .claude/settings.local.json >> .gitignore
Sources
iTnews (Apiiro research), November 2026; Claude Code settings documentation.
FAQ
Was Anthropic hacked?
No. Developers committed a local settings file that held secrets they had typed into approved commands. Anthropic says Claude Code gitignores it by default.
Is deleting the file enough?
No. Rotate the secrets first; old versions stay in Git history and in any forks.