Trusence Every claim has a source
Last updated 8 November 2026 Search Türkçe
Security

Claude Code's approval file exposes passwords and keys in 1,122 public GitHub repositories

Deleting the file does not fix the leak, because older commits and forks keep the saved secrets, so affected credentials need rotating first.

Security firm Apiiro reports that Claude Code can store full approved shell commands, including typed-in passwords and API keys, in a project file called .claude/settings.local.json when a user chooses to stop being asked. Its search of public GitHub found 104,185 copies of the file across 103,617 repositories, and 1,122 of them contain at least one secret, totaling 1,379 distinct values. The researchers did not test whether these credentials still work, though one notified company confirmed its key was live. Deleting the file does not remove exposure, since older commits and forks keep the data, so the advice is to rotate every affected credential first, then clean up and approve command patterns instead of single commands.

Why it matters

Developers who used the don't-ask-again option in Claude Code may have stored passwords and API keys in a project file that is now visible in public repositories. Removing the file from a project is not enough, since git history and forks keep older copies, so the exposure persists until the credentials themselves are replaced. The finding also shows that Claude Code is the only one of 16 compared coding agents confirmed to save full approved commands in a project file by default, which makes it an outlier in how it handles sensitive data.

Sources · 1