Apiiro finds Claude Code settings files leaking secrets on public GitHub
Security researchers at Apiiro discovered that Claude Code's local settings file, which can store approved shell commands verbatim including embedded credentials, is being uploaded to public GitHub repositories. They found over 100,000 instances of this file posted publicly, with roughly 1,100 from 63 organizations containing real secrets like API tokens, database passwords and root logins.
GoKawiil's interpretation of the reporting above, not reported fact.
The flaw arises because Anthropic's global .gitignore protection doesn't carry over when repos are cloned or newly initialized, and Claude Code sometimes commits changes to the file without user input, according to Apiiro. This suggests organizations using AI coding assistants may need additional safeguards beyond default tooling behavior to prevent accidental credential exposure.
- Claude Code can store approved shell commands, including secrets, verbatim in a local settings file
- Over 100,000 instances of this file were found publicly on GitHub, with ~1,100 containing real secrets
- Default .gitignore protection fails when repos are cloned or created later, or when Claude Code auto-commits the file
Source: arstechnica.com, 2026-11-09
Published there as: “Claude Code is accidentally exposing secrets all over GitHub”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.