Writing — December 2026

Attacker agents use a leaked key in five minutes. The median fix takes 94 days.

In November 2026, Microsoft's threat intelligence team described an attack by an AI agent. The agent searched public GitHub repositories for leaked credentials and found an application's client secret. It used the secret to get into the victim's cloud resources and pulled data out of a key vault. Microsoft reports that the whole sequence, from the GitHub search to the data theft, took five minutes (Microsoft Threat Intelligence). This is vendor threat intelligence, and it describes one observed case, not an average.

Most boards hear about leaked credentials as a developer mistake: someone pasted a key into code. The mistake is real. The damage comes from the time between the leak and the moment the key stops working. Public data puts that time at months, and often years. The attacker now needs minutes.

What is new, and what is not

Fast use of a leaked key is not new. In 2023, Palo Alto Networks' Unit 42 researchers exposed cloud access keys in a public repository on purpose. An automated campaign found the keys and used them within five minutes (Unit 42, vendor research). That campaign did one narrow job: it took one type of cloud key and started cryptocurrency mining.

The new part is what happens after the key is found. Microsoft notes that this work used to be limited by human time: a person had to find the repositories, read the results, and decide what each key could open. Agent frameworks now do the search, read the output, and run the follow-on attack, with little hands-on work from the attacker. Microsoft's report shows what that looks like:

  • The agents sent large volumes of GitHub queries, often with the target company's name and keywords for secrets and cloud services.
  • When a cloud API call failed, the agent corrected the request and retried. In one case the retry began about 28 seconds after the first failure.
  • The agents focused on credentials for AI services, such as keys for major AI providers.

Since October 2026, a financially motivated group has used the same framework against financial-sector targets. Microsoft says these tools can use compromised credentials "at machine speed" to move through a network and take data (Microsoft).

Microsoft's guidance to victims is blunt. If a secret appears in a public repository, assume the secret and the application behind it are compromised. Deleting the commit does not fix it. A leaked credential stays usable until someone revokes or rotates it.

Your exposure is how long a leaked key stays valid

Detection tools exist. GitHub scans public repositories for known secret formats. For providers in its partner program, GitHub sends each match to the provider, which can revoke the key (GitHub Docs). That covers some key types from some providers. Everything else usually waits for a person, and companies fall behind after the alert.

Two datasets measure that gap:

  • GitGuardian, a secrets-detection vendor, tracked credentials it confirmed as valid in 2022. When it retested them in January 2026, more than 64% still worked (GitGuardian, vendor data).
  • Verizon's 2025 Data Breach Investigations Report found that the median time to remediate a leaked secret found in a GitHub repository was 94 days (Verizon DBIR 2025).

GitGuardian gives the reason: teams cannot rotate secrets without risking production outages, so they do not rotate them (GitGuardian report). The fear is reasonable. Rotation breaks production when nobody can say which services still use the old key.

Public GitHub is only the visible part. GitGuardian reports that internal repositories are about six times more likely than public ones to hold hardcoded secrets, and that about 28% of incidents start outside code, in chat and ticket tools (GitGuardian, vendor data). An attacker's agent looks there once it is inside. Microsoft saw agents that had signed in search the victim's internal DevOps system for more secrets.

Why you cannot out-run the agent

Here is the arithmetic that should drive the budget. It is a model, not a measurement.

Assume an attacker's agent can find and use a leaked key in minutes, as in Microsoft's observed case. Assume your process needs a person to see the alert, find the owner, and rotate the key without an outage. Assume a good team needs hours for that. A team at the 94-day median needs months.

Under those assumptions, a human-paced response cannot win the race for a key that an agent finds first. Revocation also does not end access at once. Microsoft's containment guidance notes that tokens already issued with a removed credential stay valid until they expire.

Two things still change the outcome:

  • How long a leaked credential works by itself. A one-hour token gives the attacker at most one hour, even if nobody responds. A key with no expiry gives them as long as they want.
  • How much the credential can reach. A narrowly scoped key exposes one service. A shared administrator key exposes the company.

Fast revocation still matters, because it limits how long an attacker keeps access. The bigger gain comes from credentials that expire on their own and reach only what they need.

Why rotation breaks production

