Independent analysis by NHI Mgmt GroupSource article: Truffle Security, “How an AI Agent Went From GitHub to Key Vault in Five Minutes” (November 11, 2026)

TL;DR: Truffle Security describes leaked application secrets moving from public GitHub to cloud data access in minutes, according to Microsoft Threat Intelligence research, because a valid secret authenticates the application itself and lets attackers operate within its existing permissions. Secrets detection now has to surface identity scope and revocation context before an attacker does.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Truffle Security's blog post: AI-driven secret hunting can turn a leaked application secret into authenticated cloud access within minutes, making identity scope and revocation context part of the detection itself.

Why it matters: This matters because service principal secrets are non-human identities with real blast radius, so teams need to treat discovery, attribution, and revocation as one workflow rather than separate steps.

By the numbers:

  • Truffle Security reported that 28 seconds elapsed before the same vault paths were retried with a supported API version and returned 200.

👉 Read Truffle Security's analysis of AI agent secret hunting from GitHub to Key Vault


Context

A leaked application secret is not just a credential leak, it is an identity leak: the secret authenticates a service principal, workload, or application account and inherits whatever that identity can already reach. In this case, the problem was not exploitation of a software flaw but the speed at which public secret exposure became usable cloud access.

When a service principal secret is exposed, the real question is not only whether the key works, but what the authenticated identity can enumerate, read, or assume next. That is why secrets governance has to connect inventory, ownership, and revocation before an attacker can do the same.


Key questions

Q: How do leaked application secrets turn into cloud access?

A: Leaked application secrets become cloud access when an attacker uses the secret to authenticate as the application, service account, or workload the secret belongs to. If that identity has API permissions, OAuth scopes, or role assignments, the attacker inherits them until the secret is revoked or rotated. Shared secrets often grant broad, persistent access.

Q: Why can a service principal secret expose more than one tenant?

A: A service principal secret can expose more than one tenant when the same application is registered or consented across multiple tenants and the secret is accepted wherever that service principal is trusted. One leaked secret may then let an attacker authenticate in every tenant using that application, especially if permissions or admin consent are broadly granted.

Q: What should teams do when a secret is compromised outside a code repository?

A: Teams should rotate the compromised key immediately, then trace where it was shared and used so related systems can be contained. They should also review adjacent tools and accounts for secondary exposure, because one leaked secret often reveals a wider trust path. Fast containment matters because remediation is resource intensive and affects engineering as well as security.

Q: What is the difference between detecting leaked credentials and validating credential exposure?

A: Detecting leaked credentials tells you that account data exists somewhere outside your control. Validating credential exposure tests whether those credentials can actually be used to access systems or identities that matter. The second step is more operationally useful because it separates noise from real risk and shows which accounts, services, or password patterns require immediate remediation.


Technical breakdown

How a leaked secret becomes authenticated cloud access

A service principal secret is a credential that lets an application prove who it is to a cloud identity provider. Once that secret is valid, the sign-in is legitimate from the platform's perspective, even if the holder of the secret is an attacker. The important point is that the credential does not create privileges on its own. It activates an identity that already has defined permissions, and the cloud then honors those permissions until the secret is revoked or the identity is constrained. Read the Ultimate Guide to NHIs: Static vs Dynamic Secrets.

Practical implication: Treat any exposed app secret as an active identity event, not a static leak report, and track which principal it authenticates immediately.

Why identity scope determines the blast radius

The ceiling here is set by the authenticated identity's entitlements, not by the fact that a secret was stolen. A low-value test application and a production service principal can both authenticate with a secret, but only one may be able to read storage, query subscriptions, or pull vault contents. That is why the same exposure mechanism can produce radically different outcomes. In multitenant services, the blast radius can extend beyond the leaking organisation into customer tenants that trusted the same application identity. See the Secrets Management Buyer's Guide.

Practical implication: Map every exposed secret to the exact identity, permissions, and tenant scope it unlocks before deciding which incident gets priority.

Why agentic secret hunting compresses response windows

The article's sequence shows an agentic workflow that can search, authenticate, enumerate, and adapt without waiting for a human decision loop. That matters because traditional secrets response assumes there is time to identify the owner, understand the reach, and rotate the credential after detection. When the attacker can automate the next step as soon as a request succeeds or fails, the time between discovery and abuse shrinks from hours to minutes. The operational problem is not just leakage, but unattended reuse at machine speed. See the AI Agent Observability, Audit and Incident Response Guide.

Practical implication: Assume secret exposure can be exercised almost immediately and move response logic into the discovery workflow itself.


Threat narrative

Attacker objective: The attacker aims to turn leaked application credentials into authenticated cloud access, then expand that access into secrets and tenant-level data exposure.

  1. Entry via a public GitHub secret search against exposed OAuth application secrets, service principal credentials, and AI service keys.
  2. Credential abuse when the valid secret authenticated the attacker as the application and enabled legitimate sign-in to Microsoft Entra ID.
  3. Escalation through permission enumeration and additional secret discovery, including storage account keys, connection strings, App Service settings, Kubernetes credentials, and Key Vault contents.
  4. Impact through data exfiltration from Azure Key Vault and broader access across multiple applications and tenants.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Identity scope, not secret possession, is the real control boundary: once a secret authenticates a service principal, the attacker inherits the permissions already attached to that identity. That means the security question is never simply whether a secret is live. It is what the identity can enumerate, read, and assume before revocation catches up. Practitioners should treat secret findings as identity findings, because the blast radius is defined by entitlement design, not by the leak itself.

