Skip to content
Beta
All articles

Least privilege for agent tool calls: what an intent-graph audit found

A November 2026 paper checks every agent tool call against a plan drawn from the user's request. The allowlist did most of the work; the cost was blocked tasks.

By The SpanDock team

5 min read

A diagram of the audit: the user's request and the tool catalogue produce a small plan once per task; each tool call is checked by fast deterministic code; reads of the user's own data pass, flagged calls go to a reasoning reviewer, and the result is allow, flag or block

Most prompt-injection defences try to spot the attack in text. A paper posted on 8 November 2026 takes the older security route instead: decide up front which tools a task needs, then refuse everything else. On a standard benchmark, that cut attack success from 45.7% to 3.3%. It also flagged 40% of harmless tasks. The useful part is the breakdown in between: which checks earned their keep, and which cost more than they saved.

What the paper built

The paper, by Doron Shavit, describes a runtime audit in three steps.

  1. A plan, once per task. One model call reads the user's request and the deployment's tool catalogue, never tool outputs, and produces an "intent graph": the tools the task should need, limits on their arguments (scopes), and the order in which they should run.
  2. A deterministic check on every call. Plain code, with no model in the loop, compares each tool call with the plan. The median check takes about 5.7 microseconds.
  3. A reviewer for what's left. Calls that fail the check go to a reasoning model that sees the request, the plan, the call history without tool outputs, and the flagged call. It can check facts with a restricted Python-expression tool.

There is one more rule: lookups of the user's own data skip the audit, on the reasoning that an attack does its harm at a write or an outward step.

The threat model is indirect prompt injection. The attacker controls what tools return, such as documents, web pages and messages, but not the request or the catalogue. The paper does not test attacks designed against the audit itself.

How it was tested

The evaluation uses AgentDojo, a public benchmark of agent tasks with injected attacks: 97 tasks and 629 injection scenarios, with results reported on 76 held-out tasks. The author replayed logged traces of an older agent model rather than running a live agent. That matters, and we come back to it below.

What the results show

The allowlist did most of the work

Against the replayed traces, the full audit lowered trace-level attack success from 45.7% to 3.3%. But most of that came from the simplest part: refusing tools the plan didn't name. Adding argument scopes and ordering constraints on top of the allowlist cut attack success by a further 7 percentage points and flagged 24 points more benign tasks.

Ordering was the worst trade. Compared with scopes alone, it lowered attack success by 2.2 points while raising the share of benign tasks blocked from 16.2% to 31.1%. The paper calls ordering "the weakest component per unit of utility lost".

Plans miss tools people need

The generated plans were small: on average 3.5 steps and 4.1 tools, from catalogues of 11 to 28 tools. At least 15% of benign tasks needed a tool the plan left out, so an allowlist built this way blocks roughly that share of honest work. In practice, that number is the main cost of the approach.

Letting reads through was free, with one exception

Of the flagged benign calls, 44% were local reads such as listing channels or reading messages. Letting those through recovered utility and left attack success at the harmful step unchanged. The leanest configuration, allowlist plus scopes with local reads bypassed, blocked 8.8% of benign tasks at 4.3% harmful-step attack success.

The exception was fetching a web page. Bypassing it too raised attack success to 5.8%, "because a URL fetch can exfiltrate data". A read that reaches outside is not a read for this purpose.

The reviewer helped, carefully

The reasoning reviewer approved 22 to 25% of the flagged benign calls and none of the 226 to 242 flagged harmful ones, at about 3.6 seconds per escalated call. The author notes that call arguments reach the reviewer and are attacker-influenced, and that no adaptive attack on it was tested.

A simple baseline came close

AgentDojo ships its own defences, re-scored here on the same tasks. A prompt-injection classifier reached 7.9% attack success but cut benign utility to 42.1%. An LLM tool filter, which picks relevant tools from the task description before the agent runs, reached 6.5% with no loss of utility. The audit's allowlist alone was "statistically indistinguishable" from that filter on security. The extra machinery bought a few points more protection at a utility cost.

Limits to keep in mind

  • Replay, not live runs. Results come from logged traces of one older model, assuming the agent doesn't re-plan after a block. A live pilot with a current agent showed no baseline attack success, so end-to-end validation, in the author's words, "remains open".
  • One benchmark. Tasks are AgentDojo's, with small tool catalogues. Coding agents with shells and hundreds of MCP tools are a different setting.
  • Hand-classified reads. The read bypass depends on someone labelling tools correctly, and an attack that leaks data through reads alone would get past it.

These limits match a pattern we covered in What a low prompt-injection success rate doesn't tell you about an agent: numbers from one benchmark rarely transfer cleanly.

What it means for engineering and security leaders

The finding that generalises is not the intent graph. It is that limiting which tools an agent can call removes most of the measured attack success, at a known and visible cost in blocked work. That is ordinary least privilege, applied per task. It also suggests where to spend effort: tool allowlists and read-only defaults first, outward-reaching tools treated as writes, and finer-grained checks only where their false positives are affordable.

Practical takeaways

  • Start every agent integration read-only and add write tools deliberately, per team or per task type.
  • Treat any tool that sends data out, including fetching a URL, as a write for approval purposes.
  • Measure blocked work, not just blocked attacks. If your controls stop 15% of honest tasks, people will route around them.
  • Prefer deterministic checks on the hot path; keep model-based review for the small set of calls that fail them.
  • Be wary of ordering rules. In this study they cost the most utility for the least protection.

If your agents reach internal systems through SpanDock's MCP gateway (Premium and Enterprise plans), the same building blocks are available per connector: every connector starts read-only for everyone, read-only access hides write and destructive tools completely, and overrides can allow or deny tools by name or require approval for some of them.

Sources

  1. Shavit: Least-Privilege Auditing of Agent Tool Calls with Intent Graphs and Reasoning-Guided Escalation (arXiv 2611.11305, 8 November 2026)
  2. Debenedetti et al.: AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents (arXiv 2406.13352)
Cookie categories

Details: Cookie Policy.