Claude Code settings files leak secrets on public GitHub repos
AI security researchers at Apiiro have identified a significant security flaw in Anthropic's Claude Code. The tool stores user approvals for automated shell commands in a local file named .claude/settings.local.json. When users select "Yes, and don't ask again" for a command, the full command text, including any embedded sensitive data like API tokens or database passwords, is saved to this file.
Key points
- Apiiro found over 100,000 Claude Code settings files uploaded to public GitHub repositories.
- About 1,100 files from 63 organizations contained secrets like API tokens and database passwords.
- The global .gitignore setting does not prevent accidental commits at the repository level.
Although Anthropic's documentation states that this file should be added to the global .gitignore list to prevent public sharing, this protection does not apply at the repository level. Consequently, if a developer clones a repository to another machine or converts a folder into a new repository, the settings file can be accidentally committed and pushed to public GitHub instances. Apiiro notes that Claude Code often commits these changes automatically without explicit user input for each commit.
The researchers found over 100,000 instances of this local settings file uploaded to public GitHub repositories. Of these, approximately 1,100 files from 63 different organizations contained active secrets, including private keys and root logins. Even after the original files are removed, the sensitive data may persist in forks of the affected projects, posing a continued risk to the involved organizations.
The story so far
5 episodes →- Claude Code settings files leak secrets on public GitHub reposthis story
Claude Code is accidentally exposing secrets all over GitHub
Ars Technica AI · 9 November 2026
Loading the full article…
This text was published by Ars Technica AI and written by Kyle Orland. It is reproduced here with attribution so you can read it in full; the rights remain with the publisher. Read it at the source ↗
Coverage and discussion
4sources- Hacker News discussion · 5 pointsnews.ycombinator.com
- AI Coding Agents Leak Thousands of Secrets to GitHubPress · darkreading.com ·
- Claude Code's "don't ask again" button is leaking passwords and API keys to public GitHub reposPress · techspot.com ·
- Claude Code’s “don’t ask again” button leaked secrets to GitHubPress · tbreak.com ·
The headline, key points and digest above were generated by Digest AI's editorial model from the linked sources. Automated summaries can contain errors: the sources are the record. Spotted a mistake? Tell us. Published by Martin K., who runs Digest AI and handles corrections.
More in Generative AI & Models
All →- Cao: VAST's Tripo P2.0 Removes Topology Barrier · 1 src
- Huawei chip optimization: AscendGYM benchmark · 1 src
- Z.ai introduces GLM-5.4 with iterative depth for reasoning tasks · 2 src
- GPT-6.2 Astra and Sol score lower on transparency than Claude · 2 src
- OpenAI releases GPT-6.2 Astra and Sol; Google launches Gemini 4 Neon and free Gemini Tasks · 5 src
Comments
via GitHub Discussions