A64/100
Incident · high
Claude Code settings files leak credentials and secrets to public GitHub repositories
Tier A · Patch today – Before you go home
Who’s exposed: Developers committing Claude Code settings files with approved credential-containing commands to public GitHub
Tier A because: Core infrastructure or popular tool AND secrets exposed
Reach
Attack
Damage
Fix
Popular tool · Secrets exposed
What to do
- Check Claude Code settings files in your repositories for passwords, tokens and keys
- Rotate any credentials found in publicly committed settings files
- Remove exposed secrets from repository history, not only the latest commit
The Brief
- Claude Code's "Yes, and don't ask again" option saves approved shell commands to settings files, which can contain passwords, tokens and API keys.
- Apiiro researchers found secrets, including database passwords and API keys, in settings files on public GitHub, with 1,122 public GitHub files cited in one source.
- The leak stems from a partial oversight in how Claude Code's settings files are handled, not from an external hack or prompt injection.
Why it matters
Developers who approved commands containing credentials may have committed those secrets to public repositories, where they can be harvested by anyone.
The checklist behind the tier
Checklist · 3 of 10 yes
| Yes | Hits tech teams | Judgment: Claude Code is a developer tool used by engineering teams. |
| No | Core infrastructure | Judgment: a single AI coding product, not shared core infrastructure. |
| Yes | Popular tool | Judgment: Claude Code is a mainstream AI coding tool used by many developers. |
| No | Exploited in the wild | Sources describe accidental leaks found by researchers at Apiiro, not observed attacks. |
| No | Public exploit | Sources describe leaked secrets in public repositories, not published exploit code or PoC. |
| No | Remote, no login | Sources say the leak needs the user to pick 'Yes, and don't ask again' and run commands. |
| No | Full takeover | Sources describe credential exposure, not code execution or admin takeover. |
| Yes | Secrets exposed | Ars Technica: Apiiro found thousands of secrets, including database passwords and API keys, exposed on GitHub. |
| No | Supply chain | Sources describe accidental leaks of secrets, not malicious code shipped through a trusted channel. |
| No | No fix yet | None of the sources state that Anthropic has shipped no fix or that a fix is incomplete. |
Timeline
Full coverage · 6 sources
- 1h ago ↗
- 1d ago ↗
AI - Ars Technica
Claude Code is accidentally exposing secrets all over GitHub - 2d ago ↗
- 2d ago ↗
DEV Community: ai
Claude Code's "Don't Ask Again" Leaked Developers' Secrets to Public GitHub — Explained Honestly - 3d ago ↗
Hacker News: Front Page
Claude Code's "Don't Ask Again" exposes passwords in 1,122 public GitHub files - 4d ago ↗
The Hacker News
Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
First seen · 6 sources · Full story page · How tiers are decided