Apiiro security researchers reported finding thousands of sensitive credentials exposed in public GitHub repositories due to mishandled Claude Code settings files.reported The firm analyzed how the AI coding assistant stores user approvals for shell commands and found that sensitive data often persists in these local configuration files.Claude Code saves command approvals in a file that can accidentally get uploaded to GitHub with passwords inside.The global gitignore configuration for Claude Code settings does not propagate to repository-level ignores, enabling accidental secret exposure.
What was released or claimed
Apiiro detailed its findings in a report highlighting how Claude Code handles automated command approvals. When users select the option to not ask for permission again, the tool saves the command pattern in a local settings file. This file frequently contains raw commands with embedded secrets such as database passwords or root login credentials.
Who it affects
The exposure impacts developers using Claude Code who accidentally commit their local settings files to public repositories. Apiiro found that 63 different organizations had repositories containing these leaked secrets.reported The issue affects anyone whose project is cloned to another machine or converted into a repository later.
What is still unknown
It remains unclear how many of the exposed secrets have been actively exploited by attackers. The material does not specify whether Anthropic has acknowledged the scale of the issue beyond closing previous bug reports.reported It is also unknown how many forks of the affected repositories still contain the sensitive data.
So what
Even after removing the files from a repository, the secrets can persist in forks if users are not careful. Apiiro noted that Claude Code sometimes commits changes to the settings file without direct user input. Previous bug reports from August 2025 were closed without action after 60 days of inactivity.reported
What the paper shows
The research tests how Claude Code’s local configuration management interacts with version control systems. The reported results indicate that over 100,000 instances of the settings file were uploaded publicly, with 1,100 containing secrets.reported The stated limitation is that the global gitignore rule fails at the repository level, allowing accidental uploads.
Why it matters
- Researchers must verify that local AI tool configurations are excluded from version control at the repository level, not just globally.
- The persistence of secrets in forks suggests that simple deletion is insufficient for remediation of exposed credentials.
- The closure of prior bug reports without action highlights a gap in vendor response to configuration-based security risks.
- Understanding how AI agents commit files autonomously helps researchers assess the attack surface of automated development tools.
Topics: AI security, Claude Code, GitHub, credential leakage, Apiiro
Updated
Then / now / next
Bug reports flagged the settings file exposure as early as August 2025.
Apiiro researchers have quantified the scale, finding over 100,000 public instances of the file.
Researchers should monitor whether Anthropic updates its documentation or tool behavior to prevent these commits.
Story timeline
- Then Bug reports flagged the settings file exposure as early as August 2025.
- 09 Nov 2026 Claude Code is accidentally exposing secrets all over GitHub
- Now Apiiro researchers have quantified the scale, finding over 100,000 public instances of the file.
- Next Researchers should monitor whether Anthropic updates its documentation or tool behavior to prevent these commits.
The strongest doubt
Counterpoint from the sources
Anthropic notes that the settings file is added to the global gitignore list, which usually prevents public sharing.
Ask the article
Local keyword search of this article; no generated answers.Did this article give you the evidence you needed?
Your choice stays on this device. No public tally.Terms in this story
gitignore
A file that tells git which files or folders to ignore in a project
Apiiro
The AI security research firm that discovered the exposed secrets
Claude Code
An AI coding assistant developed by Anthropic
Questions readers ask
How does Claude Code leak secrets?
It saves approved shell commands, including embedded credentials, in a local settings file that can be accidentally committed to public repositories.
How many secrets were found?
Apiiro found about 1,100 files containing secrets such as API tokens and passwords across 63 organizations.
Did Anthropic fix this issue?
The material states that previous bug reports were closed without action after 60 days of inactivity, and no fix is confirmed.
Connected stories
Reading receipt
- Apiiro identified over 100,000 public GitHub repositories containing Claude Code’s local settings files.
- Only about 1,100 of those files from 63 organizations contained actual secrets like API tokens or passwords.
- The exposure occurs because the global gitignore rule does not automatically apply to new or cloned repositories.
Still open: How many of the exposed secrets have been compromised by third parties?
Still open: Will Anthropic change the default behavior to prevent autonomous commits of sensitive files?
