Claude Code secrets scanner

Free. Read-only. It runs on your own laptop and sends nothing anywhere.

Clicking "Yes, and don't ask again" in Claude Code can save the whole command, password included, into .claude/settings.local.json. This script finds those files and tells you if one holds a saved password or is tracked by git.

Download claude-secret-check.py

Run it

You need Python 3. Open a terminal in the folder you saved it to:

python3 claude-secret-check.py

It scans your home folder. To check one folder only, pass it in:

python3 claude-secret-check.py ~/projects

What it reports

If it flags a file

  1. Remove it from git: git rm --cached .claude/settings.local.json
  2. Add it to .gitignore.
  3. Change every password that was in it, even if the repo was never public.

It matches patterns, so a clean result does not mean you are safe. Read the script before you run it, it is about 80 lines.