Audit, Detection, and Incident Response › Incident response
Language AI HandbookAll chapters NIST SP 800-61 Rev. 3 puts preparation, detection, response, and recovery within ongoing risk management. This example uses a small ordered timeline to make its response decisions visible. Live teams may carry out preservation, scoping, and containment concurrently.
The initial signal can be wrong, and the scope may be unclear. Assign ownership early so preservation, containment and investigation can start when needed. Keep a record of the evidence used and revisit the decision as the scope becomes clearer.
The lifecycle
1. Triage and declaration. Confirm the signal is real enough to act on, assign severity, and name an incident commander. The hardest call is declaring early enough to contain without crying wolf; a documented severity rubric resolves it in advance so nobody negotiates at 3 a.m.
The naming of a single incident commander is not ceremony; it is what resolves the coordination problem that otherwise paralyzes a response. Without a commander, responders each pursue their own hypothesis, edit each other's changes, and duplicate work, and the incident proceeds at the speed of the slowest conversation. With a commander, one person decides priorities and the rest execute, which is dramatically faster. The severity rubric exists so the commander's first decision (how seriously to take the signal) is made against a written standard rather than against the pressure of the moment.
2. Evidence preservation. Capture relevant evidence promptly. Record who collected it, when, where it came from, and how its integrity is checked. Keep controlled read access and preserve the originals. Copies of the current policy version, independent audit checkpoints, and tool outcomes can help reconstruct the event. OWASP Logging Cheat Sheet
Containment actions can change the state investigators need. Capture that state first when it is safe to wait. During ongoing harm, start containment immediately and preserve what you can in parallel or as soon as conditions allow.
Assign preservation and containment to different responders when both need to proceed quickly. Note any evidence that became inaccessible after containment so the investigation can account for the gap.
3. Containment. Limit blast radius without destroying the ability to investigate. The primary tool is the kill switch, which we discuss next. Containment options, roughly in order of increasing disruption: revoke a specific credential, disable a specific tool/skill, quarantine a session or actor, roll back to a known-good model/policy version, and finally suspend the whole agent system.
Choose the smallest containment action that can interrupt the harm under the evidence you have. An independently confirmed single-credential incident may call for revoking only that credential. When scope is uncertain and harm is ongoing, start containment promptly. Preserve evidence in parallel if possible and revisit the affected scope as records become available.
4. Investigation / scope determination. Now use the preserved evidence to answer the questions: what happened, on whose behalf, why (which inputs), how far did it spread (other traces, actors, resources), and is it still happening? This is where the audit trail earns its cost; if you cannot answer scope from the trail, the incident is open-ended and you treat the blast radius as "everything the agent could touch."
The phrase "treat the blast radius as everything" is the conservative default that governs an investigation with incomplete evidence. If the trail cannot bound the incident, you cannot assume it was small; the prudent course is to assume the maximum plausible scope and spend containment effort accordingly. This is expensive, which is precisely why a complete audit trail pays for itself: a trail that answers the scope question converts an expensive worst-case response into a cheap targeted one.
5. Recovery. Address the failure, restore narrow permissions first, and verify both the intended service behavior and its authorization checks. Use the original detector as one signal and check for new or unrelated failures during the canary.
6. Post-incident review and learning. A blameless retrospective that produces concrete, tracked changes: a new detector or signature, a tightened permission, a documentation fix, a test that reproduces the incident (as a defensive fixture). Detection improves in this step or it doesn't improve at all.
The blameless framing is not a courtesy; it is what makes the review useful. If the review is about assigning fault, participants will withhold information to protect themselves and the review will produce a comfortable narrative rather than an accurate one. If the review is about producing changes, participants will share what actually happened, and the output is a set of tracked changes that make the next incident less likely or less costly. The tracked-changes discipline is what distinguishes a review that improves the system from a review that merely commemorates it: a finding with no owner and no due date is a finding that will recur.
The kill switch
A kill switch is a pre-authorized control for suspending agent activity. Decide which actions it covers, who can use it, and how fast it must take effect. Test those conditions before relying on it.
- Granularity. A single global off-switch is easy to reason about but over-broad: killing everything for one bad session destroys legitimate work and trains operators to avoid using it. A tiered switch (per actor, per tool, per tenant, global) lets containment match blast radius.
- Authority and pre-authorization. Someone must be authorized in advance to throw the switch, and it must not require a change review. At 3 a.m. you cannot convene a committee. Pre-authorize a named on-call role.
- Fail-safe by default. Choose a failure policy for each class of action. For high-impact outbound writes, an unavailable authorization control can fail closed while independent read-only functions remain available. If the switch's own control plane is compromised or unreachable, the safe behavior is to halt, not to run. This is the hardest property to get right because it trades availability for safety, and it must be an explicit, documented decision.
- Tested. An untested kill switch is a hope. It must be exercised on a schedule in a drill, exactly as live evaluation exercises agent harnesses.
- Reversible with verification. Resuming is as dangerous as stopping. Resume only after recovery verification via detectors, and resume at reduced scope first.
The "train operators to avoid using it" point in the granularity bullet is the subtle one. A switch that causes unacceptable collateral damage when thrown is a switch that operators learn not to throw, so the switch fails at the moment it is most needed. Granularity is what keeps the switch usable: an operator who can halt one tool without halting the entire system will throw the switch readily, so the tiered switch is thrown more often than the global one even though it is more complex, and being thrown is what makes it effective.
Place suspension enforcement outside the model or agent process. A gateway can consult independent policy before permitting the covered operation. Test each route that can perform that operation, including retries or queued work that might have started earlier.
Recovery, rollback, and verification
When recovery includes a rollback, identify the known configuration and check that the release is compatible with it. Re-enable a bounded canary and collect authorization failures, content or action regressions, and service-health signals. A quiet canary is evidence about that selected slice and observation period.
Set a canary observation window and conditions for continuing, stopping, or narrowing the rollout. Check the original incident indicator alongside independent service and authorization checks. A short window may contain too few cases to assess a rare failure.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!