← All stories
● Covered by 1 source · 1 reportMedium impact1 negative

Claude Code Leaks Secrets on GitHub Due to Settings File Handling Oversight

🔄 Updated 10h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Apiiro found Claude Code settings files on public GitHub.
  • Files contained database passwords, API tokens, root logins.
  • Leak caused by partial .gitignore oversight for settings file.
  • Over 1,100 instances with secrets found across 63 organizations.

Claude Code Settings Files Exposed

AI security researchers at Apiiro identified a vulnerability in Claude Code that results in sensitive information being exposed on public GitHub instances. The issue involves the accidental upload of Claude Code's local settings files, which can contain critical data such as database passwords, API tokens, and root login credentials.

Mechanism of the Leak

The problem originates from how Claude Code handles user approval for automated shell commands. When a user selects "Yes, and don’t ask again" to approve a command, this decision, along with the command itself (potentially containing sensitive data), is stored in the local ".claude/settings.local.json" file. While Anthropic's documentation states this file is added to a global .gitignore list, this exclusion does not always apply at the repository level.

This discrepancy means that if a repository is cloned or a folder later becomes a repository, the sensitive settings file can be inadvertently committed and uploaded to public GitHub. Claude Code itself can also commit changes to this settings file without explicit user input, increasing the risk of exposure.

Scope of the Exposure

Apiiro's research uncovered over 100,000 instances where Claude Code's local settings file had been uploaded to public GitHub repositories. Among these, approximately 1,100 files from 63 different organizations were found to contain actual secrets, including public API tokens, database passwords, or private keys. Even after removal from a repository, these secrets can persist in forks of the original project if not properly addressed.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 09

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

AI security researchers at Apiiro discovered that Claude Code's local settings files, containing sensitive information like database passwords and API tokens, are being accidentally uploaded to public GitHub repositories. This occurs because the ".claude/settings.local.json" file, which stores user-approved commands, is not consistently excluded from repository-level .gitignore configurations, leading to unintended exposure of secrets.