threatdeck
Live 14:45 UTC ·

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

  1. Search GitHub organizations for .claude/settings.local.json and .claude/settings.json, and check git history for both files, even where they were deleted.
  2. Rotate every password, token and key that these files have ever contained before removing them from the repository.
  3. Run git rm --cached .claude/settings.local.json and add the file to each repository's .gitignore.
  4. 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.
  5. 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.”

The Hacker News

“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.”

The Hacker News

“Removing it from a project does not undo the leak, because older versions stay in git history and in forks of the repository.”

The Hacker News

“Claude Code is the only one confirmed to save the full approved command in a project file by default.”

The Hacker News

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

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.