
TL;DR
Apiiro researchers found thousands of secrets, including database passwords and root logins, in Claude Code settings files on GitHub, Ars Technica reports. Of over 100,000 public uploads of the settings file, about 1,100 from 63 different organizations held secrets, Apiiro says. Claude Code’s Boris Cherny said on Hacker News that the team is looking into prevention, according to Ars Technica.
- Number: Apiiro found over 100,000 cases of the local settings file on public GitHub repositories, per Ars Technica.
- Scale: About 1,100 of them, from 63 different organizations, held secrets such as keys and passwords, says Ars Technica.
- Timeframe: Ars Technica says a Claude Code bug report raised the issue as far back as August 2025.
- Cause: Approved shell commands are often saved unchanged in the settings file, with any embedded sensitive data, Ars Technica reports.
- Limit: Two popular scanners, gitleaks and TruffleHog, missed 215 of the roughly 1,100 secrets, Apiiro found.
Apiiro finds secrets in Claude Code settings files
Apiiro researchers found thousands of secrets, including database passwords and root logins, in Claude Code settings files on GitHub, Ars Technica reports. The exposed items also include API tokens, according to Ars Technica.
The leak comes from how Claude Code treats approvals of automated shell commands, Ars Technica explains. Ars Technica says picking the option to stop further prompts for a shell command saves a rule in the local settings file on the user’s computer.
Ars Technica says a Claude Code bug report raised the issue as far back as August 2025. Boris Cherny of Claude Code said on Hacker News over the weekend that the team is examining prevention, Ars Technica reports.
The numbers, the mechanism and the scanner gap
Apiiro found over 100,000 cases where the local settings file was uploaded to a public GitHub repository, according to Ars Technica. Apiiro says only about 1,100 of those, from 63 different organizations, contained secrets such as private keys and database passwords.
Ars Technica says the command is often written to the settings file unchanged, along with any sensitive information embedded in it. Anthropic notes in its documentation that the file is added to the developer’s global .gitignore list, according to Ars Technica.
Ars Technica says that setting does not carry over to the repo, so the file can be uploaded by accident after a clone. Apiiro writes that Claude Code itself often commits settings file changes with no input from the user.
Ars Technica says copies of the secrets can remain in forks even after the files are removed, if a GitHub user is not careful. Apiiro found that two popular secret scanners, gitleaks and TruffleHog, did not flag 215 of the roughly 1,100 secrets.
According to Ars Technica, every one of those bug reports ended up closed with no action once 60 days passed without activity.
Why public settings files matter to developers
Cherny recommended auto mode, which uses classifiers to handle routine permission prompts, according to Ars Technica. Cherny also advises users to use secret scanners, Ars Technica reports.
Ars Technica quotes Claude Code’s Boris Cherny as saying such cases seemed to arise only when “the files were manually created and checked in.”
The report suggests a documented ignore rule on one machine does not protect a repository that others can clone.
Open questions about fixes and real exposure
Ars Technica reports that another user noted sensitive commands can still be saved in auto mode, and Cherny said the team is considering improvements. Ars Technica gives no date or design for a fix, only that the team is looking into prevention.
Cherny said the team is considering building secret scanning into Claude Code itself, according to Ars Technica. Speculation, not a finding: a fix could change how approved commands are saved, but the report names no such plan.
Cherny points to files checked in by hand, while Apiiro writes that Claude Code often commits the file itself, so the accounts differ. In a GitHub bug report, user adamrothman says Claude Code did not add the local settings file to the project’s .gitignore.
The report does not say whether those credentials still work or whether anyone abused them. These figures are Apiiro’s own, relayed by Ars Technica, and no independent count is cited.
Sources
- GitHub, [BUG] Claude Code no longer adds local settings file to .gitignore when it is created · Issue #11982 · anthrop (2025-11-19): https://github.com/anthropics/claude-code/issues/11982
- Ars Technica, Claude Code is accidentally exposing secrets all over GitHub (2026-11-09): https://arstechnica.com/ai/2026/11/claude-code-settings-files-expose-thousands-of-secrets-on-github/







