"Don't ask again" in Claude Code can save passwords in plain text
Apiiro found 1,122 public GitHub copies of .claude/settings.local.json holding secrets, all saved from approved commands.
When you pick "Yes, and don't ask again" on a Bash prompt, Claude Code writes an allow rule into .claude/settings.local.json. If the prompt offered the exact command, the rule is the exact command, so a PGPASSWORD=... or token typed inline is stored word for word. Claude Code adds the file to your global git excludes on one machine, but not to the project's own .gitignore, so clones, other machines and files committed earlier are not covered.
Across 104,185 public copies, 1,379 distinct secrets turned up, more than a third of them database passwords, plus SSH logins, GitHub and npm tokens and AWS keys. Gitleaks and TruffleHog each missed hundreds of these files, and old versions in git history held 734 more secrets.
1,379 distinct secrets in 104,185 public settings files, more than a third of them database passwords.
