TL;DR: Truffle Security traces how a valid secret authenticates the application itself and lets attackers operate within its existing permissions, based on Microsoft Threat Intelligence research, as leaked application secrets move from public GitHub to cloud data access in minutes. Service principal exposure becomes a live access path, so the response must understand identity scope before the secret is reused.
Editorial analysis by NHI Mgmt Group, based on content published by Truffle Security: “How an AI Agent Went From GitHub to Key Vault in Five Minutes”.
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.
Key questions
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.
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.
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.
Practitioner guidance
- 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.
Bottom line: A leaked application secret is only the beginning of the problem, because the authenticated identity already carries the permissions that define the blast radius.
Glossary terms: AI Agents, Service Principal, Application Secret, Azure Key Vault
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
👉 Read Truffle Security's analysis of AI agent secret hunting from GitHub to Key Vault →
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full 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.
A few things that frame the scale:
- 28.65 million new hardcoded secrets were detected in public GitHub commits in 2025 alone, a 34% year-over-year increase and the largest single-year jump ever recorded, according to the State of Secrets Sprawl 2026.
- Only 44% of organisations are currently using a dedicated secrets management system, according to the 2024 State of Secrets Management Survey.
A question worth separating out:
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.
👉 Read our full editorial: Leaked app secrets can grant GitHub-to-cloud access in minutes