Claude Code's "Don't Ask Again" feature has been leaking secrets from public repositories
Thousands of live credentials sit in settings files that developers may have committed, and security firms are urging them to rotate every exposed key.

Security firm Apiiro reports that Claude Code has been leaking credentials from public repositories because of how its "Don't Ask Again" approval feature saves command permissions. When a developer approves a shell command this way, the tool writes it as a permanent rule into .claude/settings.local.json, where passwords and API tokens often end up embedded. Apiiro counted 1,122 secrets in those local settings files plus another 1,160 in git history, shared settings and stored transcripts, affecting 63 organizations. Generic scanners such as gitleaks and TruffleHog missed many of them because the secrets sat inside shell commands. GitGuardian later found 31,088 secrets in the same file on public GitHub, 5,343 of them still valid, and 613 more in Docker Hub images. Apiiro advises untracking the file, adding it to .gitignore, rotating every exposed credential, and referencing secrets through environment variables instead of typing them into commands.
Why it matters
Developers who used the "Don't Ask Again" option may have stored passwords and API tokens in plain text in a settings file that can end up in public code. Scanners reported tens of thousands of such secrets on public GitHub and in Docker Hub images, and thousands were still valid when found. For those affected, the exposure is ongoing until each credential is replaced and the file is kept out of version control.
Matters or hype?
Does this story matter, or is it hype? Vote before you see what everyone else said.