By NHI Mgmt Group Editorial TeamBased on Truffle Security: “Why exposed credentials stay live for years” (September 22, 2026)

TL;DR: Truffle Security found 543,699 credentials that still authenticated across 224 million public repositories used to train AI models, with a median exposure period of more than two years and the oldest dating back to 2009. Detection without verified revocation leaves active access in place, so secrets programmes need lifecycle controls, not just scanning.


At a glance

What this is: Truffle Security reports that exposed credentials can stay live for years, and that finding a secret is not the same as revoking the access behind it.

Why it matters: This matters because IAM and NHI teams need proof of revocation, ownership, and access scope, not just detection alerts, if they want to reduce real exposure.

By the numbers:

👉 Read Truffle Security's analysis of why exposed credentials stay live for years


Context

Exposed credentials are a governance problem, not just a detection problem. A secret that appears in public code, logs, or workflows can remain valid long after it is discovered, and security teams often cannot prove whether the underlying access was actually removed.

For NHI programmes, the key question is no longer only where secrets were found but whether they were revoked, by whom, and against which service. Leaked credential response playbooks help because they turn a finding into a revocation workflow instead of a closed ticket.


Key questions

Q: How should security teams monitor for exposed credentials before attackers use them?

A: Security teams should treat credential breach monitoring as a continuous control, not a one-time check. Start by identifying the identities and email addresses that matter, then query breach intelligence for exposure across usernames, passwords, API keys, and related login data. The goal is fast detection and response, so teams can force resets, revoke access, and investigate misuse before stolen credentials are reused.

Q: Why do exposed credentials remain dangerous even when they are old?

A: Because age does not reduce validity. A credential may have been exposed for years and still authenticate successfully if nobody rotated or disabled it. The real risk is not how long it has been visible, but whether the identity behind it still has working access.

Q: How do security teams know if exposed secrets are becoming a real risk?

A: The clearest signal is whether the secret can still authenticate and whether it can reach high-value actions after login. If a leaked key can enumerate resources, create identities, or modify policy, it is already a breach-enabling identity. Inventory alone is not enough unless revocation and scope reduction follow quickly.

Q: Should organisations prioritise short-lived credentials over legacy tokens?

A: Yes, when the platform supports both. Short-lived credentials reduce the duration of misuse and force periodic re-validation, while legacy long-lived tokens tend to persist until someone notices them. The right sequencing is to shrink standing access first, then tighten review and revocation around whatever remains.


Technical breakdown

Why detection does not equal revocation

Secret scanning finds likely exposures, but it does not change the authentication state of the credential. A discovered key may still be valid, may have been rotated already, or may be an example value that never worked. The operational gap is between identifying a secret and proving that the service issuing it no longer accepts it. That is why exposed-credential programmes need verification steps that test the live credential against the issuer, rather than treating repository cleanup as remediation. Practical implication: separate discovery from proof of invalidation and treat them as different workflow states. See the API Key Management Guide.

Practical implication: Validate exposed credentials against the issuing service before marking them resolved.

Why ownership and access context matter

A live credential tells you that active access exists, but not what that access reaches. One token may open a test system while another reaches production data, cloud infrastructure, or downstream services. That is why the identity behind the secret matters: owner, permissions, and reachable resources determine impact and response priority. In NHI governance terms, the secret is only the surface of the problem. Practical implication: build inventory and classification around the NHI behind each credential, not just the file or repository where it was found. Read the Ultimate Guide to NHIs: Static vs Dynamic Secrets.

Practical implication: Map each credential to its owner, permissions, and reachable systems before assigning remediation priority.

Why removal from a repository is not enough

Deleting a file, rewriting history, or removing a repository copy changes where the secret appears, but not whether the issuer still honours it. The access persists until the credential itself is revoked and then re-verified. This is a lifecycle issue, not a storage issue. In practice, teams often mistake disappearance from a source location for actual containment, which leaves a valid credential in circulation. Practical implication: define completion as revoked and re-tested, not merely removed from the place of exposure. See the Leaked Credential and Secret Incident Response Playbook.

Practical implication: Require revocation and re-verification before closing any exposed-secret case.


Threat narrative

Attacker objective: The objective is to use a publicly exposed but still-valid credential to reach the systems and data behind it before the organisation revokes access.

  1. Entry occurs when a secret is committed to a public repository, copied into a public dataset, or otherwise exposed in a source that outsiders can access.
  2. Credential access follows because the exposed value still authenticates against the issuing service, often long after discovery.
  3. Impact occurs when the still-valid credential is used to reach systems, data, or cloud resources that the organisation assumed were no longer exposed.

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

Detection is not the control, revocation is. Secret scanning creates awareness, but the risk persists until the credential stops authenticating. That distinction matters because many security programmes still measure discovery volume rather than confirmed invalidation. The practical boundary is simple: if a credential can still log in, the exposure is still active. The implication is that exposed-secret governance must be judged by outcome, not by alert count.

