Claude Code’s ‘Don’t Ask Again’ saved secrets to GitHub
Apiiro found 1,122 public GitHub repos with Claude Code’s saved command file capturing real passwords and API keys—weeks after a trojanized extension scare.
By Felix Hart· Email Vox · 10 Nov 2026

Key facts
- ■Apiiro found 1,122 public GitHub repos with Claude Code settings files capturing plaintext passwords and API keys.
- ■Secrets were saved when users clicked “Yes, and don’t ask again,” storing entire approved commands verbatim in project settings.
- ■A trojanized Claude Code extension (v2.1.313) on Cursor attempted to install a persistent SSH backdoor under a legitimate publisher identity.
- ■Cursor temporarily shut marketplace functionality to respond to the malicious extension update, investigators said.
- ■Leaked dev tokens can enable email abuse via SMTP, API, or OAuth—hurting deliverability and trust until rotated and monitored.
Developers told an AI assistant to stop bugging them—and it quietly saved their passwords. Apiiro says 1,122 public GitHub repos now contain Claude Code’s remembered commands, in plain text, including API keys.
The find lands just weeks after researchers found a trojanized Claude Code extension on the Cursor Marketplace trying to plant an SSH backdoor. Two different failure modes, one lesson: dev tools can spill secrets fast, and email systems are some of the easiest places those secrets get abused.
What happened
Apiiro reported that when developers approved commands via Anthropic’s Claude Code and clicked “Yes, and don’t ask again,” the assistant saved the entire command verbatim in a project settings file. That snapshot preserved whatever the user typed, including passwords or API tokens, turning a convenience toggle into a durable record of secrets. Apiiro said it found 1,122 public copies of that file on GitHub, making sensitive strings readable to anyone who browses the repos. Source
The exposure hinges on how command approvals were recorded: the stored text didn’t scrub secrets before being written to disk. Once committed and pushed, those tokens entered repo history, forks, and clones. That propagation complicates cleanup because removing a leaked key from the latest commit won’t erase it from old trees or from anyone else’s copies. Source
Apiiro’s count—1,122 public repositories—is a floor, not a ceiling, because private repos and internal mirrors aren’t visible to outside crawlers. The number also doesn’t account for secrets that were rotated quickly or for tokens scoped to noncritical services; it only reflects that the settings file existed publicly and contained unredacted commands. Source
Earlier, separate researchers disclosed that a trojanized package of the official Claude Code extension, version 2.1.313, was pushed through the Cursor Marketplace under the extension’s legitimate publisher identity. The malicious build attempted to install a persistent SSH backdoor on developer machines, prompting Cursor to temporarily shut parts of the marketplace to investigate. Source
That supply‑chain scare and the new secrets‑in‑repos issue share a theme: developer adjacencies are now high‑value paths for attackers. We’ve seen similar fallout when a widely used library was hijacked; the LiteLLM incident shipped credential‑stealing code via PyPI and Docker before it was yanked, as we covered in LiteLLM release hijacked. The Claude Code cases show the same pressure on AI dev tooling.
The background
AI coding assistants increasingly run shell commands, edit files, and manage project state. To reduce prompts, they offer “don’t ask again” approvals. In this case, those approvals were persisted word‑for‑word, embedding any inline secret in a local settings file. If developers later git‑added everything, they likely pushed secrets without noticing. Source
Email operations sit in the blast radius when dev secrets leak. SMTP credentials, OAuth client secrets, and provider API keys can enable attackers to send look‑alike mail from real infrastructure, hurting deliverability and trust. We’ve tracked how modern infostealers target mail access; a recent strain dubbed “Aokigahara” went after developer keyrings and AI sessions, a combination tailor‑made for lateral moves into mail systems. See our report on the Aokigahara stealer for patterns defenders should watch.
Secrets in repos travel widely. Developers fork, clone, and mirror constantly; CI systems and backup jobs replicate entire histories. Even after you rotate a token, attackers scrape platforms for past leaks and test old keys against services that forgot to revoke. Email senders feel this as unexplained spam spikes from their own domains and sudden Spamhaus attention.
Supply‑chain risk is now routine for tools used to build and ship email. Cursor’s temporary shutdown around the trojanized extension matches a broader defensive pattern: pause distribution to stop spread, then audit provenance. That pattern also appeared when code registries quarantined malicious uploads, and when security teams staged emergency revocations—practices we outlined in When supply chains wobble, keep your email upright.
As email providers raise authentication bars, leaked secrets become more valuable. Attackers who get your SMTP key or a valid OAuth token can bypass content filters by sending “from inside,” then ride DMARC alignment to the inbox. That’s why leaked dev tokens ripple into the security category and deliverability all at once.
What people are saying
Apiiro framed the issue in terms of saved approvals: users explicitly clicked “Yes, and don’t ask again,” and the assistant stored those commands as written. That design decision, according to Apiiro’s research summary, is what exposed passwords and API keys in the wild. Source
Cybersecurity researchers describing the Cursor incident emphasized that the trojanized Claude Code extension (2.1.313) carried a persistent SSH backdoor. They noted the malicious update was distributed as if it were legitimate, under the official publisher identity, which accelerated trust and adoption before detection. Cursor responded by temporarily shutting marketplace functionality to contain the damage path. Source
Practitioners are treating these as process failures, not just one‑off bugs: secrets should be redacted at capture time, and extension update channels should be verified with cryptographic signing and reproducible builds. In earlier cases like LiteLLM’s hijacked release, teams tightened allow‑lists, pinned versions, and added out‑of‑band monitors to spot sudden network calls to unknown hosts.
Email defenders are also layering telemetry. After similar incidents, teams wired detections for anomalous send spikes, new geographies using mail APIs, and unexpected SMTP AUTH strings. Those checks often surface abuse faster than waiting for blocklist hits—advice we summarized in Harden deliverability when security headlines spike.
What happens next
If your org used Claude Code, audit repos for any assistant‑generated settings files and scan commit history for secrets that look like tokens or passwords. Delete isn’t enough; use history rewrites and force‑pushes where policy allows, and submit takedowns for forks you control. Source
Rotate anything even close to mail: SMTP passwords, ESP API keys, OAuth client secrets for sending apps, webhook signing tokens, and inbox access tokens. Then set detections for account sends at odd hours, sudden bounce spikes, or new IPs touching SMTP AUTH to catch residual abuse.
For tooling, disable “don’t ask again” on commands that may include secrets, or enforce environment variables and secret managers so tokens never appear inline. Require extension provenance checks and signed updates, and consider staging new versions in sandboxes before broad rollout—especially after the Cursor 2.1.313 backdoor attempt. Source
Finally, treat AI assistants like any other software agent with access: give them least privilege, log everything they save, and forbid automatic commits that might sweep secrets into version control. That governance reduces the odds that a convenience feature becomes your next inbox‑spoofing incident.
The Email Vox take
-
Stop the bleed: search your org’s GitHub for the Claude Code settings file and any hardcoded tokens in command logs. Purge with history rewrites, not just delete the tip.
-
Rotate aggressively: revoke email-related API keys, SMTP credentials, OAuth secrets, and webhook tokens. Audit bounce/spam metrics and auth logs for odd bursts. Lock down extension updates to trusted channels and pin versions with allow‑lists.
Frequently asked questions
- what did apiiro find about claude code on github?
- Apiiro said 1,122 public GitHub repositories contained Claude Code “Don’t Ask Again” command logs with plaintext passwords and API keys.
- how were secrets exposed by claude code?
- If users clicked “Yes, and don’t ask again,” the assistant saved the full approved command—including any embedded secret—into a project settings file committed to repos.
- was there another claude code security issue recently?
- Yes. A trojanized Claude Code extension (version 2.1.313) on the Cursor Marketplace tried to install a persistent SSH backdoor, per researchers.
- did the trojanized extension come from a trusted source?
- Researchers said it was distributed under the extension’s legitimate publisher identity on Cursor, which temporarily shut updates to respond.
- what kinds of secrets were exposed in repos?
- The findings include passwords and API keys typed into approved commands, saved verbatim in a settings file and later pushed to GitHub.
- how many github copies are involved?
- Apiiro counted 1,122 public copies containing the exposed settings file, making those secrets readable to anyone.
- what should developers do right now?
- Search repos for the settings file, purge history, rotate any exposed credentials, and disable or review “don’t ask again” approvals in AI tools.
- does this affect email security teams too?
- Yes. Exposed tokens can enable inbox access, SMTP abuse, or mail-sending fraud. Rotate mail-related keys and audit logs for suspicious sends.
Why this matters
Secrets that leak from dev tools end up powering real compromises—email systems are prime targets because stolen SMTP creds, OAuth tokens, or API keys turn into spoofed campaigns and abused sender reputations. Even if your mail stack is fine today, leaked keys persist in commit history and forks. That long tail fuels phishing, BEC, and deliverability hits months later. Cleaning history, rotating tokens, and corralling AI assistants and extensions into least‑privilege, reviewable workflows pays back by preventing hard‑to‑trace inbox hijacks and domain‑reputation damage.
Sources
Reporting draws on the public sources listed above. Spotted an error? Request a correction.
Related coverage

