liveBook · Manning

Defense in depth

As explained in AI Governance

Defense in depth is a security and safety strategy that layers independent controls so that failure or bypass of one control does not defeat the others.

An agent can encounter an attack despite policy enforcement and human oversight. Defense in depth layers controls so that one failure does not become a total compromise. For GenAI systems, this includes controls that operate independently of the model rather than relying on it to follow instructions under every input. section 4.8.7 section 6.5.1

Use layers that address different failure paths:

  • Contain the agent in a sandbox with only the system access needed for its work. Isolation limits the consequences of a successful attack, including data exfiltration, lateral movement, file tampering, and privilege escalation. section 4.8.7
  • Separate safety enforcement from model instructions. Route outputs through an independent moderation layer before they reach users, rather than relying solely on a prompt that an adversarial input could override. section 6.5.1
  • Log inputs, outputs, and relevant internal states to support moderation, auditing, monitoring, and improvement. Initial setup is sequential, but operational assurance continues as a loop. section 6.5.1

Containing a claims agent

ClaimAssist runs agent workloads in isolated containers. Network access is restricted to designated API endpoints, the filesystem is limited to a temporary directory cleared after each session, and the agent cannot start other programs. These boundaries constrain an attack that gets past policy and oversight, while still allowing access to the claims database. section 4.8.7

Containment is not an impenetrable barrier. Sandbox escapes remain possible, fresh environments can add latency, and boundaries require judgment: restrictions that are too tight prevent legitimate work, while loose restrictions provide little protection. Persistent memory is another concern; memory isolation provides a further layer alongside sandboxing. section 4.8.7

For output safety, a separate classifier can block an answer before delivery. Llama Guard and ShieldGemma are examples of classifiers; managed services are another option. NeMo Guardrails can define forbidden topics and conversation flows and track state across turns, which helps identify harms that emerge over a conversation. section 6.5.1

How AI Governance covers it

How deep it goes
Explains sandbox boundaries and trade-offs alongside logging and independent output moderation, with examples of implementation options.
Examples
Uses a claims agent with restricted containers and a separate moderation layer to illustrate layered protection.
What you can do after
Evaluate containment boundaries and select independent moderation options for a GenAI deployment.
How it connects
Connects sandboxing, memory isolation, human oversight, logging, and content moderation.

Also explained in

Compare how 11 books explain defense in depth →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Governance. The section links point to the parts of the book it draws on.