AI & Tech

Claude Code is accidentally exposing secrets all over GitHub

That's the finding of AI security researchers at Apiiro, who discovered thousands of secrets, including database passwords, API tokens, and root logins, amid Claude Code settings files embedded in GitHub repositories.

✦ Extractive summary — built from the sources' own reporting•From 1 source•1 min read•Updated November 9, 2026, 5:24 PM UTC
Key points
  • The leak stems from the way Claude Code handles user approval for automated shell commands.
  • When a user chooses the "Yes, and don't ask again" option to approve running a command, that choice gets stored as part of a rule in the local ".claude/settings.local.json" file on the user's computer.
  • That rule is sometimes coded as a pattern, but the command itself is often written to that settings file as is, including any sensitive information that may be embedded within it.

Claude Code is leaking sensitive information on public GitHub instances thanks to a partial oversight in the way its settings files are handled.

And Anthropic notes in its Claude Code documentation that this particular settings file gets added to the developer's global.gitignore list, which usually prevents it from being shared publicly.

Additional details
  • This isn't really a significant security issue if the settings file stays on the user's local machine (assuming that machine doesn't become compromised itself, of course).

How this summary was made: extractive summary — built from the sources' own reporting. It is drawn only from the reporting of the sources listed below — read the originals for full detail. How we summarize →

Advertisement

Every article behind this summary — 1 article from 1 outlet