Blog · Sicherheit
Claude Code: thousands of secrets exposed on GitHub by a settings file
Researchers found over 100,000 Claude Code settings files published on GitHub, about 1,100 of them holding secrets such as passwords or private keys. Here is where the problem comes from and how to avoid it.
9. November 2026 · 4 Min. Lesezeit · 1 Quelle

Where the leak comes from
The problem stems from how Claude Code remembers approvals for automated commands. When you choose “Yes, and don’t ask again”, that choice is stored as a rule in the local .claude/settings.local.json file; the command is often written there as is, including any sensitive information it contains [1].
Why these files end up online
As long as the file stays on the computer the risk is limited, and Anthropic’s documentation says it is added to the developer’s global .gitignore [1]. But that setting is not reflected at the repository level: the file can be published by mistake if a repo is cloned to another machine or a folder later becomes a repo; according to Apiiro, Claude Code sometimes even commits the file without the user’s input [1].
The scale
Apiiro’s researchers found over 100,000 such files in public GitHub repositories [1]. About 1,100, from 63 organizations, held secrets such as API tokens, database passwords or private keys [1]. Even once removed from a repository, the secrets can persist in forks of the project [1].
The issue had been flagged in a Claude Code bug report as far back as August 2025 [1].
Good habits
The mechanism shows where to look: make sure .claude/settings.local.json is in each repository’s .gitignore, not only your global configuration, and review settings files before publishing [1]. If a secret was already published, removing it from the repository is not enough since it can live on in forks: treat it as compromised and replace it [1].
Quellen
- [1] Ars Technica · Claude Code is accidentally exposing secrets all over GitHub
Artikel auf Grundlage der genannten Quellen verfasst. Fakten und Zahlen stammen aus diesen Veröffentlichungen.
SOL kostenlos testen500 kostenlose Credits, keine Kreditkarte.