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

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.