Microsoft says Storm‑0940 used AI to hit 2,200+ tenants via ConnectWise
Microsoft names a China‑linked crew and an AI pentest toolkit behind the ConnectWise Cloud Backup compromise — a fast, automated run at thousands of tenants.
25 Oct 2026

AI pen-test tool fuels massive hacks for $12
Researchers say a Chinese-speaking crew used the Cairn AI pen-test tool to loot hundreds of sites, while another campaign grabbed domain control for $12.
24 Oct 2026

LiteLLM release hijacked: malicious 1.107.0 hit PyPI and Docker
LiteLLM’s 1.107.0 release carried a credential stealer and backdoor, was sent to PyPI and Docker around 4 a.m. on Oct. 21, and is now quarantined.
23 Oct 2026

HubSpot’s Claude guide shows what actually saves time
HubSpot says 98% of marketers use AI. Its Claude playbook shows where teams actually save hours—drafts, edits, and message checks your next email can borrow today.
19 Nov 2026

Chainstack says breach hit prod systems, leaked hash data
Blockchain infra firm Chainstack says a Tuesday breach hit production systems and exposed some customer data and password hashes amid an AI‑powered campaign.
6 Nov 2026

Apple’s reported Mail changes put email clarity to the test
Validity’s September 2026 analysis describes foldable layouts and AI-assisted email retrieval—but its predictions for clicks and revenue remain predictions.
13 Oct 2026