Skip to content

Get notified

Get an email when a new major security incident drops. No spam, unsubscribe any time.

Only used for pwn.watch incident emails. Protected by Cloudflare Turnstile.

Become a sponsor

One slot: pwn.watch, gifs.so, flavors.design, kitze.io, every kitze repo, and an X shout-out.

Secure checkout on Polar. Right after paying you set up your ad on kitze.io.

LiveHighNo patch yetPatch now

Claude Code "don't ask again" file leaks passwords and keys: 1,122 public copies of .claude/settings.local.json on GitHub hold secrets

Anthropic Claude Code (.claude/settings.local.json permission allow rules)

Brought to you byTinkerer Club

The private club for people who own their servers, run their own AI, and pay $0/month for software.

When a Claude Code user picks "Yes, and don't ask again" on a shell command, Claude Code can save the exact command, including any password or token typed into it, as an allow rule in .claude/settings.local.json in the project. Claude Code adds that file to the user's global git excludes on one machine, but never to the project's own .gitignore, and does nothing for a file that is already tracked. Apiiro researchers Shmulik Cohen and Matan Giladi published research on Nov 5 2026 that found 104,185 public copies of the file on GitHub, 1,122 of them (about 1.1%) holding at least one secret, 1,379 distinct secrets in total, including 379 database passwords, 43 SSH logins, 42 GitHub/GitLab/npm tokens and 23 AWS keys. Counting git history, the shared .claude/settings.json and saved agent chat logs, they counted 2,539 secrets across 1,994 repositories. Apiiro did not test the credentials, but one notified company confirmed its key had been live. Earlier bug reports about the behavior were closed by an automated bot without a reply from Anthropic.

Why this severity: No CVE or score. Exposure risk rather than a demonstrated breach: Apiiro did not test the secrets, but one company confirmed a live key, and more than a third of the found secrets open a database directly.

Started
Nov 5, 2026

Follow this incident

Discuss on X ↗

Affected

  • Claude Code: saving exact approved Bash commands to .claude/settings.local.json is documented default behavior (reproduced by Apiiro with current models)

Fixed in

No fixed release yet

Timeline4

  1. The Hacker News covers the research; the four related Claude Code bug reports the researchers cite have all been closed by a bot with no reply from Anthropic.

  2. Apiiro publishes the research: 1,122 of 104,185 public .claude/settings.local.json copies hold secrets, 2,539 secrets across 1,994 repositories overall; gitleaks and TruffleHog together missed 215 of the files with secrets.

  3. Apiiro finishes collecting public GitHub data (Nov 1 to 3) and notifies affected organisations on Nov 2 and 3; one company confirms its exposed key had been live.

  4. A Claude Code user files a bug report that approved commands with API keys and tokens are stored word for word in settings.local.json; an automated bot later closes it as not planned after 60 days without activity.

Advisories1

News & write-ups3

Get an email when a new major security incident drops. No spam, unsubscribe any time.