Alert: Claude Code may have saved your keys in .claude/settings.local.json

Reported November 5, 2026 · Updated November 9, 2026 · By Arif Khan, AIVolve LLC

What happened: On November 5, 2026, the security company Apiiro reported that Claude Code's "Yes, and don't ask again" option can save the exact command you approved, including any password or API key typed into it, in .claude/settings.local.json inside your project. Apiiro found 1,122 public copies of that file on GitHub holding at least one secret, including 379 database passwords and 122 Supabase service-role keys. It did not test whether the secrets still work.

Who is affected

What to do now (5 steps)

  1. Check git. In your project folder run git log --all --oneline -- ':(glob)**/.claude/settings*.json'. Any output means the file is, or was, in your history.
  2. Rotate first. Change every password, token and key the file has ever held, at the provider. Deleting the file doesn't remove old copies from history, forks or clones.
  3. Stop tracking it. Run git rm --cached .claude/settings.local.json, add .claude/settings.local.json to your project's .gitignore, commit and push.
  4. Clean the local file. Open .claude/settings.local.json and delete every allow rule that contains a secret. In Claude Code, /permissions lists your rules.
  5. Keep secrets out of commands. Use environment variables like $DATABASE_URL, and approve patterns such as Bash(npm run *) instead of one-off commands.

Full walkthrough, with copy-paste commands and a prompt for your AI tool: Claude Code's "don't ask again" leaked your keys? Check .claude/settings.local.json

Sources: Apiiro research (Nov 5, updated Nov 8) · The Hacker News (Nov 7) · Claude Code permissions docs

Need help?

Start with a free X-ray: 2 minutes, no code or passwords. Your AI builder writes a read-only report that includes security red flags, and an AIVolve developer reviews every X-ray within 1 business day.

Get a free X-ray →