TRUFFLEHOG

COMPANY

RESOURCES

Truffle Security

How an AI Agent Went From GitHub to Key Vault in Five Minutes

How an AI Agent Went From GitHub to Key Vault in Five Minutes

Truffle Security

Microsoft Threat Intelligence published research on November 5 describing attackers who used an agentic framework called ARTEX to search public GitHub for application secrets, then used what they found to sign in to cloud environments. In one case they observed, the agent went from searching GitHub for client secrets to exfiltrating data from Azure Key Vault in five minutes.

That’s one documented case rather than a typical timeline, but the sequence inside it is worth walking through.

The framework searched public repositories for OAuth application secrets, service principal credentials and AI service keys, activity Microsoft traced back to August. Where a secret worked, it was used to authenticate to Microsoft Entra ID as the application it belonged to. From there the agent enumerated what that identity could see: subscriptions, resource groups, permissions, AI model deployments. Then it went looking for more secrets, reaching for storage account keys, connection strings, App Service settings and Kubernetes credentials, and in some cases Key Vault contents. Microsoft reported successful service principal sign-ins on dozens of applications across multiple tenants, including a case where a vendor’s multitenant application credential was compromised at the source and used to reach downstream customer tenants.

Microsoft's documented case, in five minutes

Attacker finds a key

An application secret, leaked on public GitHub.

Logs in with it

Signs in to Entra ID as the app. No exploit required.

Takes more secrets

Uses the app's own access to pull secrets from Azure Key Vault.

5 minutes, start to finish.

Every step used access the application already had.

No vulnerability was exploited anywhere in that chain. The secret was valid, the sign-in was legitimate, and the permissions were ones the application already had.

ARTEX isn’t malware, and it isn’t expensive. It was published on GitHub in July as an open-source penetration testing framework, and although the author took the repository private in October, forks stayed public. Several unrelated groups have been observed using it, from state-aligned actors to ordinary criminals, which makes the usual reassurance harder to reach for. Nobody had to build this capability to point it at a leaked secret.

It also debugged itself along the way. A batch of requests enumerating secret metadata across Key Vault resources came back HTTP 400, because the agent had specified a data-plane API version against the control-plane API. Roughly 28 seconds later the same vault paths were requested again with a supported version and returned 200. Microsoft recorded the same correction twice more, on an Azure SQL firewall rule query and an Application Insights endpoint, each within about a minute.

The identity behind the secret set the ceiling

A leaked application secret doesn’t hand over a cloud environment. It authenticates one identity, and that identity does whatever its permissions allow. The identities in question here are service principals: non-human identities, the accounts applications use to authenticate to each other, granted their permissions once at setup and rarely looked at again. Everything the agent accomplished in those five minutes was bounded by what the compromised application was already entitled to do.

Which is why two secrets sitting side by side in a scanning report can mean completely different things. One belongs to an application with read access to a test environment. The other belongs to a service principal that can read production storage and pull secrets out of a vault. Both authenticate. Only one of them turns into the sequence above.

Two live secrets, two different ceilings

Test app secret

Its application can read a test environment.

Low ceiling

Production service principal

Reads production storage and pulls secrets out of a vault.

Act now

Both authenticate.

The identity behind each one sets what it can do.

The ceiling can also sit outside your own tenant. Microsoft noted that some of the compromised applications were multitenant, so a secret exposed by one vendor created exposure for the customers who had authorized that vendor’s application. The organization holding the risk and the organization that leaked the secret weren’t the same.

Context has to arrive with the finding

Most secrets programs assume a gap between exposure and exploitation. A key gets committed, a scanner catches it, someone works out whose it is, and the key gets rotated before anyone else turns up. The work of figuring out what the secret reaches happens after the alert, by a person, over hours or days.

Five minutes doesn’t leave room for that. Neither does thirty, and the agent in Microsoft’s report wasn’t waiting on a human to interpret anything. If a team learns which identity a secret belongs to and what that identity can reach only after opening an investigation, the investigation is running behind an attacker who already knows both.

So the practical change isn’t scanning more often. It’s that a finding needs to show up already carrying the things a person would otherwise go and look up: which identity this authenticates, what that identity can reach, how far that extends through roles it can assume, and who can revoke it. Those four answers are what turn a detection into a decision, and they’re what decides which of today’s findings gets handled first.

None of the techniques are new

Attackers have searched public repositories for secrets for years, and stolen application credentials have been a route into cloud environments for about as long. What changed is that the steps between them no longer need a person. Searching, authenticating, enumerating permissions and adapting when a request fails can all run unattended, which is how the gap between a secret appearing in public and that secret being used closes to minutes.

Microsoft’s guidance for anyone who finds this activity is that revoking the exposed secret is where the response starts rather than where it ends. Teams also need to rotate what the affected application could read, look for credentials the attacker may have added, and check what the identity did while it was signed in.

Truffle Security is here to make secrets easier, because finding a secret isn’t the same as eliminating the risk. The agent in Microsoft’s report started on public GitHub, so that’s where to look first. TruffleHog Enterprise monitors public sources for secrets that belong to you, including ones pushed from personal accounts or by vendors, and tests which are still live. It routes each one to the owner who can revoke it, then retests to confirm the key is dead so teams have auditable proof of risk reduction. We wrote more about that gap in Finding Your Secrets Beyond the Sources You Control.

The Dig · Truffle Security Co.

Ready to talk to the team?

See how TruffleHog Enterprise finds your secrets on public GitHub and beyond, tests which are live, and routes each one to the owner who can revoke it.

infra