Claude Code's 'Don't Ask Again' File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
Be careful with the file .claude/settings.local.json, warns The Hacker News: Passwords and API keys that developers typed into commands they approved in Claude Code are sitting in public GitHub repositories, where anyone can read them. When a user selects "Yes, and don't ask again," Anthropic's AI coding assistant can save the command, word-for-word, including the secret, in a project settings…
The Hacker News warns developers about a file, .claude/settings.local.json, which can expose passwords and API keys in public GitHub repositories. When a user selects 'Yes, and don't ask again,' Anthropic's Claude Code can save the command and secret in the project settings file. Apiiro found that 1,122 public copies of this file hold at least one secret, though they did not test if they are still valid.
Removing the file from a project doesn't undo the leak, as older versions remain in git history and forks. The researchers advise rotating secrets first, then cleaning up. Claude Code attempts to exclude the file from git, but it doesn't protect files already committed. Claude often commits the file itself, as seen in 539 of the 1,105 repositories traced.
Apiiro's search found 104,185 copies of the file in 103,617 repositories, with 1,122 holding at least one secret. These secrets include 379 database passwords, 43 SSH logins for public servers, 42 GitHub, GitLab, and npm tokens, and 23 AWS keys. The affected companies include 63 organizations, primarily software firms of various sizes.
Anthropic's head of Claude Code, Boris Cherny, acknowledged the issue and stated that Claude Code is not designed to scrub secrets. However, he suggested using auto mode, which is safer and has free plans. He also mentioned that Anthropic plans to prototype secret scanning and other security measures. Despite a bug report filed on August 11, 2025, none of the subsequent bug reports received a response from Anthropic, and three were automatically closed as inactive or duplicate.
Written by urgent.news from Slashdot's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.