Subscribe to the Non-Human & AI Identity Journal

Containment

The phase of incident response that stops an incident from spreading while preserving the evidence needed to investigate it. In cloud environments, containment often starts with identity revocation, isolation of workloads, and protection of logs before any system is terminated or cleaned up.

Expanded Definition

Containment is the incident response phase that limits an active security event while preserving evidence, reducing attacker mobility, and preventing the compromise from spreading into adjacent identities, workloads, or data stores. In NHI and agentic AI environments, containment is often identity-first: revoke tokens, disable compromised service accounts, isolate agent tool access, and protect logs before destroying the affected system. That sequencing matters because ephemeral credentials, cloud-native orchestration, and delegated automation can amplify a small compromise into a broad trust failure.

Definitions vary across vendors on whether containment includes eradication steps such as key rotation or image rebuilds, so practitioners should treat it as a controlled stabilisation phase rather than a full cleanup. In practice, containment should align with the NIST Cybersecurity Framework 2.0 approach to incident handling, while also preserving chain-of-custody for investigation and recovery. The most common misapplication is treating containment as “shut everything down,” which occurs when responders terminate workloads before revoking credentials or securing telemetry.

Examples and Use Cases

Implementing containment rigorously often introduces operational disruption, requiring organisations to weigh speed of isolation against service continuity, forensic integrity, and automated rollback risk.

  • Revoking a stolen cloud access token and forcing session invalidation while retaining audit logs for investigation, rather than deleting the affected workload immediately.
  • Quarantining an AI agent by removing tool permissions and outbound network access after abnormal prompt activity is detected, while preserving prompt and action logs.
  • Isolating a compromised Kubernetes namespace and protecting secrets stores so the attacker cannot pivot into adjacent services through reused credentials.
  • Temporarily blocking a suspicious service account in response to LLMjacking indicators, then reviewing access paths before re-enabling trusted automation.
  • Following lessons from the DeepSeek breach, teams may isolate exposed data services and immediately rotate credentials to stop further exfiltration.

Why It Matters in NHI Security

Containment matters in NHI security because compromised non-human identities often have broad, machine-speed reach across cloud APIs, CI/CD, and agent toolchains. A leaked secret or hijacked workload identity can be used to create more access, suppress logging, or trigger destructive automation before human responders finish triage. The operational mistake is assuming that containment can wait until the environment is fully understood; in NHI incidents, understanding often arrives only after access has already been abused.

NHIMG research shows why urgency is essential: in the LLMjacking report, exposed AWS credentials were accessed by attackers in an average of 17 minutes, and as quickly as 9 minutes in some cases. That pace leaves little room for indecision, especially when logs, secrets, and agent permissions all need protection at once. Containment is therefore not just a response step but a governance test of whether identity, telemetry, and isolation controls are ready before an incident occurs. Organisations typically encounter the cost of containment only after credential abuse or agent misuse is confirmed, at which point the response becomes operationally unavoidable to address.

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 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 RS.MI Incident mitigation and containment are core to limiting spread and restoring control.
OWASP Non-Human Identity Top 10 NHI-02 Compromised secrets and identity abuse require fast containment to stop lateral movement.
NIST Zero Trust (SP 800-207) Zero trust supports rapid trust removal and scoped isolation during incidents.

Apply zero-trust isolation so compromised identities lose access immediately and narrowly.