AI & Agents

Claude Code’s ‘Don’t Ask Again’ File Has Leaked Secrets Into 1,122 Public GitHub Repos

Leave a comment

When you hit “Yes, and don’t ask again” in Claude Code, it can save the exact command you approved to .claude/settings.local.json. That includes any password or token you typed into it. Apiiro found 1,122 public copies of that file with at least one secret, The Hacker News reports. One company confirmed its leaked key was live.

Why it slips out

Claude Code adds the file to your global git excludes on that one machine, not to the project’s .gitignore. So it doesn’t follow the repo to another clone or another machine. Common scanners missed a lot of them too: gitleaks caught 564, TruffleHog 643, and 215 slipped past both.

What to do

  • Search your repos and git history for .claude/settings.local.json and .claude/settings.json
  • Rotate every secret those files ever held first, then clean up
  • Stop typing secrets on the command line. Use env vars or a secrets manager

My take

Convenience features that write secrets to disk in plain text need garlic. Add the file to every project’s .gitignore today.

God Bless, and Needs Garlic!

References & Further Reading

Subscribe (RSS) Follow AI & Agents via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.