Skip to main content
Mallory
← Back to News
leaked-secret-api-keyai-platform-security

Claude Code Permission Files Expose 1,379 Secrets in Public GitHub Repositories

Breach & Incident Intelligence · 18 sources · Updated 6d ago · First seen Aug 11, 2025

Claude Code Permission Files Expose 1,379 Secrets in Public GitHub Repositories

Apiiro identified 1,379 distinct secrets in 1,122 publicly accessible copies of Claude Code’s .claude/settings.local.json file on GitHub. Selecting “Yes, don’t ask again” can save approved shell commands verbatim as permission rules, including embedded passwords and API keys. Claude Code’s documentation describes persistent approvals for shell commands and supports both shared and individual permission settings. Expanding its search to shared settings files, repository history and agent chat logs, Apiiro found 2,539 secrets across 1,994 repositories. Researchers did not test credential validity, but one notified company confirmed an exposed key had been live; the report provides no evidence of malicious use.

Claude Code’s automatic exclusion of local settings relies on machine-local Git settings rather than the project’s .gitignore, leaving gaps for previously tracked files and collaborators’ environments. Organizations should rotate exposed credentials before cleanup, inspect Git history and forks for additional copies, and exclude local settings files at the repository level. Security teams should also extend secret scanning to detect credentials embedded in saved commands and review persistent permission rules for sensitive values.

Is this vendor in your chain?See attribution, scope, and your downstream exposure.
Check the blast radius
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

8 events · Aug 11, 2025
  1. Reported Nov 11, 20266d ago

    GitGuardian finds 31,088 exposed Claude Code secrets, including 5,343 valid credentials

    GitGuardian identified 31,088 distinct secrets in Claude Code's .claude/settings.local.json files across 23,276 public GitHub repositories. Of these, 5,343 were still valid when detected; exposed credentials included database connection strings, cloud provider tokens, SSH passwords, and Google API keys.

    Claude Code’s ‘don’t ask again’ button has a secrets-spilling problem | InfoWorld
  2. Reported Nov 10, 20268d ago

    Check Point finds Claude Code credentials in public npm packages

    Check Point researchers reported finding .claude/settings.local.json in 428 of approximately 46,500 monitored public npm packages. Across 30 packages, 33 of these files contained credentials.

    The Convenience Click That Put 2,539 Secrets on Public GitHub | DevOps.com
  3. Reported Nov 9, 20268d ago

    Anthropic investigates safeguards against Claude Code credential exposure

    According to Apiiro, Claude Code lead Boris Cherny said on Hacker News that Anthropic was investigating ways to prevent credential exposure. He identified Auto Mode handling and basic secret scanning in Claude Code as approaches the team intended to prototype.

    KI-Coding-Agenten verfrachten Zugangsdaten in öffentliche Repositories | heise online
  4. Reported Nov 7, 202611d ago

    Secret-scanner testing reveals gaps in detecting command-embedded passwords

    With credential verification disabled, gitleaks detected 564 and TruffleHog detected 643 of the 1,122 secret-bearing local settings files; neither detected 215 files. Most misses involved passwords embedded in commands rather than recognizable API-key formats.

    Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
  5. Reported Nov 7, 202611d ago

    Notified company confirms an exposed key had been live

    One company notified by Apiiro confirmed that its exposed key had been live. Researchers did not test credential validity, and the report provided no evidence of malicious use.

    Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
  6. Reported Nov 7, 202611d ago

    Apiiro finds thousands of secrets exposed through Claude Code files

    Apiiro reproduced credential storage through "Yes, and don't ask again" and identified 1,379 distinct secrets in 1,122 public .claude/settings.local.json files. Expanding its investigation to shared settings, repository history, and saved agent chat logs brought the total to 2,539 secrets across 1,994 repositories.

    Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
  7. Reported Nov 7, 202611d ago

    Automated bot closes credential-storage reports without Anthropic replies

    An automated bot later closed the August 2025 report as "not planned." Apiiro said all four related reports it cited had been closed by the same bot without replies from Anthropic.

    Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
  8. Aug 11, 20251y ago

    Bug report flags Claude Code storing credentials in approved commands

    A bug report described Claude Code saving approved shell commands verbatim, including embedded credentials, in its permission settings.

    Claude Code's “Don't Ask Again” File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Affected products

1 linked
Claude Code

Organizations

1 linked
Anthropic

Observables

1 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

Do you run this?See attribution, scope, and whether this vendor sits anywhere in your supply chain.
Get the Full Incident Picture
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.