AI and Agent Security
Agents combine untrusted language, retrieved data, memory, models and tools; capability boundaries—not model obedience—control the outcome.
Frame the problem
Security starts with a concrete asset, attacker capability and trust crossing.
Why the system fails
The system treats generated output as authority and gives one agent broad tools, credentials and autonomy.
The important question is not “what is AI and Agent Security?” but “which assumption let untrusted data or an over-scoped identity cross untrusted context → model proposal → privileged tool?” Trace the decision at the boundary, then constrain what can happen after the first control fails.
Design the control in layers
Start with the control closest to the interpretation or privilege boundary: Keep authorization and policy outside the model Then add a control that reduces blast radius and telemetry that proves the decision was enforced.
The resulting design is not labelled secure. Record the identified controls, the known failure paths, the remaining exposure, and the evidence you would need during an incident.
| Prevent | Detect | Recover |
|---|---|---|
| Keep authorization and policy outside the model · Use narrow tools, scoped identity and approval for high-risk actions · Sandbox execution and isolate tenant context | Tool calls, policy denials, context provenance and unusual action chains | Contain the affected identity or component, scope impact from audit evidence, and preserve a regression test. |
Key points
- Asset: User data, tool capabilities, secrets and high-impact external actions.
- Boundary: Untrusted context → model proposal → privileged tool
- Primary control: Keep authorization and policy outside the model
- Detection signal: Tool calls, policy denials, context provenance and unusual action chains
- Always ask what limits damage when the primary control fails.
AI Security Failure Simulator
Change the system and observe which assumption moves.
- 01Valid loginThe attacker starts as an ordinary customer.
- 02 · TRUST CROSSINGChange resource IDA client-controlled identifier selects another record.
- 03Authentication passesThe cookie is valid; identity is known.
- 04 · TRUST CROSSINGOwnership check missingThe API loads by id without tenant/owner scope.
- 05Sensitive data returnedA valid 200 response makes the breach quiet.
Follow the attack
Safe conceptual simulation: capability → missing control → crossed boundary → asset impact.
- 1Attacker starts with: A user, document, website, tool result or poisoned memory item able to influence model context.
- 2The system treats generated output as authority and gives one agent broad tools, credentials and autonomy.
- 3The weak or missing boundary control is crossed: Untrusted context → model proposal → privileged tool
- 4Impact: Data exfiltration, unauthorized actions, persistent poisoning or destructive tool use.
- Data exfiltration, unauthorized actions, persistent poisoning or destructive tool use.
Defend, detect, recover
One prevention is a single point of security failure. Layer it and make failure observable.
- • Keep authorization and policy outside the model
- • Use narrow tools, scoped identity and approval for high-risk actions
- • Sandbox execution and isolate tenant context
- • Tool calls, policy denials, context provenance and unusual action chains
- • Contain the affected identity or component.
- • Scope access from audit evidence.
- • Fix the boundary and add a regression test.
- • Misconfiguration and new access paths can bypass the intended control.
- • A privileged insider or compromised control plane may still reach the asset.