Tip: check every repo for a committed .claude/settings.local.json, rotate what it held, then untrack and ignore it
- Find it:
git log --all --oneline -- .claude/settings.local.jsonin each repo; org-wide, code-search forpath:.claude/settings.local.json. Also review committed.claude/settings.jsonallow rules and any saved agent transcripts. - Rotate every password, token and key that ever appeared there, then
git rm --cached .claude/settings.local.jsonand add.claude/settings.local.jsonto the repo's own.gitignore(global excludes don't follow clones). - Prefer pattern approvals such as
Bash(npm run test:*); pass secrets via environment variables or a secrets manager, never inline in a command you approve. - Add a custom scanner rule for this path — Apiiro reports both gitleaks and TruffleHog missed ~19% of secret-bearing copies.
Sources: Claude Code docs: settings files · Apiiro: coding agents leaking secrets via "don't ask again" (Nov 5)