01
Claude Code's "don't ask again" option can store passwords and keys in a file that ends up on public GitHub
Security company Apiiro reports that when a user approves a shell command in Claude Code with "Yes, and don't ask again", the exact command is saved as a rule in the project file .claude/settings.local.json, including any password, token or key typed into it. According to The Hacker News, Apiiro found 104,185 copies of this file in 103,617 public repositories, of which 1,122 contained at least one secret, 1,379 distinct secrets in total. Claude Code excludes the file from git only on the user's own machine, not in the project's .gitignore. A bug report on the same behaviour, filed in August 2025, was closed automatically as not planned, and no response from Anthropic was reported.
What it means for you
If your team uses Claude Code, search your repositories and their history for .claude/settings.local.json and .claude/settings.json, rotate any credential that appears there, and add the files to .gitignore. Pass secrets as environment variables rather than typing them into commands, and approve command patterns instead of exact commands.