Abbi Labs

Breach breakdowns

Breakdown: Claude Code's "don't ask again" file left 1,379 secrets in public GitHub repos

By Pritesh Ghodge, security engineer · Published 14 November 2026

Did a secret make it all the way into your live app?

The Abbi Labs quick check tests your live, public site as an anonymous visitor: secret-looking keys in your JavaScript, exposed .env and .git files, Supabase tables readable with your public key. It does not search GitHub or read your repos, so do the repo checks below yourself. No sign-up.

No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.

Run on every deploy or use from Cursor / Claude Code via MCP →

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.

If you use Claude Code, you've seen the prompt. It wants to run a shell command and offers "Yes", "No", or "Yes, and don't ask again". Picking the last one is what most of us do after the tenth prompt in an hour. Security company Apiiro has now shown where that choice can end up. When the approved command had a password or token typed into it, Claude Code can save the whole command, secret included, in .claude/settings.local.json inside the project. And a lot of those files are sitting in public GitHub repos.

Everything below comes from The Hacker News write-up of Apiiro's research (7 November 2026) and Ars Technica's coverage (9 November 2026). I couldn't load Apiiro's own post when writing this, so the numbers are as THN reported them.

What happened

The numbers

All from The Hacker News, citing Apiiro's research:

What's confirmed and what we don't know

How to check your own repos

Only check repos and machines you own or are responsible for.

  1. Search your GitHub org. In GitHub code search, try org:YOUR_ORG path:.claude/settings.local.json, then the same for .claude/settings.json.
  2. Check history in every repo, even where the file is gone.
    git log --all --oneline -- .claude/settings.local.json .claude/settings.json
    git log --all -p -- .claude/settings.local.json | grep -nEi "password|passwd|token|secret|key|-p |PGPASSWORD|sshpass"
  3. Open the file on your own laptop, committed or not. It's plain JSON in the project folder and can end up in an npm package, a Docker image, a zip or a synced folder.
  4. Check forks. If a public repo had the file, look at its forks. Deleting your copy doesn't touch theirs.

Check the other end too

A leaked repo is one way out. A secret shipped in your live site is another. Paste your URL and Abbi Labs checks what a signed-out stranger can see on your public site: secret-looking keys in your JavaScript, exposed .env and .git, open Supabase tables. Read-only. It doesn't look at GitHub.

Run a free scan

Fix steps

  1. Rotate first. Change every password, token and key the file has ever held, in any version, before you clean anything up. Once it's been public, assume someone has it. If it was a Supabase service_role key, follow the service_role key exposed guide.
  2. Stop tracking it and ignore it in the project.
    git rm --cached .claude/settings.local.json
    echo ".claude/settings.local.json" >> .gitignore
    git commit -m "stop tracking Claude Code local settings"
  3. Purge history, after rotating. Deleting the file in a new commit leaves every old version readable. Use git filter-repo --path .claude/settings.local.json --invert-paths (or BFG), force-push, and tell collaborators to re-clone. Forks and caches may still have it, which is why rotation comes first. More in secret keys in git history.
  4. Clean the local file. Delete every allow rule that contains a secret, even if the file never left your laptop.
  5. Keep secrets out of commands. Use a variable from your secrets manager, like $DB_URL, so the saved rule holds the name and not the value. Approve patterns such as Bash(npm run:*) instead of one-off commands.
  6. Scan agent folders like .env files. Add .claude/, .cursor/ and similar folders to pre-commit and CI secret scanning, including history, and make sure the scanner catches passwords inside commands, not just known key formats. Add .claude/settings.local.json to your org's .gitignore templates.

Same family of mistake, different file: API keys in mcp.json covers keeping secrets out of Cursor MCP config. And if a .env or .git folder got deployed with your site, see .env and .git folder exposure.

My take

Nobody did anything reckless here. People clicked the button that makes the prompts stop, and a safety net that only lives on one laptop didn't follow the project. The bit that worries me most is the 215 files neither scanner caught. If your plan was "the scanner will flag it", a password typed after -p slips straight past. Spend ten minutes on the history search above, and rotate anything you find before you touch git.

Scan your live app free

Sources

Related

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.