Claude Code permission file leaks secrets on public GitHub
Original title: Claude Code’s ‘don’t ask again’ button has a secrets-spilling problem
GitGuardian counted 31,088 distinct secrets across 23,276 repositories, including 5,343 still valid when found.
GitGuardian says Claude Code stores approved shell commands, including embedded credentials, in .claude/settings.local.json when a developer chooses not to be asked again. A local Git ignore does not stop the file from being committed elsewhere or copied into Docker images. Exposed material includes database strings, cloud tokens, SSH passwords, Google API keys and other credentials. Anthropic did not immediately comment; Claude Code lead Boris Cherny acknowledged the issue and said safeguards were being explored.
Unconfirmed: GitGuardian does not know why monthly leaks fell after April 2026.
- Monthly leaks peaked at 12,535 occurrences in April 2026, then fell to 959 by October.
- Of occurrences with a validity check, 67 percent were working credentials.
- Database identifiers were the largest valid category, with 2,280 distinct credentials.
- Public Docker Hub images held 613 distinct secrets, 99 valid when detected.
- One Cloudflare API token appeared across 559 image tags.
Impact: API keys, database credentials and cloud tokens exposed publicly
| Product | Affected |
|---|---|
| Anthropic Claude Code | — |
- 1.Rotate exposed credentials and remove settings files from Git and Docker build contexts
- 2.Exclude the Claude Code settings file with .dockerignore
- 3.Scan assistant configuration files alongside conventional environment files
- Vendors
- Anthropic
- Products
- Claude Code
- Organizations
- GitGuardian
From the original article
3 min read at csoonline.com
A configuration file meant to store local command permissions on Anthropic’s Claude Code is exposing thousands of API keys, database credentials and other secrets, according to findings by GitGuardian. The code security firm identified 31,088 distinct secrets in Claude Code’s “. claude/settings.
csoonline.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.