New: AI API Cost Calculator — compare GPT, Claude, Gemini, Grok, Llama, DeepSeek & Kimi pricing live
Developers · News

Claude Code's "Don't Ask Again" Leaked Developers' Secrets to Public GitHub — Explained Honestly

By ToolsDig Research · November 8, 2026 · How we research

Nothing here is sponsored — no affiliate links on this page. This breaking article is not the daily buyer-intent post. Facts below come from Apiiro's research published 5 November 2026, checked 8 November 2026. We have not tested Claude Code hands-on for this article, and nothing here is a hands-on finding.

A developer's laptop glowing in a dark room, lines of code on the screen, a small open padlock above the keyboard and glowing key shapes drifting toward a public repository symbol

Here is a security story with no villain, no hack, and no prompt injection — just an ordinary click. You ask Claude Code to check a database or call an API. It proposes a shell command carrying the password or token, and asks before running it. You pick "Yes, and don't ask again" so it stops bothering you. That approval is saved, word for word, secret included, in a file inside your project. And if that file gets committed and pushed, your credential is now sitting in a public GitHub repository for anyone to read. Security firm Apiiro scanned GitHub between 1 and 3 November 2026 and found 2,539 real secrets that got out exactly this way, across 1,994 public repositories.

Let us be precise about dates, because this is not a launch that happened an hour ago. The research was published on 5 November 2026, and it is the lead story in today's AI digests because the numbers are stark and the cause is something thousands of developers do every day without thinking. It is a warning worth acting on today, not a panic — and the difference matters, because the fix is boring, quick, and entirely in your hands.

🔍 How we put this together

We verified the story against Apiiro's research (published 5 November 2026, by Shmulik Cohen and Matan Giladi) and multiple independent reports of it, keeping every number attributed to Apiiro and every caveat stated where it belongs. We have not run Claude Code ourselves for this article, so nothing here is a hands-on finding. One disclosure worth making: Apiiro sells security products for coding agents, so it has a commercial stake in this topic — but the numbers below are counts of public files anyone can check, not opinions.
🏆 Verdict: This is real, it is your problem to fix, and it is fixable in an afternoon. The leak is not a flaw in the Claude model — Apiiro reproduced it with the latest models, Opus 5.5 and Fable 5.1, because it is a behaviour of the tool, not the model. If you use Claude Code, spend twenty minutes today searching your public repos for the settings file, rotating anything that looks live, and making sure the file can never be committed again. Then stop worrying: the tool is still fine to use, as long as secrets never travel inside a shell command you approve.

What Apiiro found

Apiiro collected public GitHub data from 1 to 3 November 2026 using GitHub's code search. The headline numbers:

The secrets themselves are the uncomfortable part. The largest categories were database access: 379 database passwords and 122 Supabase service-role keys. Then 43 SSH login credentials (some containing server root passwords), 42 GitHub, GitLab and npm tokens, and 23 AWS keys, alongside cloud platform credentials and private keys. And the named examples Apiiro chose to highlight are the kind that make you sit up: a database vendor's own admin-level cloud key, a production Azure PostgreSQL password, a Square production token, and the owner password of a medical-records database.

Apiiro notified the affected organisations on 2 and 3 November. One company confirmed its exposed key was still live. That is the only live-key confirmation in the research — which brings us to the caveat that matters most.

The caveat, stated plainly

Apiiro did not test the credentials. It tested no key and contacted no host. So the research proves exposure, not compromise: we know the secrets were public, we do not know how many were still valid, or whether anyone used them. One confirmed live key is one data point, not a rate. The honest reading is that 2,539 secrets were left in public for anyone to try, and at least one was live — which is more than enough reason to rotate, and not enough to claim a mass breach happened.

There is a second caveat about the total. The 2,539 figure rests in part on an LLM reviewer's judgement rather than a manual check of every secret, and no third party has independently repeated the counts. The 1,122-files figure is the solid core; treat the wider total as Apiiro's best count, not gospel.

Why it happens — the mechanism, step by step

