Claude Code’s “don’t ask again” option has put more than 2,500 secrets into public GitHub repositories
Approving a command permanently copies the command, password included, into a project settings file that often gets committed. The security firm Apiiro counted 1,122 public copies of that file holding a real secret. Anthropic says it is looking at ways to prevent it.
Source
Coding Agents Copy Your Secrets to a Hidden File. Thousands Are on GitHubApiiro · Original published November 5, 2026
Researchers at the security firm Apiiro report finding 2,539 distinct secrets, including database passwords, cloud keys and SSH logins, in 1,994 public GitHub repositories. Most of them come from one Claude Code file, .claude/settings.local.json. When a user approves a shell command with “Yes, and don’t ask again”, Claude Code saves that exact command in the file, with any password typed into it.
Why the file ends up on GitHub
The settings file is meant to stay on the developer's machine. When Claude Code creates it inside a git repository, it adds it to the developer's global ignore list, but not to the repository's own .gitignore. That protection does not travel with the project. A folder that becomes a repository later, a clone on another machine and a file that was already committed are all left uncovered.
Apiiro also reports that in 539 of the 1,105 repositories it traced, a commit co-authored by Claude changed the file. Claude Code's commit instructions tell the model not to commit .env or credentials.json, but its own settings file is not on that list.
What the count shows
According to Apiiro, public GitHub held 104,185 copies of the file, and 1,122 of them contained a real secret. The total of 2,539 also covers earlier versions of the file, the shared settings.json that teams commit on purpose, and saved agent transcripts. The firm says 63 organizations are affected, from student groups to software vendors.
Deleting the file is not enough. Earlier versions still hold 734 secrets that appear in no current copy, and forks carry copies of their own. Two common secret scanners, gitleaks and TruffleHog, together missed 215 of the 1,122 files, because a password typed after PGPASSWORD= or sshpass -p looks like an ordinary word in a command line.
Apiiro did not try any of the credentials. In its count, a real secret is one that matches a known key format or sits next to a public host, which is not proof that it still works.
What to do
Apiiro's advice for anyone who uses Claude Code is direct:
- If the file is tracked, remove it with
git rm --cached .claude/settings.local.jsonand add it to the repository's own.gitignore. - Rotate every credential the file has ever held, since removing it does not clear git history, forks or clones.
- Open the local file even if it was never committed, and delete every rule that contains a secret.
- Reference secrets through environment variables such as
$DB_URL, so the saved rule does not contain the value. - Approve patterns such as
Bash(npm run:*)instead of literal commands.
What Anthropic says
Users have reported the same behavior in Claude Code issues since August 2025, and Apiiro says none of those reports received a reply from Anthropic. Apiiro published the research on November 5, 2026. On November 7, 2026, Boris Cherny, who leads Claude Code at Anthropic, wrote on Hacker News that the team is looking into how to prevent it. He named two options: making auto mode catch such commands and adding basic secret scanning.
„We are looking into what we can do to prevent this.“
Sources
Once a week, in your inbox
The whole week's news, gathered into one email. No ads, no passing your address on, one-click unsubscribe.
The address is used only for this roundup. It is not sold and not passed to anyone.
Related

Researchers found 35,578 Grok-built apps open to anyone, 24 of them made by SpaceXSI staff
Security firm Claroc says 94.7% of the Grok apps still online opened without any sign-in, and some held patient records, staff rosters, and plain-text passwords. SpaceXSI says apps stay private until their creator shares them. Claroc's tests found the publish panel already set to Anyone with the link.
Clarocverified
Next.js 16.4.5 and 15.5.29 fix seven vulnerabilities, most of them in caching
Next.js released a scheduled security update on November 3, 2026, as versions 16.4.5 and 15.5.29. It fixes seven vulnerabilities, one rated high and six rated medium. Four of them can make the cache serve one user's or one tenant's data to someone else. The others cover cookie exposure in Edge routes, response mix-ups behind certain proxies, and an SVG filter bypass.
Next.js Blogverified
OpenAI raises bug bounties and now pays up to $30,000 for a critical flaw in ChatGPT, Codex, or the API
OpenAI raised the rewards in its Security Bug Bounty program on November 2, 2026. Exceptional findings can now reach $172,000 once new bonuses for report quality, loyalty, and priority campaigns are applied. Reports that are still unpaid will be scored under the new ranges.
OpenAIverified
