A security firm says Claude Code’s “don’t ask again” feature left passwords, API keys and other credentials in settings files later found in public GitHub repositories. The finding concerns the coding tool’s permission settings, not a flaw in an AI model, and the reported credentials were not all confirmed to be live.
Anthropic Watch analysis
What happened
Security firm Apiiro found 1,122 files containing at least one secret among more than 100,000 copies of Claude Code’s settings file in public repositories, according to iTnews. Its analysis counted 1,379 distinct secrets, including database passwords, SSH logins and AWS keys. The wider tally reached 2,539 after including older file versions, shared settings files and saved agent transcripts.
The reported route to exposure is a convenience setting: when users chose “Yes, and don’t ask again”, Claude Code could save an allow rule in .claude/settings.local.json. If that rule recorded a literal command, a secret typed into it could be saved in plain text. Apiiro said it had not tested whether the credentials still worked, though one organisation it notified confirmed a live key.
Anthropic’s Claude Code lead Boris Cherny said the company was looking into ways to prevent secrets being saved and planned to prototype options including secret scanning, iTnews reported. He also cautioned that the proposed changes might not solve the problem. The report says two common secret scanners missed some of the files Apiiro identified.
Why it matters
The risk is not confined to a model producing an unsafe answer. It sits in the ordinary plumbing of an AI coding assistant: a permission choice can create a file that developers may later commit to a public repository. Once a secret enters Git history, deleting the current file may not remove copies in forks and clones.
Apiiro advised developers to rotate credentials the file had ever held before cleaning up, untrack the file, add it to the repository’s .gitignore, and use environment variables instead of typing secrets into commands. It also recommended approving command patterns rather than literal commands. Those are practical steps, not a guarantee that every exposed credential has been found.
Our read
This is a serious, specific security finding, not a reason to treat every Claude Code user as compromised. The useful distinction is that Apiiro identified files and secrets, but did not establish that every credential remains usable. Anyone using the tool should check whether the settings file has entered a repository and rotate affected credentials, rather than trusting a deleted file or a scanner to tidy up the past.
What to watch
- Whether Anthropic ships a change that prevents credentials being saved in permission rules.
- Whether Apiiro or Anthropic publish further detail on affected repositories and remediation.
- Whether developers review Git history, forks and clones when rotating exposed credentials.
Discussion spark: Should AI coding assistants block users from saving commands that contain credentials by default, even if that makes repeated approvals more cumbersome?
Sources and evidence
- Source update (8 November 2026, 00:00 UTC)
- Source update (8 November 2026, 00:00 UTC)
Anthropic Watch is independently operated by WittyWires. It is not affiliated with, endorsed by, or operated by Anthropic.