Security ·

Claude Code is unintentionally exposing passwords and tokens on GitHub

What happened

Researchers at Apiiro found thousands of secrets (database passwords, API tokens, root credentials) in public repos, inside the `.claude/settings.local.json` file. When you click "Yes, and don't ask again" on a command prompt, Claude Code often writes the entire command into that file, including any password that was in it. The file is supposed to be in the global .gitignore, but in practice it still ends up in commits.

Why it matters

If you work with Supabase keys and connection strings, check right away whether `.claude/settings.local.json` ever made it into one of your repos. If it did, rotate your keys. Going forward, keep secrets in environment variables, not directly in commands.

Sources

More from this brief