November 18, 2026

Also available as markdown

A glowing AI key on a ring of keys, wired to a server rack and a vault, as small robots crawl toward it, with the KLM Innovation logo

Your AI key is a production credential now

Executive Summary

For a long time, an AI provider key felt like a billing detail. If one leaked, the worst case was a surprise invoice. That's no longer a safe assumption.

In one case Microsoft observed, an attacker's AI agent went from searching GitHub for client secrets to pulling data out of an Azure Key Vault in five minutes. Microsoft says the agents it tracked "repeatedly demonstrated a focus on credentials that provide access to AI services." Railway's incident report says the attacker who got into its platform made AI provider keys its primary target, and it estimates unauthorized spend on the stolen keys reached about $740,000.

Attackers want these keys because they're worth money on their own and because they often sit next to the cloud access behind them. Treat an AI key the way you'd treat a production database password. When one leaks, rotate it at the provider instead of just deleting it from the file. Keep keys short-lived and scoped to one job. And keep them in a vault whose own access is scoped, because a vault anyone can read is just a bigger target.

Attackers' agents hunt keys at machine speed

What we know: Microsoft says that starting in August 2026, attackers used an agentic AI offensive framework to send large volumes of GitHub searches for secrets, including AI inference API keys. The searches often included a target organization's name, secret keywords, or keywords for a cloud or AI service. Microsoft names ARTEX as an example of this kind of tooling. The point isn't the tool name. It's that the agent doesn't just find a key and hand it to a person. Microsoft says it can analyze what it finds and carry out the follow-on attack, with far less hands-on work from the attacker.

In the follow-on attacks Microsoft describes, the agents used valid leaked or stolen application credentials to sign in to cloud tenants, enumerate resources, pull secrets from Key Vaults, read storage and test the victims' AI services. When a cloud API call failed, the agent changed the API version and retried within about 28 to 80 seconds. That's the pace you're defending against.

Open questions: Microsoft doesn't say how many organizations were hit or how much AI usage was run up on stolen keys. Five minutes is one observed case, not a promise about every leak. Plan for it anyway.

Leaks now come from the tools you use every day

You don't have to paste a key into a public repo on purpose to leak one. Apiiro looked at Claude Code's .claude/settings.local.json, the file that stores commands you approve with "Yes, and don't ask again." When the approved rule is an exact command, any secret typed into that command gets saved with it, in plain text.

What we know: Apiiro found 104,185 public copies of that file on GitHub. 1,122 of them (1.1%) held a real secret, adding up to 1,379 distinct secrets: 636 keys in known provider formats and 743 passwords or tokens next to a public host. More than a third open a database directly. Most of the rest are third-party API tokens and AI model keys. Counting file history, the shared settings file teams commit on purpose, and saved agent chat transcripts, the total reached 2,539 distinct secrets in 1,994 repositories.

Open questions: Apiiro didn't test whether the secrets still worked, and "real secret" means it matched a known key format or sat next to a public host. One organization it notified confirmed its key had been live. Apiiro says Anthropic's head of Claude Code responded that the team is looking into fixes, including basic secret scanning. He also said Claude Code adds the file to git's ignore list when it creates it. Apiiro counters that this doesn't help when a folder becomes a repo later or someone has already committed the file.

Apiiro's advice: rotate first, clean up second, because deleting the file doesn't clear git history, forks or clones.

One platform breach, many stolen keys

The bigger exposures this fall came from platforms that hold keys for many customers at once.

What we know: Railway says an attacker was inside its systems on October 20 and 21, and that at most 1.85% of workspaces, about 100,000, could have had environment variables decrypted. Railway calls that an upper bound. Its logs show the attacker searched variable names with patterns written to find AI provider keys, and Railway believes the keys were passed on to so-called transfer stations, services that relay or resell AI access, for use in model distillation, the practice of training smaller models on the outputs of larger ones. Railway asked GitHub, GitLab, Anthropic, OpenAI, OpenRouter, SpaceXSI, Google and Stripe to revoke potentially exposed keys and is working with providers on refunds, covering some costs itself.

Dokploy says a Dokploy Cloud user reported unauthorized use of an AI provider key on November 12, and while looking into it the team found a bug on its shared cloud that could have let a logged-in user read AI provider keys stored by other organizations. It's fixed, and Dokploy says self-hosted instances shouldn't be affected. As of November 13, Dokploy was investigating a couple of reports of unauthorized key use, hadn't confirmed any keys were read and hadn't tied the bug to the misuse, but couldn't rule it out. Coinigy told customers to treat every exchange API key they'd connected as exposed, and Apify says an intruder used one compromised credential to obtain more account credentials and get into related accounts. Apify now stores API tokens only as hashes.

Open questions: None of these reports proves the same group was behind them. Railway says it hasn't established whether the original attacker ran the reselling services. What they share is the target: keys held on someone else's platform.

Coinigy's notice has the line every key holder should remember: removing a key from the platform doesn't revoke it at the source.

Why deleting isn't enough

Microsoft puts it plainly: publicly exposed credentials "remain usable until revoked or rotated," and removing the original post doesn't fix the exposure. Copies live on in edit history, caches, forks, logs and attacker tooling. And a stolen AI credential isn't only a billing risk. Darktrace showed in a lab that an attacker who already has a foothold on a device and the user's Claude Console credentials could use them to steer the coding agents running there.

So the fix has three parts.

  1. Rotate, don't just delete. Create a new key at the provider, update every place that uses it, then revoke the old one at the provider. Dokploy's guidance follows exactly that order. Then check the provider's usage dashboard for activity you don't recognize.
  2. Keep keys short-lived and narrowly scoped. One key per app, per environment and per third-party platform, with the narrowest permissions and a spend limit where the provider offers one. Microsoft recommends capping how long app secrets can live and moving workloads to managed identities where possible, so there's no long-lived secret to leak. Railway's own fixes went the same way: short-lived, narrowly scoped credentials issued just in time.
  3. Keep them in a real vault, and scope the vault. Reference secrets from a secrets manager instead of typing them into commands, config files or agent prompts. Apiiro suggests referencing them as variables so an approval rule records the variable name, not the key. But a vault isn't a finish line. Microsoft's attackers pulled secrets out of Key Vaults once they held an app credential that could read them. Railway now limits each service to decrypting only the credentials it needs and logs every decrypt. Do the same: give each workload read access to its own secrets only, and watch the reads.

What to do Monday

  • Find your AI keys. List every AI provider key your teams and vendors hold, who owns each one and what it can reach.
  • Scan where agents write. Add agent folders such as .claude/, .cursor/ and saved chat transcripts to secret scanning, including git history, and add .claude/settings.local.json to your repo .gitignore templates.
  • Rotate anything exposed. If a key ever sat in a repo, a settings file or a breached platform, rotate it at the provider and revoke the old one. Don't stop at deleting the file.
  • Set limits. Turn on spend caps and usage alerts at each AI provider, and give every third-party platform its own key.
  • Scope the vault. Check who and what can read your secrets store, and alert on unusual reads.

An AI key isn't a billing setting anymore. Attackers' agents treat it as a way in, and they move fast. Manage it like the production credential it already is.

Sources