Security firm Apiiro says it found 2,539 real secrets in 1,994 public GitHub repositories, most of them in a settings file created by Anthropic's Claude Code. The research, by Shmulik Cohen and Matan Giladi, was published on November 5. The file is .claude/settings.local.json, and the trigger is the "Yes, and don't ask again" choice when Claude Code proposes a command.
Apiiro says that choice can save the exact command to the file, including any password or key typed into it. The firm looked at 104,185 public copies of the file across 103,617 repositories and says 1,122 of them (1.1%) hold a real secret, for 1,379 distinct secrets: 636 provider keys and 743 passwords or tokens for public hosts. CyberSecurityNews lists examples such as 379 database passwords, 43 SSH credentials, 42 tokens for GitHub, GitLab and npm, and 23 AWS keys. Counting file history, the shared settings file and saved agent transcripts brings the total to 2,539 secrets.
Claude Code tries to keep the file local by adding it to the developer's global git ignore list. Apiiro says that does not protect a clone on another machine, a folder that becomes a repo later, or a file already committed, and the rule never goes into the repo's own .gitignore. In 539 of the 1,105 repos with a traced secret, a commit co-authored by Claude changed the file. Apiiro says 63 organizations hold a real secret in a public allowlist. It says it notified affected owners on November 2 and 3, and one company confirmed its key had been live. The researchers did not verify whether every credential was still active.
Apiiro also says it checked 16 coding agents and that Claude Code is the only one confirmed to write the full approved command to a project file by default. It ran gitleaks and TruffleHog over all the files: of the 1,122 files with a secret, gitleaks flagged 564 and TruffleHog 643, and 215 were flagged by neither, mostly passwords typed inside commands. An earlier GitHub bug report from August 11, 2025 had raised the same concern.
For developers, the lesson is that agent approval files are now a place secrets leak. Do not type secrets into commands that an agent runs, and use environment variables or a secrets manager instead.
What to try today: search your repos and their history for .claude/settings.local.json, add it to the repo's own .gitignore, and rotate any key or password you find in it. Then review which approval rules your team has saved with "don't ask again."
Sources
- Startup FortuneClaude Code's Don't Ask Again option left passwords in public GitHub files
- CyberSecurityNewsClaude Code's "Yes, and Don't Ask Again" Option Can Leak Passwords and API Keys to GitHub
- Pasquale PillitteriClaude Code leaks passwords and API keys in 1,122 public GitHub files
- FourWeekMBAMost of 2,539 Leaked Secrets Sat in a Claude Code File
- Cyber PressClaude Code’s “Yes, and Don’t Ask Again” Feature Exposes Passwords and API Keys on GitHub
- GBHackers NewsClaude Code’s “Don’t Ask Again” Feature Exposes 2,539 Secrets Across 1,994 GitHub R...
- The 420.inClaude Code Permission Feature Exposes 2,539 Secrets Across GitHub Repositories
- Mastodon sigmoid.social #LLMMastodon sigmoid.social #LLM:
- ApiiroResearch on secrets in AI coding agent files (as cited by FourWeekMBA and CyberSecurityNews)
Building with AI? See this week's hot AI repos and how to use each one.
From the issue
Elvis's estate and Eminem's publisher sue Suno Sunday, November 8, 2026