Claude Code is Anthropic's terminal coding agent: it reads your project and proposes commands to run on your machine, asking permission first. The permission dialogue offers "Yes, and don't ask again" — the option every busy developer reaches for, because re-approving the same database check fifty times a day is maddening. Here is what that click actually does:

  1. Claude Code saves an allow rule in .claude/settings.local.json inside the project folder.
  2. The saved rule is the complete approved command, not a redacted pattern — the password, token or connection string inside it is stored in plain text, exactly as typed.
  3. The file is meant to stay on your machine. Claude Code's own documentation describes a safeguard: the first time it writes the file in a git repository that does not already ignore it, it adds **/.claude/settings.local.json to your global git excludes file. But safeguards fail — a repo with its own ignore setup, a file committed before the safeguard ran, a developer who force-adds it, a shared settings file committed deliberately. Apiiro found that in 539 of 1,105 affected repositories it examined, Claude-coauthored commits had changed the settings file.
  4. Once the file is in a public repository, the secret is public. Every copy Apiiro found was sitting on its repo's default branch on 2 November 2026, and most had been there a long time.

Note what this is not. It is not the model misbehaving, and it is not prompt injection — Apiiro reproduced the behaviour with the latest models, and it is the tool's own design doing exactly what it was told. It is also not new as a complaint: a GitHub issue reporting plaintext credential storage in approved commands dates back to August 2025, reportedly without a response from Anthropic. As of 8 November 2026, three days after the research was published, Anthropic has not publicly responded to it.

The part that should worry you most

It is not the 1,122 files. It is the 215 that neither of the standard secret scanners caught. Apiiro ran gitleaks and TruffleHog over all 104,185 files: gitleaks flagged 564 of the 1,122 affected files, TruffleHog flagged 643, and 215 were flagged by neither — about one in five. The reason is simple and important: these secrets are often passwords typed inside a command, next to a hostname, not keys in a recognisable provider format. A scanner looking for the shape of an AWS key will not see psql "postgres://user:hunter2@db.example.com" as a secret. A clean scan is not proof of safety. If your check is "I ran a scanner and it found nothing," that check is not enough — you need to read the files.

Check your own repos — today

Do this now, not someday. It takes twenty minutes.

  1. Search GitHub for the files. In every organisation you belong to, search public repositories for .claude/settings.local.json and .claude/settings.json. Each hit is a file anyone on the internet can read right now. Read them — actually read them, do not rely on a scanner.
  2. Check git history too. Deleting the file does not delete the secret: 734 of the secrets Apiiro found lived only in old commits, in files that had since been deleted. Use git log --all -p -- .claude/settings.local.json and your history-rewriting tool of choice if you find anything.
  3. Treat anything live-looking as compromised. If a password, token or key in that file could still work, revoke it and rotate it. Deleting the file is not a fix — the secret has been public, and public means assume someone copied it.
  4. Make the file uncommittable. Add .claude/settings.local.json to your project's .gitignore and to your global git excludes, and check that git check-ignore agrees. If your team shares settings, use the shared settings.json only for rules that contain no secrets — never paste a credential into a shared file to "make it work for everyone."
  5. Check your transcripts as well. Saved agent transcripts in repos were one of the leak paths. If you store Claude Code session logs in a repo, check what is inside them before they go public.

Using Claude Code safely from now on

Who this matters for

The limits — stated plainly

The sensible next step is not to stop using Claude Code — it is to spend twenty minutes checking whether your repos are among the public ones, rotating anything that looks live, and changing one habit: secrets go in environment variables, never in a command you approve. Do that, and the next "don't ask again" click is exactly as harmless as it feels.

Sources: Apiiro research, 5 November 2026, by Shmulik Cohen and Matan Giladi ("Claude Code's 'Don't Ask Again' Feature Leaks Secrets to Public GitHub"); independent reports of the research in Cyber Security News, iTWire and The Hacker News, 6–7 November 2026; Claude Code settings documentation. All figures are Apiiro's, checked 8 November 2026. Anthropic had not publicly responded as of 8 November 2026. No hands-on testing was performed for this article. This breaking article is not the daily buyer-intent post, and it contains no affiliate links.