Revocation ownership is the hidden failure mode. The article shows why exposed credentials stay live: the people who find them often cannot revoke them, and the people who can revoke them often never see the exposure. That governance mismatch is the real control gap. It turns remediation into a coordination problem across security, application, and platform teams, which means lifecycle accountability must be explicit.

Credential exposure is a lifecycle problem, not an event. Once a secret reaches public space, the governance question shifts from detection to state change. The relevant control failure is not that the secret existed, but that its valid state outlived discovery, cleanup, and ticket closure. Practitioners should treat exposed secrets as managed identity records with a revocation state, not as one-time findings.

Static secrets create identity blast radius. A secret that can survive exposure for years creates a long tail of unauthorised access potential, especially when the same credential spans SaaS, cloud, CI/CD, and AI workflows. That broad reach is why identity scope and issuance design matter as much as scanning. The implication is that exposure management has to be built around the access path, not the file path.

Short-lived credentials reduce the value of discovery lag. The longer a secret remains valid, the more damage a missed detection or delayed owner handoff can cause. The article makes the case for preferring credentials that expire quickly and are easier to verify and revoke. For practitioners, the real question is how much live access remains possible between discovery and enforcement.

From our research library:

What this signals

Exposed-secret governance now has to operate like a state machine. Teams need to know not just that a secret was found, but whether it is live, who owns it, what it reaches, and whether the issuer has invalidated it. That shifts the programme from hunting to lifecycle control, where proof matters more than alerts.

The practical boundary for many identity teams is moving from discovery tooling to revocation orchestration. When credentials can survive in public for years, a secret-management programme must coordinate scanners, ownership resolution, issuer-side revocation, and post-revocation checks as one control path.

Secret sprawl becomes identity sprawl when every exposed value may still authenticate. That is why the next maturity step is not broader scanning alone, but tighter linkage between NHI inventory, credential lifetime, and proof of invalidation. Public exposure only stops being material when the access behind it is gone.


For practitioners

  • Define exposed-secret remediation as revoked and re-verified Do not close a finding when the repository copy is removed. Require proof that the issuing service no longer accepts the credential, then record that verification result in the case file.
  • Map every exposed credential to its owning NHI Record the service, workload, API, or AI workflow behind each secret so responders know which system can actually revoke it and what access the credential reaches. Read the Ultimate Guide to NHIs: Static vs Dynamic Secrets.
  • Separate discovery from invalidation in your workflow Treat detection, validation, revocation, and post-revocation testing as distinct steps so a finding does not move to closed before access is actually removed.
  • Shift high-risk credentials to short-lived patterns Reduce the number of secrets that remain useful after exposure by replacing persistent credentials with time-bound alternatives where the workload and platform support it. See the Secrets Management Guide.

Key takeaways

  • The core risk is not exposure alone, but exposed credentials that remain valid long after they are discovered.
  • Truffle Security’s analysis found 543,699 still-authenticating credentials in public repositories used for AI training, showing how long unresolved secrets can persist.
  • Effective remediation means revocation plus re-verification, because removing a secret from a file does not prove the underlying access is gone.

Related NHI Mgmt Group resources: Leaked Credential and Secret Incident Response Playbook · Secrets Management Guide · Ultimate Guide to NHIs: Static vs Dynamic Secrets · Guide to the Secret Sprawl Challenge


Key terms

  • Exposed Credentials: Exposed credentials are authentication secrets that have been leaked, stolen, or discovered in breach material, malware data, or other threat intelligence sources. They can include passwords, API keys, and usernames tied to real accounts. Once exposed, they should be treated as compromised until proven otherwise.
  • Credential Revocation: Credential revocation is the process of disabling a secret, token, or key so it can no longer authenticate or authorize action. It is the operational half of detection, because exposed credentials remain dangerous until they are invalidated and replaced across every dependent system.
  • Secrets Sprawl: The uncontrolled proliferation of sensitive credentials, API keys, tokens, passwords, certificates, across codebases, cloud environments, CI/CD pipelines, and configuration files. In 2024, over 50 million leaked secrets were found on the dark web.
  • Credential Lifecycle: Credential lifecycle is the process of issuing, rotating, expiring, and revoking secrets, certificates, and tokens across their usable life. For non-human identities, lifecycle discipline is the core control that separates temporary access from persistent exposure.

What's in the full report

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

  • The repository-level analysis method behind the 543,699 still-authenticating credentials
  • The verification workflow used to distinguish live secrets from inactive findings
  • The revocation and re-check sequence needed to prove remediation actually removed access
  • The cross-environment exposure patterns spanning code, CI/CD, SaaS, cloud, and AI workflows

👉 The full Truffle Security post covers the exposure data, verification logic, and revocation gap in more detail.

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 October 19, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org