AI Stack Alert High TD-2026-0005 For AppSec, AI Eng, SOC / IR, CISO AI-assisted
Claude Code "don't ask again" rules leak secrets in 1,122 public GitHub files
Apiiro reports that Claude Code can save an approved command word-for-word, including any password or key in it, to .claude/settings.local.json. Its search found 1,122 public copies of that file holding at least one secret, across 1,379 distinct secrets. The researchers did not test whether the secrets still work, though one notified company confirmed its key was live.
Why it matters
Anyone can read these public files, and the secrets include database passwords, SSH logins for public servers, and GitHub, GitLab, npm and AWS keys. Removing the file does not remove the secret from git history or forks, so exposed credentials stay usable until they are rotated.
Do this
- Search GitHub organizations for .claude/settings.local.json and .claude/settings.json, and check git history for both files, even where they were deleted.
- Rotate every password, token and key that these files have ever contained before removing them from the repository.
- Run git rm --cached .claude/settings.local.json and add the file to each repository's .gitignore.
- Open local .claude/settings.local.json files and delete any allow rule that contains a secret. Keep secrets out of commands by referring to secrets-manager variables, and approve patterns such as Bash(npm run:*) instead of exact commands.
- Add .claude/ and similar agent folders to pre-commit and CI secret scanning, including git history, and confirm the scanner detects passwords inside command lines, since gitleaks and TruffleHog missed 215 of the 1,122 files.
Signals
- NoCISA KEV
- 36/100Priority
- 80%Confidence
Evidence
“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 file.”
“Apiiro said yesterday that 1,122 public copies of that file hold at least one secret, though it did not test whether any still work.”
“Removing it from a project does not undo the leak, because older versions stay in git history and in forks of the repository.”
“Claude Code is the only one confirmed to save the full approved command in a project file by default.”
Sources
Affected / related
Claude Code, Apiiro, gitleaks, TruffleHog
Published 2026-11-07 06:44 UTC · updated 2026-11-08 04:27 UTC · AI-assisted summary, checked against quoted sources · How we score