Rotation breaks production for four common reasons. Most old credentials have more than one:

  1. Nobody knows where the key is used. The same provider key sits in three services, a scheduled job, and a contractor's laptop. Rotation finds the last user by breaking it.
  2. Nobody owns it. The engineer who created the key left. The alert goes to a shared channel. Each team assumes another team will act.
  3. The procedure has never run. There is no tested runbook, so the first rotation is also the first test, and it happens during an incident.
  4. The key never expires. It was issued with no end date, so it works until someone acts.

The fix is ordinary engineering work. It often goes unfunded because it ships no feature.

  • Inventory with an owner. Every credential has a named team owner, a list of the systems that use it, and a creation date.
  • A rotation pattern that does not cause downtime. Issue the new credential. Deploy it to every consumer. Verify that the consumers use it. Only then revoke the old one. When the system accepts two valid credentials at the same time, rotation becomes a routine change.
  • Short-lived credentials where the platform supports them. One cloud provider's own guidance recommends token-based and federated authentication over stored secrets, and notes that replacing a compromised certificate can be "incredibly time-consuming and disruptive" (Microsoft Entra). OWASP gives the same prevention for long-lived secrets: automated rotation, short-lived credentials, least privilege (OWASP NHI7). Short-lived credentials still rest on a few long-lived roots, such as the trust set up with the identity provider. Those roots need the strictest owner and the narrowest access.
  • The build pipeline in scope. Build systems hold production keys too. In GitGuardian's analysis of one 2025 supply-chain attack, 59% of the compromised machines were build servers, not personal workstations (GitGuardian, vendor data). Attackers have moved the version tag of a third-party build step to point at malicious code. Since October 2026, GitHub workflow lockfiles run the exact commit that was locked, even if the tag moves (GitHub changelog, Hugo van Kemenade).

AI adoption adds to the count. GitGuardian found 1.28 million leaked AI service secrets on public GitHub in 2025, up 81% from 2024 (vendor data). Every new model provider, agent, and tool integration adds keys. For how to give your own agents identities that you can scope and revoke, see agent identity.

What to fund and what to measure

Credential rotation should be a named capability with an owner and a budget line, like backup and recovery. The owner is an engineering leader, because the work is engineering work. Security sets the policy and watches the numbers.

The money buys engineering time, not a new tool. If the company already has a secrets manager and a scanner, the gap is the work in between: the inventory, the owners, the rotation automation, the move to short-lived credentials, and the drills. Plan it as a funded project with quarterly milestones. Left to spare capacity, it never happens.

Start with the credentials that can do the most damage: production cloud administrator access, the stores that hold customer and payment data, and AI provider keys. Inventory them, assign owners, and drill them first.

Ask engineering to report three numbers each quarter:

MetricDefinitionWhat a weak answer looks like
Time to revokeMedian time from a leak alert to the moment the old credential and the tokens issued from it stop working, measured in drills and real incidents"We have never measured it." Or days.
Short-lived shareShare of machine credentials that expire automatically within 24 hoursMost production keys never expire.
Owner coverageShare of credentials with a named team owner and a known list of consumersOwners are individuals who left, or a shared alias.

Two supporting numbers explain movement in the first three: the age of the oldest static credential in production, and the drill pass rate. A drill rotates a real production credential on a schedule, with no outage, and records the time.

Set targets with your engineering leader, not from a vendor benchmark. The direction matters more than the first number: time to revoke should fall, and the other two shares should rise, every quarter.

Questions for the board or the deal team

These three questions work in a board meeting and in technical due diligence. For the full diligence list on AI credentials, see AI in tech due diligence.

  1. If a production API key leaked to public GitHub at 9am today, when would it stop working? Ask for the last real example or the last drill, with timestamps. An estimate is not an answer.
  2. What share of our machine credentials expire on their own, and what share have a named owner? If engineering cannot produce the numbers, nobody manages the inventory.
  3. When did we last rotate our most powerful credential, and what broke? If the answer is "never" or "everything", rotation is not a capability yet.

Ask the same three questions of the vendors whose applications hold access to your systems. Microsoft documented a case where one vendor's application credential was compromised at the source and then used to reach several of that vendor's customers (Microsoft).

For a deal team, a weak answer to any of the three questions is a 100-day plan item. Put a cost on it in the model.

The decision for this quarter is small. Name one owner for credential rotation. Fund one drill on a high-value production credential, and record the time to revoke. Put the three numbers in the next board pack, and ask for them again every quarter.

Have a problem like this one?

That's the right reason to start a conversation.

Start a conversation