Agent Security Explained

/data

The recorded run

Everything the chapters quote, computed by the vendored engine as this page was built; the engine records the same run in policy_results.md. The tools, tasks, grants and sandbox actions are abstract placeholders; the published measurements are quoted from their papers.

Chapters 1 and 2: every task, two kinds of agent

taskclassic agent: allow / ask / denyplanned in advance: allow / ask / denylast call, classiclast call, planned
Summarise my notes into a file3 / 0 / 03 / 0 / 0allowallow
Read my inbox and notes, then reply to a colleague3 / 0 / 13 / 0 / 1denydeny
Send a colleague a summary of my notes, after looking up a page2 / 1 / 13 / 1 / 0denyask
Send me a digest of my inbox3 / 0 / 03 / 0 / 0allowallow
Read a web page and save a summary2 / 1 / 02 / 1 / 0askask
Share a public ticket's status with a colleague3 / 0 / 03 / 0 / 0allowallow

Chapter 3: the trifecta

Over all 256 subsets of the 8 tools, 136 hold all three circles; the trifecta check and the exhaustive search for a flow out agree on 256 of 256.

circles heldtrifectaflow out foundsequences checked
nonenonone0
privatenonone0
untrustednonone0
private+untrustednonone0
outboundnonone2
private+outboundnonone6
untrusted+outboundnonone6
private+untrusted+outboundyesread_notes → read_ticket → send_message (org)9
read_inbox+send_messageyesread_inbox → send_message (org)3
read_notes+fetch_pageyesread_notes → fetch_page → fetch_page (web)5

Chapter 4: least privilege

Summarise my notes into a file, and one call it does not need. Broad grant: 8 tools; least privilege: 3 (read_notes, summarise, write_file). Held but unused under the broad grant: read_inbox, read_ticket, search_docs, fetch_page, send_message.

callbroad grantleast privilegetoken, least privilege
read_notesallowallowtoken for notes-api holds notes:read
summariseallowallowsummarise runs in the model; no token needed
write_fileallowallowtoken for files holds files:write
send_messageaskdenyno token for mail-api

Chapter 5: sandbox layers

layersneeded, workingneeded, brokenunneeded, stoppedunneeded, open
none3005
fs_scope3023
fs_scope + container3032
fs_scope + container + egress3041

Part two's numbers are recorded in policy2_results.md.

Chapter 6: attempts through the detector layers

400 attempts, drawn with the engine's seeded generator; base rate 24%; expected values from the closed form in brackets.

shared blind spot cattemptssteer the model+ Provenance marking+ Input classifier+ Output check
0.0%400 (400.00)91 (96.00)3 (3.84)2 (0.77)2 (0.23)
0.5%400 (400.00)91 (96.00)4 (3.84)3 (1.14)3 (0.68)
1.0%400 (400.00)91 (96.00)3 (3.84)2 (1.51)2 (1.12)
2.0%400 (400.00)91 (96.00)4 (3.84)3 (2.27)3 (2.02)
4.0%400 (400.00)91 (96.00)3 (3.84)3 (3.84)3 (3.84)

Chapter 7: plan-then-execute

taskplanned: allow / ask / denyclassic agent: allow / ask / deny
Send a colleague a summary of my notes, after looking up a page3 / 1 / 02 / 1 / 1
Read a web page and save a summary2 / 1 / 02 / 1 / 0
Read my inbox and notes, then reply to a colleague3 / 0 / 13 / 0 / 1
File a ticket's summary wherever its category says2 / 1 / 02 / 1 / 0

Chapter 8: approval thresholds over the label policy

who must approvetasks finishedprompts per taskrisk per taskunchecked route
refuse45.8%0.0011.60%48.3%
policy72.5%0.3012.32%50.0%
consequential72.5%0.592.41%0.0%
every72.5%3.647.36%0.0%

Chapter 9: the frontier, an attacker who adapts to the detectors

120 benign tasks; base rate 50%; every detector layer passed (arXiv 2503.00061).

defencetasks finishedblockedprompts / taskextra calls / taskrisk / taskon the frontier
No defence100.0%0.0%0.000.0042.92%yes
Provenance marking100.0%0.0%0.000.0042.92%yes
Three detector layers95.1%0.0%0.002.0942.92%no
Approve every write and send100.0%0.0%0.780.008.90%yes
Label policy72.5%27.5%0.300.0025.67%no
Label policy, no approvals45.8%54.2%0.000.0024.17%yes
Label policy + least privilege72.5%27.5%0.300.0016.59%no
Plan-then-execute + policy + least privilege76.7%23.3%0.251.002.38%yes

Chapter 9: the frontier, fixed attacks (published rates)

120 benign tasks; base rate 24%.

defencetasks finishedblockedprompts / taskextra calls / taskrisk / taskon the frontier
No defence100.0%0.0%0.000.0020.60%no
Provenance marking100.0%0.0%0.000.000.82%yes
Three detector layers95.1%0.0%0.002.090.24%yes
Approve every write and send100.0%0.0%0.780.004.27%no
Label policy72.5%27.5%0.300.0012.32%no
Label policy, no approvals45.8%54.2%0.000.0011.60%no
Label policy + least privilege72.5%27.5%0.300.007.96%no
Plan-then-execute + policy + least privilege76.7%23.3%0.251.001.14%no

Chapter 10: the default design's checklist

chaptercheckverdictmeasured
1Every value carries a label, and every call is checked against the policypasslabels tracked
2No untrusted result can choose a write or send that nothing checkswarn4.2% of tasks have an unchecked route
3No task holds private data, untrusted input and an outbound channel unpolicedwarn52 of 120 tasks hold all three, and the policy denies the flow out
4Each task holds only the tools and scopes it needspass0.00 unneeded tools per task
5Code runs in a sandbox with a file scope, a container and an egress allow-listpass1 unneeded action still open, 0 needed broken
6Detectors are one layer, never the only onepassno detectors needed: the policy decides on labels
7Untrusted data cannot change the planpassplanned in advance
8Few prompts per task, so each approval gets attentionpass0.25 prompts per task
9The design sits on the security–utility frontier, within the risk budgetpass76.7% of tasks finish; risk 2.38% per task against an adaptive attacker

Published measurements

measurementvaluesource
InjecAgent: share of its test cases in which a ReAct-prompted GPT-4 agent was steered by text in a tool result (base setting; the enhanced setting nearly doubled it)24%arXiv 2403.02691
InjecAgent: test cases (17 user tools, 62 attacker tools)1,054arXiv 2403.02691
Spotlighting: attack success rate without the defence (GPT-family models; a lower bound)> 50%arXiv 2403.14720
Spotlighting: attack success rate with it (an upper bound)< 2%arXiv 2403.14720
AgentDojo: realistic user tasks97arXiv 2406.13352
AgentDojo: security test cases629arXiv 2406.13352
CaMeL: AgentDojo tasks solved with provable security77%arXiv 2503.18813
CaMeL: the same tasks solved by the undefended system84%arXiv 2503.18813