Claude Code approval option can save secrets to settings files that leak to public GitHub repositories
VULNERABILITYApiiroredteam/daily · 2 sources
- Severity
- High
- Sources
- 2
What happened
Apiiro researchers found that Claude Code's "Yes, and don't ask again" option stores approved shell commands, including embedded passwords and API keys, in .claude/settings.local.json. Across 104,185 public copies of that file, they identified 2,539 distinct secrets in 1,994 repositories, affecting 63 organisations, including 379 database passwords, 122 Supabase service-role keys and 43 SSH logins. Standard scanners Gitleaks and TruffleHog missed 215 of the 1,122 affected local settings files.
For IT people · Written by AI from 2 sources · Wrong?
What to do
- Rotate any credentials found in Claude Code settings files before removing them from repositories.
- Run git rm --cached .claude/settings.local.json and add the path to .gitignore.
- Search current files and Git history for .claude/settings.local.json and review shared .claude/settings.json allow rules for passwords or tokens.
- Use secret-manager references rather than literal passwords in commands.
Written by AI from the sources, checked against them
Full story timeline · 2 updates
Who reported · 2 outlets
The Hacker NewsCyber Security News
Who and what is in it
Malware
Companies
Products