Claude Code's "don't ask again" file exposed passwords and keys in 1,122 public copies on GitHub
Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
Research by security firm Apiiro found that after a user selects "don't ask again," Claude Code writes the full command, including any passwords and API keys in it, in plaintext into .claude/settings.local.json within the project, and 1,122 of these files in public GitHub repositories contain at least one key. The researchers scanned 104,185 copies across 103,617 repositories; about 1.1% contained keys, 1,379 distinct keys in total, of which 379 were database passwords, 23 were AWS keys, and 42 were GitHub, GitLab and npm tokens, involving 63 organizations. Deleting the file does not eliminate the leak, as old versions remain in git history and forks; the researchers recommend first rotating all credentials that appeared in the file, then cleaning up.
The article lays out the path by which Claude Code writes approved commands containing secrets into project files and leaks them, and gives concrete steps for investigation and credential rotation.