Time-to-abuse has become part of the identity model: the five-minute case shows that the traditional assumption of a human-paced response window no longer holds for leaked machine credentials. Secrets programmes often rely on detection, triage, and ownership lookup happening after exposure, but automated credential hunting collapses that sequence. The implication is that revocation context must be attached at discovery time, not gathered later.

Multitenant application trust creates shared exposure: when a vendor's application secret is compromised at the source, the resulting access can extend into downstream customer tenants that authorised the same application. This is not a simple internal secret leak, it is delegated trust turning into distributed risk. Organisations need to model third-party NHI exposure as a tenant-to-tenant governance issue, not just a vendor hygiene problem.

Context-carrying detections are now the minimum viable control: a secret alert that does not identify the authenticating identity, the reachable resources, and the revocation owner is incomplete. NHI governance fails when it separates detection from decision-making. The right operating model collapses those steps into one outcome: identify, scope, and revoke before the credential is reused.

Ephemeral abuse is the named concept here: secret exposure now behaves like an ephemeral identity event, where discovery and exploitation can happen in the same short window. That changes how NHI programmes measure exposure, because the key risk is no longer only long-lived credentials but rapid, unattended reuse of valid ones. Teams should stop treating secret rotation as a post-alert cleanup step and start treating it as part of the finding itself.

From our research library:

What this signals

Secret exposure is now a timing problem: governance programmes that assume there is time to investigate before an attacker acts will keep losing ground. When a leaked secret can be searched, tested, and reused in one automated chain, the control that matters most is the one that tells responders what the credential unlocks before they start triage.

Cloud identity programmes should expect attackers to use valid application credentials as a discovery primitive, not just a login method. That shifts the programme focus from counting leaked secrets to shrinking the interval between detection, attribution, and revocation.


For practitioners

  • Map every secret to its authenticating identity Maintain an up-to-date inventory that links each exposed secret to the exact service principal, workload, or application it authenticates and the tenants it can reach.
  • Attach revocation context to each finding Present ownership, reachable resources, and revocation path in the same alert so responders can act without a separate investigation phase.
  • Prioritise multitenant application credentials first Escalate secrets that belong to shared or multitenant applications before isolated test credentials because source compromise can propagate into customer environments.
  • Assume public secret reuse is immediate Treat any public repository secret as potentially active until proven otherwise, and rotate adjacent credentials the same identity could use to expand access.
  • Retest revoked secrets for deadness Verify that the exposed credential no longer authenticates and confirm the identity cannot continue to reach storage, vault, or application resources.

Key takeaways

  • A leaked application secret is only the beginning of the problem, because the authenticated identity already carries the permissions that define the blast radius.
  • The documented case moved from public GitHub to Azure Key Vault in five minutes, and Microsoft reported dozens of successful service principal sign-ins across multiple tenants.
  • Teams should attach identity scope and revocation context to secret findings immediately, because detection without that context leaves responders behind the attacker.

Related NHI Mgmt Group resources: Ultimate Guide to NHIs: Static vs Dynamic Secrets · AI Agent Authorisation Guide · AI Agent Observability, Audit and Incident Response Guide · Agentic AI Identity Guide


Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakagePublic GitHub secret exposure is the entry point for the entire chain.
NHI-05 — Overprivileged NHIThe damage depends on how much the authenticated service principal can reach.
NHI-07 — Long-Lived SecretsThe case shows how quickly valid credentials can be abused before rotation catches up.
Recommendation — Scan repositories for exposed NHI secrets and revoke any credential that can still authenticate. Reduce service principal privilege so any leaked secret has a smaller blast radius. Shorten credential lifetime and force rotation for secrets that can be reused from public exposure.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe chain combines credential use with follow-on discovery across cloud resources.
Recommendation — Map leaked-secret activity to credential access and lateral movement analytics in your detection pipeline.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe core issue is what the authenticated identity can do once the secret works.
Recommendation — Review entitlements so exposed secrets cannot unlock excessive permissions or tenant reach.

Key terms

  • AI Agents: AI agents are autonomous software entities that act within organisational environments and make runtime decisions within assigned boundaries. They can hold identities, authenticate to systems, and exercise permissions, which makes them comparable to other non-human identities that require inventory, governance, and continuous activity monitoring.
  • Service Principal: An application identity object in Microsoft Entra ID and Microsoft 365 that represents a specific app inside a tenant. It holds permissions, ownership, and configuration data that define what the application can do. In NHI governance, it is a high-value identity that should be reviewed like any other privileged account.
  • Application Secret: A credential used by an application to authenticate to another system or service. This includes API keys, tokens, certificates, and similar authenticators that often persist outside normal human login workflows and can create durable access if exposed or reused.
  • Azure Key Vault: Azure Key Vault is a secret management service for storing credentials, API keys, certificates, and other sensitive material. It centralizes access to secrets and works best when paired with managed identities, so applications can retrieve what they need at runtime without hard-coding sensitive values in source files or configuration.

What's in the full article

Truffle Security's full blog post covers the operational detail this analysis intentionally leaves for the source:

  • The step-by-step sequence from GitHub secret discovery to Entra sign-in and Azure Key Vault access
  • The API version correction behaviour the agent used when requests initially failed
  • The multitenant exposure pattern that can extend one leaked application secret into customer environments
  • Microsoft's response guidance on revocation, adjacent credential rotation, and post-sign-in review

👉 Truffle Security's full post covers the five-minute attack chain, the permission ceiling, and the response actions it highlights

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org