Join our Newsletter — 33% off our NHI Course
Home› FAQ› NHI Lifecycle Management› How do security teams know whether a CI…
NHI Lifecycle Management

How do security teams know whether a CI or NHI exposure has really been contained?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 6, 2026 Domain: NHI Lifecycle Management

Containment is real only when the exposed identities can no longer authenticate and the affected runners or endpoints no longer hold reusable secret material. Teams should verify revocation status, inspect where the credentials were used, and confirm that no surviving token, key or service account can still reach production-adjacent systems.

How to tell containment is real, not just assumed

Containment for CI or NHI exposure is only credible when the exposed identity can no longer authenticate and the surrounding execution environment no longer contains reusable secret material. That means checking the revocation state of the credential, not just resetting a password or deleting a reference. If the token, key, or service account can still be replayed anywhere, the exposure is not contained.

Practically, teams need to prove two things at once: the live access path is broken, and the old secret cannot be recovered from runners, endpoints, logs, caches, or build artifacts. That is why containment is a verification exercise, not a verbal declaration. It is also why CI incidents often require both credential invalidation and environment cleanup before the incident can be closed.

What evidence shows the credential path is really gone

The strongest evidence is negative evidence, namely the absence of a working authentication path where the exposure existed before. Security teams should confirm revocation at the issuer or control plane, then test the impacted account or token against the systems it could previously reach. If the identity still succeeds anywhere in the production-adjacent path, containment has failed even if the original secret was rotated.

Teams should also inspect usage history to identify where the credential was active, because containment depends on removing every surviving copy, not just the primary one. This includes inherited tokens in CI jobs, cached environment variables, local config files, container layers, and any delegated access maintained by the same service account. In CI/CD environments, a CI/CD Pipeline Identity Security Guide is a useful reference for validating keyless federation, token scope, and runner trust boundaries after an exposure.

Where the exposure involves non-human identities, it is useful to compare the current state against the original identity model. A surviving service account, reusable API key, or long-lived token means the compromise may still be live even if one secret instance was rotated. NHIMG’s Service Account Security Guide helps teams think in terms of account lifecycle, privilege, and hidden reuse paths rather than only secret replacement.

Why runners and endpoints must be treated as part of containment

Containment fails when the secret material survives on the machine even after the control plane has been updated. Build runners, developer endpoints, and ephemeral job containers can preserve credentials in shell history, temp files, mounted volumes, artifact metadata, or debugging output. In CI, the question is not only whether the token was revoked, but whether any copy of that token can still be extracted and used from the execution estate.

For NHI and CI incidents, this is where reuse risk becomes important. If the same credential was copied across jobs, environments, or tools, one successful revocation does not guarantee the whole exposure is gone. The broader NHI lifecycle view in Ultimate Guide to NHIs, Key Challenges and Risks is helpful because it ties containment to visibility, rotation, over-privilege, and unmanaged credentials, not only to the initial leak event.

Teams should verify that any runner or endpoint touched by the exposed secret has been reimaged, wiped, or proven free of recoverable credentials. If the job environment still has access to artifact stores, package registries, cloud APIs, or deployment systems using the same trust chain, then the exposure remains operationally active.

Risk and Threat Considerations

The main risk is false containment, where the incident appears closed because one secret was rotated while another copy still works. That creates a gap between control-plane action and real-world access, which is exactly what attackers exploit when they harvest credentials from CI logs, caches, or reused service accounts.

Failure mechanism: A token, key, or service account remains valid somewhere in the build or deployment path, or it is still recoverable from runner storage, logs, or artifacts. An attacker can reuse that surviving material to regain access, pivot into adjacent systems, or continue automated abuse.

Impact: Production-adjacent systems may remain reachable even after the initial exposure is believed to be contained, extending dwell time and increasing the chance of lateral movement, secret chaining, or unauthorized deployment activity.

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 provides the primary governance reference for this topic.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Improper OffboardingContainment depends on fully removing exposed non-human access paths and stale credentials.
NHI-02 — Secret LeakageThe question is about proving leaked CI or NHI secrets are no longer usable.
NHI-07 — Long-Lived SecretsLong-lived tokens or keys can survive initial response and defeat false containment.
Recommendation — Revoke surviving non-human access and verify no stale credential can still authenticate. Rotate exposed secrets and confirm they are absent from logs, caches, and artifacts. Replace long-lived secrets with short-lived credentials and validate expiry enforcement.

Practitioner Guidance

What to verify: Confirm revocation at the authoritative issuer, then prove the exposed identity fails wherever it previously authenticated. If the test still succeeds from any path, treat the incident as unresolved rather than partially contained.

What to prioritize: Focus first on the highest-value secrets, the runners or endpoints that handled them, and any shared credentials that could recreate access elsewhere. A single surviving shared token is more important than a long list of rotated low-value secrets.

Decision rule: If you can revoke the credential but cannot prove the execution environment is clean, do not close the incident. Containment is complete only when both access and recoverability have been eliminated.

Practitioner takeaway: In CI and NHI incidents, revocation is necessary but not sufficient, because the incident is still open until the old credential cannot authenticate anywhere and no reusable copy survives in the environment.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 6, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org