分类规则与原始字段
攻击方法 · attack
sis. Across AgentDojo and InjecAgent, AgentCap reduces
attack success in every evaluated model–benchmark setting, including zero attack success with GPT-5.4 on b
评测治理 · benchmark
entCap reduces
attack success in every evaluated model–benchmark setting, including zero attack success with GPT-5.4 on both benchmarks. Controlled
adversarial scen
提示注入 · prompt injection
ges, and prior tool outputs. Consequently, an indirect prompt injection need not bypass an explicit authorization check. It can instead redirect an already authorized agen
数据投毒 · poisoning
Du, H., &
Li, X. (2026). MCPTox: A Benchmark for Tool Poisoning on Real-World MCP
Servers. In Proceedings of the AAAI Conference on Artificial
Intelligence, 40(42)
隐私泄露 · privacy
BAS: Defending LLM Agents Against Prompt Injection and
Privacy Leakage. arXiv:2502.08966.
https://arxiv.org/abs/2502.08966
[8]
Debenedetti, E., Shumailov, I., Fan
机密性 · credential
sensitive argument for example, a payment recipient or
credential with this provenance check. AgentCap records the values made
available through each source during e
完整性 · poisoning
Du, H., &
Li, X. (2026). MCPTox: A Benchmark for Tool Poisoning on Real-World MCP
Servers. In Proceedings of the AAAI Conference on Artificial
Intelligence, 40(42)
LLM · llm
ap : Capability-Based Runtime Authorization for Secure LLM Agent Execution
\workshoptitle
Agents in the Wild
AgentCap: Capability-Based Runtime Authorization
Agent · agent
Capability-Based Runtime Authorization for Secure LLM Agent Execution
\workshoptitle
Agents in the Wild
AgentCap: Capability-Based Runtime Authorization for Se
工具调用 · tool use
tion can turn untrusted content into attacker-directed
tool use [3], motivating enforcement outside the
model. Progent, MiniScope, ClawGuard, and ScopeGate constra
{
"ai_relevance": {
"evidence": [
{
"end_offset": 64,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 61
},
{
"end_offset": 178,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 175
},
{
"end_offset": 35742,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 35739
},
{
"end_offset": 35865,
"location": "title_and_content",
"quote": "Artificial Intelligence",
"rule": "ai_term",
"start_offset": 35842
},
{
"end_offset": 36126,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 36123
},
{
"end_offset": 36463,
"location": "title_and_content",
"quote": "Large Language Model",
"rule": "ai_term",
"start_offset": 36443
},
{
"end_offset": 36736,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 36733
},
{
"end_offset": 36998,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 36995
},
{
"end_offset": 38340,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 38337
},
{
"end_offset": 38838,
"location": "title_and_content",
"quote": "Machine Learning",
"rule": "ai_term",
"start_offset": 38822
},
{
"end_offset": 39041,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 39038
},
{
"end_offset": 39602,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 39599
},
{
"end_offset": 39798,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 39795
},
{
"end_offset": 2546,
"location": "title_and_content",
"quote": "prompt injection",
"rule": "ai_attack",
"start_offset": 2530
},
{
"end_offset": 32279,
"location": "title_and_content",
"quote": "prompt injection",
"rule": "ai_attack",
"start_offset": 32263
},
{
"end_offset": 35797,
"location": "title_and_content",
"quote": "Prompt Injection",
"rule": "ai_attack",
"start_offset": 35781
},
{
"end_offset": 37030,
"location": "title_and_content",
"quote": "Prompt Injection",
"rule": "ai_attack",
"start_offset": 37014
},
{
"end_offset": 39643,
"location": "title_and_content",
"quote": "Prompt Injection",
"rule": "ai_attack",
"start_offset": 39627
}
],
"matches": [
{
"end_offset": 64,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 61
},
{
"end_offset": 178,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 175
},
{
"end_offset": 35742,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 35739
},
{
"end_offset": 35865,
"location": "title_and_content",
"quote": "Artificial Intelligence",
"rule": "ai_term",
"start_offset": 35842
},
{
"end_offset": 36126,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 36123
},
{
"end_offset": 36463,
"location": "title_and_content",
"quote": "Large Language Model",
"rule": "ai_term",
"start_offset": 36443
},
{
"end_offset": 36736,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 36733
},
{
"end_offset": 36998,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 36995
},
{
"end_offset": 38340,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 38337
},
{
"end_offset": 38838,
"location": "title_and_content",
"quote": "Machine Learning",
"rule": "ai_term",
"start_offset": 38822
},
{
"end_offset": 39041,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 39038
},
{
"end_offset": 39602,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 39599
},
{
"end_offset": 39798,
"location": "title_and_content",
"quote": "LLM",
"rule": "ai_term",
"start_offset": 39795
},
{
"end_offset": 2546,
"location": "title_and_content",
"quote": "prompt injection",
"rule": "ai_attack",
"start_offset": 2530
},
{
"end_offset": 32279,
"location": "title_and_content",
"quote": "prompt injection",
"rule": "ai_attack",
"start_offset": 32263
},
{
"end_offset": 35797,
"location": "title_and_content",
"quote": "Prompt Injection",
"rule": "ai_attack",
"start_offset": 35781
},
{
"end_offset": 37030,
"location": "title_and_content",
"quote": "Prompt Injection",
"rule": "ai_attack",
"start_offset": 37014
},
{
"end_offset": 39643,
"location": "title_and_content",
"quote": "Prompt Injection",
"rule": "ai_attack",
"start_offset": 39627
}
],
"method": "explainable_keyword_rules",
"reason": "Matched AI topic or component evidence",
"relevant": true
},
"entity_ids": [],
"facts": [],
"method": "source_grounded_extraction",
"unknown_fields": [
"affected_products",
"affected_versions",
"fixed_versions",
"cvss",
"mitigations",
"references",
"papers",
"poc"
]
}
原始采集文本
\workshoptitle
Agents in the Wild
AgentCap: Capability-Based Runtime Authorization for Secure LLM Agent Execution
Aravinda Kashyap Kabbinamakki Suresh
Affiliation: Virginia Tech
Affiliation: Blacksburg, VA, USA
Email: aravindakashyap@vt.edu
Peng Gao
Affiliation: Virginia Tech
Affiliation: Blacksburg, VA, USA
Email: penggao@vt.edu
Abstract
Language-model agents commonly collapse two decisions that security systems
separate: selecting an action and determining whether that action is
authorized. When a model exercises standing authority, indirect prompt
injection can convert influence over its reasoning into unauthorized effects.
We present AgentCap, a runtime authorization layer that externalizes this
decision from the model and mediates every tool invocation through an MCP
wrapper. Each request declares an intent, and AgentCap evaluates policy
constraints over trust, workflow prerequisites, mutually exclusive authority,
and the provenance of security-sensitive arguments. Authorized requests receive
short-lived, budget-bounded capability tokens that are validated at the tool
boundary. Delegation is restricted to session-bound parent–child chains that
preserve action and resource while budget and lifetime can only be attenuated, preventing
authority from being expanded or reused across unrelated agent sessions. A
declarative policy language provides a common representation for runtime
enforcement and predeployment analysis. Across AgentDojo and InjecAgent, AgentCap reduces
attack success in every evaluated model–benchmark setting, including zero attack success with GPT-5.4 on both benchmarks. Controlled
adversarial scenarios further show that AgentCap blocks every attempted
unauthorized execution (ASR 0%) while preserving all legitimate operations exercised.
These results demonstrate that agent security requires authorization of
model-proposed effects at the tool boundary, independently of the model’s
reasoning.
1 Introduction
Tool-using language-model agents collapse a distinction that conventional security architectures treat as fundamental: the separation between proposing an action and authorizing its execution. An agent selects tool calls while operating with credentials that often remain valid throughout an entire session. Its decisions are simultaneously conditioned on potentially adversarial content, including retrieved documents, messages, web pages, and prior tool outputs. Consequently, an indirect prompt injection need not bypass an explicit authorization check. It can instead redirect an already authorized agent toward an attacker-selected action [3, 4, 6]. This coupling between model inference and ambient authority turns failures of instruction following into security violations.
Existing defenses address important parts of this problem but do not by themselves establish a per-invocation authorization boundary. Prompt filtering and model alignment attempt to prevent untrusted content from influencing behavior, yet their decisions remain probabilistic and operate within the reasoning process targeted by the attacker. Identity- and role-based policies restrict the tools available to an agent, but commonly grant authority at session scope rather than for a particular task or invocation. Expiration and rate limits restrict when and how often credentials may be used, but cannot distinguish a legitimate call from an attacker-directed call made within the same limits. Recent systems therefore move enforcement outside the model through deterministic call policies, task-specific permission structures, and information-flow controls [9, 14, 10, 18]. These developments motivate a stronger principle: every model-generated action should be treated as an untrusted request whose authority must be established independently.
We present AgentCap, a capability-based authorization layer for AI agents. Capability systems attach authority to an unforgeable object that denotes a specific permission rather than to the ambient identity of its holder, an abstraction introduced to address confused-deputy failures [1]. AgentCap mediates every proposed tool invocation through a deterministic authorization gate placed between the agent and its tools. The gate evaluates the request independently of the model and forwards it to the underlying tool only when the applicable authorization conditions are satisfied. An approved request receives a short-lived signed capability scoped to an action, resource, session, declared intent, and invocation budget. A separate gateway verifies this capability before forwarding the call to the underlying tool. Action selection consequently remains with the model, while authority is determined and enforced outside it.
Capability scoping alone is insufficient when an attacker manipulates the arguments of an otherwise legitimate operation. AgentCap therefore incorporates parameter-level provenance into authorization. The policy associates content-producing tools and selected output fields with integrity labels, then checks whether security-sensitive arguments are supported by trusted task context. Consider an injected transaction record that instructs the agent to transfer funds to an attacker. Although the resulting payment may carry a valid high-level intent, its recipient originates only from untrusted content. The provenance check rejects this instantiation of the operation without prohibiting legitimate payments authorized by the user. This design extends recent information-flow approaches that distinguish trusted instructions from lower-integrity data [10, 7].
The authorization state also evolves during execution. Suspicious requests and
execution outcomes update a per-agent trust state, with threshold crossings
triggering capability revocation or sandboxing. Delegation across agents is
represented as a signed attenuation chain: each hop preserves the authorized
action and resource, never increases the lifetime or budget, and strictly
reduces the remaining delegation depth. Capabilities remain bound to their agent lineage and session, preventing agents in unrelated sessions from reusing or extending delegated
authority. A compact declarative policy language specifies capability grants, prerequisites, mutually exclusive permissions, delegation constraints, trust responses, provenance requirements, and valid workflows. Because these relationships are explicit, a static analyzer can detect policy interactions before deployment.
Contributions.
This work makes three major contributions:
•
Capability-based authorization for single- and multi-agent
execution.
We introduce signed, agent- and session-bound capabilities that constrain
tool authority by action, resource, intent, lifetime, and budget. Authority
may cross agents only through explicit parent-to-child delegation, with
attenuation preventing a child from exceeding the authority of its parent
or reusing authority from an unrelated session.
•
An MCP-integrated enforcement architecture.
We implement AgentCap as an MCP wrapper and authorization gateway. The
wrapper obtains request-scoped authority for each proposed invocation, and
the gateway forwards the call only after validating the resulting
capability. A declarative policy language unifies capability issuance,
workflow prerequisites, mutually exclusive permissions, argument
provenance, trust-triggered revocation, and delegation constraints.
•
Static and empirical validation.
A surface analyzer detects over- and under-permissive policy interactions
before deployment. Across the complete AgentDojo suite and
InjecAgent, AgentCap reduces attack success in every evaluated
model–benchmark setting and reaches zero attack success with GPT-5.4 on
both benchmarks. Controlled single- and multi-agent scenarios additionally
block every attempted unauthorized execution while preserving all
legitimate operations exercised.
2 Threat Model
We consider single- and multi-agent systems in which an adversary may control retrieved content, tool outputs, or inter-agent messages and thereby cause the model to propose attacker-selected tool calls and arguments. The model is not trusted to interpret untrusted content correctly or enforce authorization policy. We trust AgentCap’s policy engine, MCP wrapper, authorization gateway, cryptographic keys, and underlying transport; the adversary cannot forge signatures or bypass the mediated tool interface. Our security objective is to ensure that a compromised agent can exercise only the authority encoded in a valid capability, and that authority crosses agent boundaries only through policy-authorized, attenuating parent-to-child delegation.
AgentCap treats the policy, provenance labels, and outcome labels as
security-critical configuration supplied by the deployment environment, not as
facts inferred from the model. This makes the trust boundary explicit and
reviewable: a policy author must correctly identify the actions a task may
perform, the sources that may justify protected arguments, and the outcomes
that warrant containment. The policy compiler, surface analyzer, and audit log
support review of these artifacts, but cannot compensate for an incorrectly
trusted source or an over-permissive policy. Under these assumptions,
AgentCap’s guarantee is deterministic: a proposed effect reaches a tool only
when it satisfies the configured authorization policy.
3 The AgentCap Architecture
The AgentCap architecture is organized around a single security invariant: no model-generated tool call reaches an MCP server without independently authorized and verifiable authority. AgentCap separates action proposal, capability issuance, and capability verification into distinct trust domains. The MCP wrapper serves as the agent’s tool interface, while the policy engine determines whether a requested action is admissible and issues a narrowly scoped capability when authorization succeeds. Capabilities are bound to the agent and session for which they are issued, thereby isolating the authority available to concurrent agent sessions. Within a multi-agent session, a parent agent may explicitly delegate a subset of its authority to a child agent. The resulting capability is bound to that child and cannot exceed the parent’s permitted action, resource scope, lifetime, budget, or delegation depth. Agents outside this delegation lineage cannot exercise its capabilities, even if the orchestration layer permits them to exchange messages. Communication therefore does not imply authority: an agent may provide information to another agent, but any subsequent access to or modification of external resources remains subject to the receiving agent’s own capabilities. The authorization gateway verifies these constraints immediately before forwarding an invocation to the underlying MCP server.
Figure 1: The AgentCap architecture. Step 1 (capability issuance): the
developer’s policy is compiled into the rules loaded by the policy engine,
and the surface analyzer checks the same policy before deployment. The
agent, which may be steered by untrusted content, proposes a tool call with a
declared intent (1). The policy engine checks the agent (not sandboxed,
trust at or above its threshold), the request (tool in the catalog, intent
permitted, argument provenance), and the session (prerequisites held, no
forbidden combination). Only if every check passes does it issue a signed,
short-lived capability token (2); otherwise the call is denied.
Step 2 (enforcement and delegation): the agent presents the token
with its call (3), and the authorization gateway verifies the token before
forwarding the call to the MCP server and returning the result (4). A token
holder may delegate it within the same session: the worker’s token keeps the
supervisor’s action and resource, while its budget, lifetime (TTL), and
remaining delegation depth can only shrink. The gateway accepts the worker’s
call only after verifying its delegation chain back to the policy-issued
token.
3.1 Capability Tokens
A capability token is a tuple
τ=⟨j,u,a,r,i,s,θ,q,e,b,P,G,ρ⟩,\tau=\langle\,j,\;u,\;a,\;r,\;i,\;s,\;\theta,\;q,\;e,\;b,\;P,\;G,\;\rho\,\rangle,
binding a token identifier jj, agent uu, action aa, resource rr, declared
intent ii, session ss, trust score θ\theta at issuance, issuance time qq,
expiry ee, initial call budget bb, prerequisite set PP, deny-combination
groups GG, and audit-record reference ρ\rho. The policy engine signs these
claims using Ed25519 and encodes the resulting token as a JWT. A verifier can
authenticate the signed claims without contacting the issuer. Before execution,
the authorization gateway additionally checks expiry, revocation, remaining budget,
presenting-agent identity, and agreement with the requested action and
resource. Thus, the token protects immutable authorization claims, while the
gateway combines those claims with current enforcement state.
A delegation token additionally identifies its delegator, delegatee, parent
token, remaining redelegation depth, and optional behavioral bound. For a child
authorization τ′\tau^{\prime} derived from a parent authorization τ\tau, we write
τ′⊑τ\tau^{\prime}\sqsubseteq\tau when
a′=a,r′=r,b′≤b,e′≤e,d′<d,a^{\prime}=a,\qquad r^{\prime}=r,\qquad b^{\prime}\leq b,\qquad e^{\prime}\leq e,\qquad d^{\prime}<d,
where d′d^{\prime} and dd denote the remaining redelegation depths associated with the
child and parent, respectively. The relation is transitive, and the strict
decrease in depth bounds the length of every delegation chain. A delegated
token may be derived from its parent only when these constraints hold.
3.2 Policy-Governed Capability Issuance
The policy engine maps a proposed tool call to a capability decision. Each request identifies an agent, session, capability, declared intent, and set of tool parameters. Issuance requires seven conditions: the agent is not sandboxed; the capability exists in the catalog; protected parameters have acceptable provenance; the declared intent is permitted; the agent satisfies the required trust threshold; all prerequisites are valid within the same session; and issuance would not create a forbidden combination with capabilities already held in that session. The checks are evaluated sequentially to fail closed, but their semantics are conjunctive: a token is issued only when every condition holds. The token binds the resulting authority to the approved action, resource, intent, agent, session, lifetime, and call budget.
Catalog lookup resolves the requested tool to a known capability. The intent check requires the declared intent to appear in that capability’s whitelist. Intent is not a trusted assertion of benign behavior: the model supplies it. Rather, it binds a requested call to one of the purposes for which the policy has pre-authorized that capability, preventing a token issued for one declared purpose from being reused under an unrelated one. The prerequisite check requires the agent to already hold a valid token for every capability the requested one depends on. Mutual exclusion applies the deny-combination rules of §3.3. A denial at any stage nonetheless produces an audit record and feeds the anomaly detector: an agent probing for a gap in the policy is observable while it probes, and each denial decays its trust score.
Argument provenance.
Policy authors designate the task instruction and selected application-owned
fields as trusted context, and designate free-form retrieved or tool-produced
fields as untrusted. A bound_params declaration associates a
security-sensitive argument for example, a payment recipient or
credential with this provenance check. AgentCap records the values made
available through each source during execution and rejects a bound argument
when its support derives solely from untrusted content. The check is therefore
neither a classifier of the model’s intent nor a blanket ban on values that
appear in tool output: a value independently present in trusted task context
remains admissible. This separation lets the policy permit a user-requested
payment while rejecting an attacker-supplied recipient embedded in a document
the agent read.
3.3 A Declarative Policy Language
The authorization procedure is parameterized by a declarative policy comprising five block types. A grant defines a capability’s action, resource, admissible intents, trust threshold, prerequisites, budget, lifetime, and exclusion groups. A deny_combination prohibits specified groups from being held together. A delegation identifies permitted delegator and delegatee types and bounds the resulting chain. An on_trust block maps trust thresholds to revocation actions, while a workflow describes the capabilities required by a legitimate task. The first four blocks govern runtime enforcement; workflow declarations are consumed only by the static analyzer.
grant send_money {
action: write
resource: "bank_account/transfers"
intent: [pay_bill, send_payment]
trust: >= 0.8
requires: [get_balance]
ttl: 30s
budget: 1
deny_groups: [financial_write]
bound_params: [recipient]
}
delegation supervisor_to_worker {
from: type(supervisor)
to: type(worker)
max_depth: 3
require: attenuate_only
}
on_trust agent below 0.3 {
revoke: all
sandbox: true
}
Figure 2: Representative blocks from the AgentCap banking policy. A capability grant constrains issuance, a delegation rule restricts authority transfer between agent types, and a trust rule revokes authority when trust falls below its configured threshold. Appendix A.1 gives the complete grammar.
The compiler lowers these blocks directly into the runtime objects used by the policy engine, delegation manager, trust manager, and surface analyzer. There is no separate policy evaluator or intermediate enforcement path. This common representation allows the analyzer to reason jointly about prerequisites, exclusions, and legitimate workflows. As reported in §4.5, it identifies capabilities rendered unreachable by inconsistent constraints, while regression tests confirm that compiled grants and exclusions reproduce their hand-written configurations.
3.4 Delegation as Attenuated Chains
An agent holding a capability token may delegate a bounded portion of its authority to another agent. Delegation admits a child token that is an attenuation of the parent, in the sense of Section 3.1. A request that would widen authority is malformed, not merely denied. Each hop is signed by the delegator over every field except the signature itself.
Verification walks the chain from leaf to root. It checks each hop’s signature, its attenuation against a snapshot of its parent’s constraints taken at delegation time, and revocation at every hop, before verifying the root token’s signature against the policy engine’s key. A chain is valid only if every hop and the root are simultaneously valid. Verification never trusts a cached “was valid” state.
A delegation rule governs which agent types may delegate to which. A hop requires an explicit from-type, to-type rule. A requested depth exceeding that rule’s maximum is rejected. The rule’s default behavioral bound applies when the delegator supplies none.
3.5 Trust-Driven Containment
AgentCap maintains a trust score t∈[0,1]t\in[0,1] for each agent. A normal outcome updates the score as t′=t+r(1−t)t^{\prime}=t+r(1-t), moving it toward 11, while an anomalous outcome applies the multiplicative decay t′=t(1−d)t^{\prime}=t(1-d). Policy-defined thresholds progressively restrict the agent’s authority: crossing the first threshold revokes sensitive capabilities, while crossing the second revokes all capabilities and sandboxes the agent. Anomalous outcomes include both denials by the gate (§3.2) and executed calls that the host environment labels anomalous.
We use t0=0.8t_{0}=0.8, d=0.3d=0.3, and r=0.01r=0.01 as the default configuration. Under the decay rule, three consecutive anomalies produce trust scores of 0.5600.560, 0.3920.392, and 0.2740.274. The agent consequently loses write authority after the second anomaly and is sandboxed after the third. We evaluate these choices through a controlled one-factor-at-a-time sweep over the initial trust, decay rate, recovery rate, and both revocation thresholds. Across the 23 evaluated configurations, sandboxing occurred after 1 to 10 anomalous outcomes, and the legitimate capability request included in each trial remained authorized. Full results are reported in Appendix A.2.
3.6 Audit Provenance
When audit logging is implemented as a secondary effect of enforcement, the recorded event can diverge from the decision it is intended to describe. A missing logging call may leave a security-relevant decision unrecorded, while separately reconstructed metadata may misstate its subject or outcome. AgentCap instead constructs each authorization decision and its audit record within the same control-flow branch, using the same agent, capability, intent, token identifier, and reason. On successful issuance, the resulting record identifier is embedded in the capability token before signing, creating a cryptographically protected reference to the decision that produced it. A denial records the requesting agent, capability, and exact reason, but contains no token reference. The policy engine, delegation manager, and trust manager contribute to a shared audit log, providing a unified history of issuance, denial, delegation, and trust-triggered revocation.
3.7 Static Surface Analysis
AgentCap complements per-request authorization with deployment-time analysis of the policy as a whole. The surface analyzer constructs a compatibility relation over the capabilities produced by the policy compiler. From this relation, it reports permitted and prohibited capability pairs, the largest set of capabilities that may be held concurrently, and potential exfiltration paths in which sensitive-data access remains co-holdable with an external communication channel. It also evaluates declared workflows against the same constraints, identifying workflows whose required capabilities cannot be acquired together.
These analyses expose two classes of policy error before deployment: over-permission, where a dangerous combination remains reachable, and under-permission, where interacting constraints prevent a legitimate workflow from completing. Because both runtime enforcement and surface analysis operate on artifacts derived from the same policy, the reported authorization surface corresponds directly to the rules that AgentCap enforces. Section 4.5 evaluates the analyzer across both policy domains and describes an unreachable-capability defect detected in the banking policy.
4 Evaluation
We evaluate whether AgentCap reduces attack success while preserving utility,
whether its authorization mechanisms enforce their intended invariants, and
whether its policy analysis and runtime costs support practical deployment.
4.1 Benchmarks and Metrics
We evaluate the complete AgentDojo suite
[4], comprising 97 benign tasks and 949 attacked
instances across banking, travel, Slack, and workspace (v1.2.2), and all 1,054 attacked
instances from InjecAgent [5]. For InjecAgent, we also
construct 51 clean instances from its 17 distinct user tasks and reference tool
calls. We report benign utility, utility on the original user task under
attack, and attack success rate (ASR). Utility is determined by each
benchmark’s task-completion check; ASR records successful execution of the
attacker-directed action.
AgentCap mediates each proposed invocation at the tool boundary and forwards
it only after capability authorization. For every model–benchmark pair, the
native and AgentCap conditions use identical tasks, attacks, model settings,
and evaluators. We evaluate GPT-4o and GPT-5.4 to test the same enforcement
boundary across models with different native attack susceptibility. Each
condition is a single run over the full task set (GPT-4o at temperature 0;
GPT-5.4 at default sampling with reasoning effort set to none), so we report
point estimates without variance. On AgentDojo with both models, we also compare
against Progent [9], whose policies are generated at runtime
by the same model. We run its released pipeline on v1.2.2 with the same
attack, restoring two Travel injection tasks that the release disables, so
that both systems face the same 949 attacked instances.
4.2 Benchmark Policy Construction
Policies are application specifications rather than attack-string filters. For
each AgentDojo domain, we construct a catalog by mapping every benchmark tool
to an action, resource, finite set of permitted task intents, and, where the
tool has security-sensitive inputs or outputs, a bound parameter or provenance
label. Prerequisites encode the information-gathering steps required before a
write, and deny-combination rules prevent hazardous authority pairs from being
held concurrently. Each domain policy was written from the tool schemas and
user-task descriptions and frozen before the evaluation runs. The same frozen
policy is used for both the native and AgentCap conditions, for clean tasks,
and for every attack in that benchmark setting, and it was not modified in
response to evaluation outcomes. The policy contains no rules that match
individual injection payloads: it specifies which fields are untrusted and
which arguments are security-sensitive, not which strings are malicious.
The AgentDojo adapter adds the finite intent set to the tool schema presented
to the model, submits every proposed call and its arguments to AgentCap, and
executes the original benchmark tool only after authorization. It records the
user task as trusted context and propagates the policy’s field-level provenance
labels from tool results to subsequent calls. This implementation ensures that
the benchmark measures the same proposed calls and tools as the native
pipeline; the difference is the authorization decision at the tool boundary.
For InjecAgent, we construct a benchmark profile from the released tool
descriptions, parameter schemas, and the mapping from each user task to its
legitimate tool. The profile assigns each tool a permitted task intent, identifies
security-sensitive arguments, and applies the same provenance and
deny-combination rules used by the runtime gate. We then evaluate the official
direct-harm and data-exfiltration trajectories under that fixed profile. The
same construction also produces the clean instances from the benchmark’s
distinct user tasks and reference tool calls. Thus, neither benchmark is
protected by a payload-specific detector; the policy constrains the effects
that any proposed call may produce.
4.3 End-to-End Security and Utility
Figure 3 shows that AgentCap reduces ASR in all
four model–benchmark settings, by 11.95–40.54 percentage points, while utility
under attack remains within 11.86 points of the native system. On AgentDojo,
GPT-4o ASR falls from 45.63% to 5.09%, an 88.8% relative reduction, while
utility under attack increases from 73.61% to 74.88%. For GPT-5.4, AgentCap reduces ASR from 33.23% to 0.00% while retaining 75.04% utility under attack,
compared with 75.68% natively.
Progent retains less utility: 68.04% on clean tasks and 59.64% under attack, compared with 78.35% and 74.88% for AgentCap. Its generated policies often restrict arguments to values
anticipated from the task, blocking legitimate calls with unanticipated arguments, whereas AgentCap admits a bound argument whenever trusted context supports it.
The result generalizes to InjecAgent’s direct-harm and data-exfiltration
attacks. AgentCap lowers GPT-4o ASR from 23.24% to 8.63%, a 62.9% relative
reduction, and lowers GPT-5.4 ASR from 11.95% to 0.00%. Corresponding utility
under attack is 62.24% and 65.37% for AgentCap versus 74.10% and 72.96% natively. Thus,
the authorization boundary sharply reduces attacker-directed effects across
benchmarks and models without broadly suppressing task execution.
The utility results also expose the intended trade-off of a fail-closed
authorization boundary. AgentCap may reject a call that a native agent would
execute when the call lacks a required prerequisite, attempts to combine
incompatible authority, or supplies a protected argument unsupported by
trusted context. These denials are useful diagnostic outcomes rather than
silent model failures: their reasons are recorded in the audit log and returned
to the agent, which can continue the user task with an authorized alternative.
Figure 3 reports this cost directly: clean
utility falls by 3.1 and 7.2 points on AgentDojo (GPT-4o and GPT-5.4) and by
11.7 and 5.9 points on InjecAgent.
Residual attacks.
The remaining GPT-4o successes (5.09% on
AgentDojo, 8.63% on InjecAgent) fall into three groups: attacks whose goal
is a textual response rather than a tool effect, which lie outside a
tool-boundary monitor; attacker-chosen arguments the policy does not bind;
and bound arguments whose injected value arrived through a field the policy
left unlabeled. The latter two are policy gaps rather than enforcement
failures, and the surface analyzer could be extended to flag them.
Figure 3: Security and utility on AgentDojo and InjecAgent under matched
native and AgentCap conditions, with Progent on AgentDojo for both models.
AgentCap reduces ASR in every setting, reaches zero ASR in both GPT-5.4
evaluations, and achieves lower ASR than Progent while retaining higher utility.
4.4 Mechanism-Level Evaluation
Five controlled scenarios isolate request scoping, prompt-injection
containment, delegation attenuation, mutual exclusion, and confused-deputy
prevention. In Scenario 1, AgentCap issues only the four capabilities required by the
task, rather than granting all eight as under ambient authority, while
authorizing every legitimate action. In Scenario 2, it completes the intended workflow and
blocks all three malicious calls; ambient authority admits all three, while a
lifetime-and-budget-only baseline admits eight calls before exhaustion.
Across Scenarios 3 and 5, AgentCap rejects all nine attempts to escalate or
reuse delegated authority across unrelated sessions. It also blocks both
prohibited capability combinations in Scenario 4. These results show that
scoping, workflow state, delegation, session binding, and containment are
enforced jointly rather than approximated by token lifetime or call count.
They also provide component-level attribution for the end-to-end result:
Scenario 1 isolates capability scoping, Scenario 2 isolates workflow and
provenance enforcement, Scenarios 3 and 5 isolate delegation and session
binding, and Scenario 4 isolates mutual exclusion. A 593-test suite
additionally exercises issuance, delegation, revocation, prerequisites,
behavioral bounds, and audit integration.
4.5 Policy Analysis
For the eight-capability customer-service policy, the analyzer classifies all
28 capability pairs, identifies six prohibited pairs, and finds no co-holdable
combination of sensitive-data access and external communication. It also
detects that delete_customer is unreachable because its prerequisite
and exclusion rules conflict. After correcting an analogous configuration
pattern in banking, the analyzer classifies all 55 pairs across 11
capabilities, finds nine prohibited pairs and no exfiltration path, and confirms
that all six workflows are feasible. Compiled policies also agree with
equivalent hand-authored configurations on grants, prerequisites, exclusion
groups, delegation, trust tiers, and workflows, confirming that analysis and
enforcement share the same policy semantics.
4.6 Sensitivity and Runtime Overhead
Across 23 trust-policy configurations, every legitimate request is authorized
and repeated anomalous behavior always triggers containment. The parameters
control containment latency, which ranges from one to ten anomalies and is
three under the default configuration. Over 10,000 iterations, median latency
is 66.9 μ\mus for issuance, 79.9 μ\mus for verification, 151.4 μ\mus for a
three-level delegation chain, 0.6 μ\mus for exclusion checking, and
1.0 μ\mus for a trust update. Every measured enforcement path therefore
completes in less than 0.2 ms.
5 Related Work
Authorization and information flow.
Indirect prompt injection can turn untrusted content into attacker-directed
tool use [3], motivating enforcement outside the
model. Progent, MiniScope, ClawGuard, and ScopeGate constrain agent tool use
through symbolic policies, task-specific permissions, user-confirmed rules, or
invocation-level checks
[9, 14, 18, 19]. CaMeL, Fides,
and RTBAS instead constrain control or information flow using provenance and
security labels [8, 10, 7]. AgentCap complements
these approaches by representing each permitted effect as request-scoped
authority and jointly enforcing intent, parameter provenance, prerequisites,
forbidden combinations, trust, budget, and delegation at the tool boundary.
Capabilities and delegation.
AgentCap builds on capability systems developed to prevent confused-deputy
failures [1] and cryptographically attenuated credentials
[2]. Recent agent systems bind authority to user
intent and delegated workflow steps or govern inter-agent communication
[12, 15, 17]. Doshi et al. specify data-flow and temporal properties for an augmented MCP interface and analyze a bounded
model in Alloy [16]. AgentCap instead enforces authorization at runtime through capability issuance and revocation, and analyzes policy composition before deployment.
MCP security.
MCP Security Bench and MCPTox study attacks arising during MCP planning,
invocation, response handling, and tool discovery
[13, 11]. MCP’s authorization specification defines
OAuth-based server access and resource-bound token validation
[20], but does not standardize per-call intent, argument
provenance, workflow prerequisites, or forbidden capability combinations.
AgentCap enforces these application-level constraints through its MCP wrapper
and tool-call authorization boundary.
6 Limitations and Future Work
Future work will extend
provenance tracking to persistent agent memory and cross-context execution,
preserving the integrity history of information across retrieval,
summarization, and session transitions while maintaining session-bound
authority. Additional directions include automated policy synthesis from
declared workflows and secure delegation across independently administered
agents and MCP servers.
7 Conclusion
AgentCap separates model-generated action selection from authorization by
mediating tool invocations through request-scoped capabilities. Its MCP wrapper
and authorization gateway enforce intent, provenance, prerequisites, mutually exclusive
authority, trust, budget, revocation, and session-bound delegation independently
of the model’s reasoning. A shared declarative policy supports both runtime
enforcement and predeployment analysis. Across AgentDojo and InjecAgent,
AgentCap reduces attack success in every evaluated model–benchmark setting,
and reaches zero attack success with GPT-5.4 on both benchmarks.
References
[1]
Hardy, N. (1988). The Confused Deputy: (or why capabilities might have been
invented). ACM SIGOPS Operating Systems Review, 22(4), 36–38.
https://doi.org/10.1145/54289.871709
[2]
Birgisson, A., Politz, J.G., Erlingsson, Ú., Taly, A., Vrable, M., &
Lentczner, M. (2014). Macaroons: Cookies with Contextual Caveats for
Decentralized Authorization in the Cloud. In NDSS 2014.
https://www.ndss-symposium.org/ndss2014/ndss-2014-programme/macaroons-cookies-contextual-caveats-decentralized-authorization-cloud/
[3]
Greshake, K., Abdelnabi, S., Mishra, S., Endres, C., Holz, T., & Fritz, M.
(2023). Not What You’ve Signed Up For: Compromising Real-World LLM-Integrated
Applications with Indirect Prompt Injection. In Proceedings of the 16th
ACM Workshop on Artificial Intelligence and Security (AISec), 79–90.
https://doi.org/10.1145/3605764.3623985
[4]
Debenedetti, E., Zhang, J., Balunović, M., Beurer-Kellner, L., Fischer, M.,
& Tramèr, F. (2024). AgentDojo: A Dynamic Environment to Evaluate Prompt
Injection Attacks and Defenses for LLM Agents. In NeurIPS 2024 Datasets
and Benchmarks Track.
https://proceedings.neurips.cc/paper_files/paper/2024/hash/97091a5177d8dc64b1da8bf3e1f6fb54-Abstract-Datasets_and_Benchmarks_Track.html
[5]
Zhan, Q., Liang, Z., Ying, Z., & Kang, D. (2024). InjecAgent: Benchmarking
Indirect Prompt Injections in Tool-Integrated Large Language Model Agents. In
Findings of ACL 2024, 10471–10506.
https://aclanthology.org/2024.findings-acl.624/
[6]
Zhang, H., Huang, J., Mei, K., Yao, Y., Wang, Z., Zhan, C., Wang, H., & Zhang,
Y. (2025). Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and
Defenses in LLM-based Agents. In ICLR 2025.
https://proceedings.iclr.cc/paper_files/paper/2025/hash/5750f91d8fb9d5c02bd8ad2c3b44456b-Abstract-Conference.html
[7]
Zhong, P.Y., Chen, S., Wang, R., McCall, M., Titzer, B.L., Miller, H., &
Gibbons, P.B. (2025). RTBAS: Defending LLM Agents Against Prompt Injection and
Privacy Leakage. arXiv:2502.08966.
https://arxiv.org/abs/2502.08966
[8]
Debenedetti, E., Shumailov, I., Fan, T., Hayes, J., Carlini, N., Fabian, D.,
Kern, C., Shi, C., Terzis, A., & Tramèr, F. (2025). Defeating Prompt
Injections by Design. arXiv:2503.18813.
https://arxiv.org/abs/2503.18813
[9]
Shi, T., He, J., Wang, Z., Li, H., Wu, L., Guo, W., & Song, D. (2025).
Progent: Securing AI Agents with Privilege Control. arXiv:2504.11703.
https://arxiv.org/abs/2504.11703
[10]
Costa, M., Köpf, B., Kolluri, A., Paverd, A., Russinovich, M., Salem, A.,
Tople, S., Wutschitz, L., & Zanella-Béguelin, S. (2026). Securing AI
Agents with Information-Flow Control. In NeurIPS 2026.
https://neurips.cc/virtual/2026/poster/152696
[11]
Wang, Z., Gao, Y., Wang, Y., Liu, S., Sun, H., Cheng, H., Shi, G., Du, H., &
Li, X. (2026). MCPTox: A Benchmark for Tool Poisoning on Real-World MCP
Servers. In Proceedings of the AAAI Conference on Artificial
Intelligence, 40(42), 35811–35819.
https://doi.org/10.1609/aaai.v40i42.40895
[12]
Goswami, A. (2025). Agentic JWT: A Secure Delegation Protocol for Autonomous AI
Agents. arXiv:2509.13597.
https://arxiv.org/abs/2509.13597
[13]
Zhang, D., Li, Z., Luo, X., Liu, X., Li, P., & Xu, W. (2026). MCP Security
Bench (MSB): Benchmarking Attacks Against Model Context Protocol in LLM Agents.
In ICLR 2026. https://iclr.cc/virtual/2026/poster/10007929
[14]
Zhu, J., Huang, X., Tseng, K., Vernik, G., Patil, S.G., Fang, V., & Popa,
R.A. (2025). MiniScope: Authorizing Agents with Least-Privilege Permissions.
arXiv:2512.11147. https://arxiv.org/abs/2512.11147
[15]
South, T., Marro, S., Hardjono, T., Mahari, R., Whitney, C.D., Chan, A., &
Pentland, A. (2025). Position: AI Agents Need Authenticated Delegation. In
Proceedings of the 42nd International Conference on Machine Learning
(ICML), PMLR 267, 82211–82231.
https://proceedings.mlr.press/v267/south25a.html
[16]
Doshi, A., Hong, Y., Xu, C., Kang, E., Kapravelos, A., & Kästner, C.
(2026). Towards Verifiably Safe Tool Use for LLM Agents. In Proceedings
of the IEEE/ACM 48th International Conference on Software Engineering: New
Ideas and Emerging Results (ICSE-NIER), 201–205.
https://doi.org/10.1145/3786582.3786839
[17]
Syros, G., Suri, A., Ginesin, J., Nita-Rotaru, C., & Oprea, A. (2026). SAGA:
A Security Architecture for Governing AI Agentic Systems. In NDSS
2026. https://www.ndss-symposium.org/ndss-paper/saga-a-security-architecture-for-governing-ai-agentic-systems/
[18]
Zhao, W., Li, Z., Zhang, P., & Sun, J. (2026). ClawGuard: A Runtime Security
Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection.
arXiv:2604.11790. https://arxiv.org/abs/2604.11790
[19]
Mellafe Zuvic, D. (2026). Capability Gates Are Not Authorization:
Confused-Deputy Failures in LLM Agent Frameworks. arXiv:2606.28679.
https://arxiv.org/abs/2606.28679
[20]
Model Context Protocol (2025). Authorization. MCP Specification,
revision 2025-11-25.
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization
Appendix A Supplementary Technical Details
A.1 Policy Language
The AgentCap policy language is parsed by a deterministic recursive-descent
parser according to the following grammar. Here, id denotes an
identifier or quoted string, list a comma-separated list, and
number a numeric literal.
policy ::= block*
block ::= grant | deny | delegation | trust | workflow
grant ::= "grant" id "{" grant-field* "}"
grant-field ::= "action" ":" id
| "resource" ":" id
| "intent" ":" list
| "trust" ":" ">=" number
| "requires" ":" list
| "ttl" ":" duration
| "budget" ":" number
| "deny_groups" ":" list
| "tool" ":" id
| "bound_params" ":" list
| "taints_output" ":" boolean
| "trusted_output" ":" boolean
| "tainted_fields" ":" list
| "trusted_fields" ":" list
deny ::= "deny_combination" id "{"
id ("+" id)+
("resolution" ":" id)? "}"
delegation ::= "delegation" id "{" delegation-field* "}"
delegation-field
::= "from" ":" "type" "(" id ")"
| "to" ":" "type" "(" id ")"
| "max_depth" ":" number
| "require" ":" id
| "behavioral_bound" ":" sequence
trust ::= "on_trust" id "below" number "{"
trust-field* "}"
trust-field ::= "revoke" ":" ("all" | "action" "in" list)
| "sandbox" ":" boolean
workflow ::= "workflow" id "{"
"capabilities" ":" list "}"
sequence ::= "[" (id ("->" id)*)? "]"
duration ::= number "s"
boolean ::= "true" | "false"
Every trust block must contain a revoke field. Each block is compiled
directly into the representation consumed by the policy
engine, delegation manager, trust manager, or surface analyzer. Deny blocks
with more than two groups expand into pairwise exclusion rules, and trust tiers
are ordered by threshold during compilation.
A.2 Trust-Policy Sensitivity
Table 1 reports the complete 23-configuration sweep,
grouping settings that produce identical outcomes. Every configuration
authorizes the legitimate request and contains repeated anomalous behavior.
Table 1: Trust-policy sensitivity. Grouped ranges contain all tested values.
Parameter setting
Anomalies to sandbox
Legitimate blocked
Decay 0.1,0.2,0.3,0.4,0.5,0.6,0.70.1,0.2,0.3,0.4,0.5,0.6,0.7
10,5,3,2,2,2,110,5,3,2,2,2,1
0
Recovery 0.005,0.01,0.02,0.050.005,0.01,0.02,0.05
3
0
Partial threshold 0.4,0.5,0.6,0.70.4,0.5,0.6,0.7
3
0
Full threshold 0.2,0.3,0.40.2,0.3,0.4
4,3,24,3,2
0
Initial trust 0.6,0.7,0.8,0.9,1.00.6,0.7,0.8,0.9,1.0
2,3,3,4,42,3,3,4,4
0
可引用分片 · 36 段
CHK-33306c7c0408d2cf1a421d02
\workshoptitle
Agents in the Wild
AgentCap: Capability-Based Runtime Authorization for Secure LLM Agent Execution
Aravinda Kashyap Kabbinamakki Suresh
Affiliation: Virginia Tech
Affiliation: Blacksburg, VA, USA
Email: aravindakashyap@vt.edu
Peng Gao
Affiliation: Virginia Tech
Affiliation: Blacksburg, VA, USA
Email: penggao@vt.edu
Abstract
Language-model agents commonly collapse two decisions that security systems
separate: selecting an action and determining whether that action is
authorized. When a model exercises standing authority, indirect prompt
injection can convert influence over its reasoning into unauthorized effects.
We present AgentCap, a runtime authorization layer that externalizes this
decision from the model and mediates every tool invocation through an MCP
wrapper. Each request declares an intent, and AgentCap evaluates policy
constraints over trust, workflow prerequisites, mutually exclusive authority,
and the provenance of security-sensitive arguments. Authorized requests receive
short-lived, budget-bounded capability tokens that are validated at the tool
boundary. Delegation is restricted to session-bound parent–child chains that
preserve action and resource while budget and lifetime can only be attenuated, preventing
authority from being expanded or reused across unrelated agent sessions. A
CHK-ebdbb170fb7c2b3dd1904edd
rve action and resource while budget and lifetime can only be attenuated, preventing
authority from being expanded or reused across unrelated agent sessions. A
declarative policy language provides a common representation for runtime
enforcement and predeployment analysis. Across AgentDojo and InjecAgent, AgentCap reduces
attack success in every evaluated model–benchmark setting, including zero attack success with GPT-5.4 on both benchmarks. Controlled
adversarial scenarios further show that AgentCap blocks every attempted
unauthorized execution (ASR 0%) while preserving all legitimate operations exercised.
These results demonstrate that agent security requires authorization of
model-proposed effects at the tool boundary, independently of the model’s
reasoning.
1 Introduction
Tool-using language-model agents collapse a distinction that conventional security architectures treat as fundamental: the separation between proposing an action and authorizing its execution. An agent selects tool calls while operating with credentials that often remain valid throughout an entire session. Its decisions are simultaneously conditioned on potentially adversarial content, including retrieved documents, messages, web pages, and prior tool outputs. Consequently, an indirect prompt injection need not bypass an explicit authorization check.
CHK-4ae167bb4e095a41069f817c
ng retrieved documents, messages, web pages, and prior tool outputs. Consequently, an indirect prompt injection need not bypass an explicit authorization check. It can instead redirect an already authorized agent toward an attacker-selected action [3, 4, 6]. This coupling between model inference and ambient authority turns failures of instruction following into security violations.
Existing defenses address important parts of this problem but do not by themselves establish a per-invocation authorization boundary. Prompt filtering and model alignment attempt to prevent untrusted content from influencing behavior, yet their decisions remain probabilistic and operate within the reasoning process targeted by the attacker. Identity- and role-based policies restrict the tools available to an agent, but commonly grant authority at session scope rather than for a particular task or invocation. Expiration and rate limits restrict when and how often credentials may be used, but cannot distinguish a legitimate call from an attacker-directed call made within the same limits. Recent systems therefore move enforcement outside the model through deterministic call policies, task-specific permission structures, and information-flow controls [9, 14, 10, 18].
CHK-3277a8198a9872fd04c9ac6f
fore move enforcement outside the model through deterministic call policies, task-specific permission structures, and information-flow controls [9, 14, 10, 18]. These developments motivate a stronger principle: every model-generated action should be treated as an untrusted request whose authority must be established independently.
We present AgentCap, a capability-based authorization layer for AI agents. Capability systems attach authority to an unforgeable object that denotes a specific permission rather than to the ambient identity of its holder, an abstraction introduced to address confused-deputy failures [1]. AgentCap mediates every proposed tool invocation through a deterministic authorization gate placed between the agent and its tools. The gate evaluates the request independently of the model and forwards it to the underlying tool only when the applicable authorization conditions are satisfied. An approved request receives a short-lived signed capability scoped to an action, resource, session, declared intent, and invocation budget. A separate gateway verifies this capability before forwarding the call to the underlying tool. Action selection consequently remains with the model, while authority is determined and enforced outside it.
Capability scoping alone is insufficient when an attacker manipulates the arguments of an otherwise legitimate operation.
CHK-e92c5dd2a97db95254ab130f
is determined and enforced outside it.
Capability scoping alone is insufficient when an attacker manipulates the arguments of an otherwise legitimate operation. AgentCap therefore incorporates parameter-level provenance into authorization. The policy associates content-producing tools and selected output fields with integrity labels, then checks whether security-sensitive arguments are supported by trusted task context. Consider an injected transaction record that instructs the agent to transfer funds to an attacker. Although the resulting payment may carry a valid high-level intent, its recipient originates only from untrusted content. The provenance check rejects this instantiation of the operation without prohibiting legitimate payments authorized by the user. This design extends recent information-flow approaches that distinguish trusted instructions from lower-integrity data [10, 7].
The authorization state also evolves during execution. Suspicious requests and
execution outcomes update a per-agent trust state, with threshold crossings
triggering capability revocation or sandboxing. Delegation across agents is
represented as a signed attenuation chain: each hop preserves the authorized
action and resource, never increases the lifetime or budget, and strictly
reduces the remaining delegation depth.
CHK-a1bb03edddbd926cf6712957
ation chain: each hop preserves the authorized
action and resource, never increases the lifetime or budget, and strictly
reduces the remaining delegation depth. Capabilities remain bound to their agent lineage and session, preventing agents in unrelated sessions from reusing or extending delegated
authority. A compact declarative policy language specifies capability grants, prerequisites, mutually exclusive permissions, delegation constraints, trust responses, provenance requirements, and valid workflows. Because these relationships are explicit, a static analyzer can detect policy interactions before deployment.
Contributions.
This work makes three major contributions:
•
Capability-based authorization for single- and multi-agent
execution.
We introduce signed, agent- and session-bound capabilities that constrain
tool authority by action, resource, intent, lifetime, and budget. Authority
may cross agents only through explicit parent-to-child delegation, with
attenuation preventing a child from exceeding the authority of its parent
or reusing authority from an unrelated session.
•
An MCP-integrated enforcement architecture.
We implement AgentCap as an MCP wrapper and authorization gateway. The
wrapper obtains request-scoped authority for each proposed invocation, and
the gateway forwards the call only after validating the resulting
capability.
CHK-172d0da2d4d6d388d12224a0
ay. The
wrapper obtains request-scoped authority for each proposed invocation, and
the gateway forwards the call only after validating the resulting
capability. A declarative policy language unifies capability issuance,
workflow prerequisites, mutually exclusive permissions, argument
provenance, trust-triggered revocation, and delegation constraints.
•
Static and empirical validation.
A surface analyzer detects over- and under-permissive policy interactions
before deployment. Across the complete AgentDojo suite and
InjecAgent, AgentCap reduces attack success in every evaluated
model–benchmark setting and reaches zero attack success with GPT-5.4 on
both benchmarks. Controlled single- and multi-agent scenarios additionally
block every attempted unauthorized execution while preserving all
legitimate operations exercised.
2 Threat Model
We consider single- and multi-agent systems in which an adversary may control retrieved content, tool outputs, or inter-agent messages and thereby cause the model to propose attacker-selected tool calls and arguments. The model is not trusted to interpret untrusted content correctly or enforce authorization policy. We trust AgentCap’s policy engine, MCP wrapper, authorization gateway, cryptographic keys, and underlying transport; the adversary cannot forge signatures or bypass the mediated tool interface.
CHK-97d421d8ab19db5b7caae36e
, MCP wrapper, authorization gateway, cryptographic keys, and underlying transport; the adversary cannot forge signatures or bypass the mediated tool interface. Our security objective is to ensure that a compromised agent can exercise only the authority encoded in a valid capability, and that authority crosses agent boundaries only through policy-authorized, attenuating parent-to-child delegation.
AgentCap treats the policy, provenance labels, and outcome labels as
security-critical configuration supplied by the deployment environment, not as
facts inferred from the model. This makes the trust boundary explicit and
reviewable: a policy author must correctly identify the actions a task may
perform, the sources that may justify protected arguments, and the outcomes
that warrant containment. The policy compiler, surface analyzer, and audit log
support review of these artifacts, but cannot compensate for an incorrectly
trusted source or an over-permissive policy. Under these assumptions,
AgentCap’s guarantee is deterministic: a proposed effect reaches a tool only
when it satisfies the configured authorization policy.
3 The AgentCap Architecture
The AgentCap architecture is organized around a single security invariant: no model-generated tool call reaches an MCP server without independently authorized and verifiable authority.
CHK-345124343e5fe99993250bb7
e is organized around a single security invariant: no model-generated tool call reaches an MCP server without independently authorized and verifiable authority. AgentCap separates action proposal, capability issuance, and capability verification into distinct trust domains. The MCP wrapper serves as the agent’s tool interface, while the policy engine determines whether a requested action is admissible and issues a narrowly scoped capability when authorization succeeds. Capabilities are bound to the agent and session for which they are issued, thereby isolating the authority available to concurrent agent sessions. Within a multi-agent session, a parent agent may explicitly delegate a subset of its authority to a child agent. The resulting capability is bound to that child and cannot exceed the parent’s permitted action, resource scope, lifetime, budget, or delegation depth. Agents outside this delegation lineage cannot exercise its capabilities, even if the orchestration layer permits them to exchange messages. Communication therefore does not imply authority: an agent may provide information to another agent, but any subsequent access to or modification of external resources remains subject to the receiving agent’s own capabilities. The authorization gateway verifies these constraints immediately before forwarding an invocation to the underlying MCP server.
CHK-7bea8b68575837f4912d2844
eiving agent’s own capabilities. The authorization gateway verifies these constraints immediately before forwarding an invocation to the underlying MCP server.
Figure 1: The AgentCap architecture. Step 1 (capability issuance): the
developer’s policy is compiled into the rules loaded by the policy engine,
and the surface analyzer checks the same policy before deployment. The
agent, which may be steered by untrusted content, proposes a tool call with a
declared intent (1). The policy engine checks the agent (not sandboxed,
trust at or above its threshold), the request (tool in the catalog, intent
permitted, argument provenance), and the session (prerequisites held, no
forbidden combination). Only if every check passes does it issue a signed,
short-lived capability token (2); otherwise the call is denied.
Step 2 (enforcement and delegation): the agent presents the token
with its call (3), and the authorization gateway verifies the token before
forwarding the call to the MCP server and returning the result (4). A token
holder may delegate it within the same session: the worker’s token keeps the
supervisor’s action and resource, while its budget, lifetime (TTL), and
remaining delegation depth can only shrink. The gateway accepts the worker’s
call only after verifying its delegation chain back to the policy-issued
token.
3.1 Capability Tokens
A capability token is a tuple
CHK-1b4839997f6cf37310e92161
ateway accepts the worker’s
call only after verifying its delegation chain back to the policy-issued
token.
3.1 Capability Tokens
A capability token is a tuple
τ=⟨j,u,a,r,i,s,θ,q,e,b,P,G,ρ⟩,\tau=\langle\,j,\;u,\;a,\;r,\;i,\;s,\;\theta,\;q,\;e,\;b,\;P,\;G,\;\rho\,\rangle,
binding a token identifier jj, agent uu, action aa, resource rr, declared
intent ii, session ss, trust score θ\theta at issuance, issuance time qq,
expiry ee, initial call budget bb, prerequisite set PP, deny-combination
groups GG, and audit-record reference ρ\rho. The policy engine signs these
claims using Ed25519 and encodes the resulting token as a JWT. A verifier can
authenticate the signed claims without contacting the issuer. Before execution,
the authorization gateway additionally checks expiry, revocation, remaining budget,
presenting-agent identity, and agreement with the requested action and
resource. Thus, the token protects immutable authorization claims, while the
gateway combines those claims with current enforcement state.
A delegation token additionally identifies its delegator, delegatee, parent
token, remaining redelegation depth, and optional behavioral bound. For a child
authorization τ′\tau^{\prime} derived from a parent authorization τ\tau, we write
τ′⊑τ\tau^{\prime}\sqsubseteq\tau when
CHK-969245e0324b568f437e66a6
optional behavioral bound. For a child
authorization τ′\tau^{\prime} derived from a parent authorization τ\tau, we write
τ′⊑τ\tau^{\prime}\sqsubseteq\tau when
a′=a,r′=r,b′≤b,e′≤e,d′<d,a^{\prime}=a,\qquad r^{\prime}=r,\qquad b^{\prime}\leq b,\qquad e^{\prime}\leq e,\qquad d^{\prime}<d,
where d′d^{\prime} and dd denote the remaining redelegation depths associated with the
child and parent, respectively. The relation is transitive, and the strict
decrease in depth bounds the length of every delegation chain. A delegated
token may be derived from its parent only when these constraints hold.
3.2 Policy-Governed Capability Issuance
The policy engine maps a proposed tool call to a capability decision. Each request identifies an agent, session, capability, declared intent, and set of tool parameters. Issuance requires seven conditions: the agent is not sandboxed; the capability exists in the catalog; protected parameters have acceptable provenance; the declared intent is permitted; the agent satisfies the required trust threshold; all prerequisites are valid within the same session; and issuance would not create a forbidden combination with capabilities already held in that session. The checks are evaluated sequentially to fail closed, but their semantics are conjunctive: a token is issued only when every condition holds.CHK-a1cc8700043115fee4e222d1
d in that session. The checks are evaluated sequentially to fail closed, but their semantics are conjunctive: a token is issued only when every condition holds. The token binds the resulting authority to the approved action, resource, intent, agent, session, lifetime, and call budget.
Catalog lookup resolves the requested tool to a known capability. The intent check requires the declared intent to appear in that capability’s whitelist. Intent is not a trusted assertion of benign behavior: the model supplies it. Rather, it binds a requested call to one of the purposes for which the policy has pre-authorized that capability, preventing a token issued for one declared purpose from being reused under an unrelated one. The prerequisite check requires the agent to already hold a valid token for every capability the requested one depends on. Mutual exclusion applies the deny-combination rules of §3.3. A denial at any stage nonetheless produces an audit record and feeds the anomaly detector: an agent probing for a gap in the policy is observable while it probes, and each denial decays its trust score.
Argument provenance.
Policy authors designate the task instruction and selected application-owned
fields as trusted context, and designate free-form retrieved or tool-produced
fields as untrusted. A bound_params declaration associates a
CHK-ace2097beadb769bc6a59775
ed application-owned
fields as trusted context, and designate free-form retrieved or tool-produced
fields as untrusted. A bound_params declaration associates a
security-sensitive argument for example, a payment recipient or
credential with this provenance check. AgentCap records the values made
available through each source during execution and rejects a bound argument
when its support derives solely from untrusted content. The check is therefore
neither a classifier of the model’s intent nor a blanket ban on values that
appear in tool output: a value independently present in trusted task context
remains admissible. This separation lets the policy permit a user-requested
payment while rejecting an attacker-supplied recipient embedded in a document
the agent read.
3.3 A Declarative Policy Language
The authorization procedure is parameterized by a declarative policy comprising five block types. A grant defines a capability’s action, resource, admissible intents, trust threshold, prerequisites, budget, lifetime, and exclusion groups. A deny_combination prohibits specified groups from being held together. A delegation identifies permitted delegator and delegatee types and bounds the resulting chain. An on_trust block maps trust thresholds to revocation actions, while a workflow describes the capabilities required by a legitimate task.
CHK-d60d9a1b979afcf61ddb697c
s the resulting chain. An on_trust block maps trust thresholds to revocation actions, while a workflow describes the capabilities required by a legitimate task. The first four blocks govern runtime enforcement; workflow declarations are consumed only by the static analyzer.
grant send_money {
action: write
resource: "bank_account/transfers"
intent: [pay_bill, send_payment]
trust: >= 0.8
requires: [get_balance]
ttl: 30s
budget: 1
deny_groups: [financial_write]
bound_params: [recipient]
}
delegation supervisor_to_worker {
from: type(supervisor)
to: type(worker)
max_depth: 3
require: attenuate_only
}
on_trust agent below 0.3 {
revoke: all
sandbox: true
}
Figure 2: Representative blocks from the AgentCap banking policy. A capability grant constrains issuance, a delegation rule restricts authority transfer between agent types, and a trust rule revokes authority when trust falls below its configured threshold. Appendix A.1 gives the complete grammar.
The compiler lowers these blocks directly into the runtime objects used by the policy engine, delegation manager, trust manager, and surface analyzer. There is no separate policy evaluator or intermediate enforcement path. This common representation allows the analyzer to reason jointly about prerequisites, exclusions, and legitimate workflows.CHK-b1ce2df94bc3a1c84775905e
or or intermediate enforcement path. This common representation allows the analyzer to reason jointly about prerequisites, exclusions, and legitimate workflows. As reported in §4.5, it identifies capabilities rendered unreachable by inconsistent constraints, while regression tests confirm that compiled grants and exclusions reproduce their hand-written configurations.
3.4 Delegation as Attenuated Chains
An agent holding a capability token may delegate a bounded portion of its authority to another agent. Delegation admits a child token that is an attenuation of the parent, in the sense of Section 3.1. A request that would widen authority is malformed, not merely denied. Each hop is signed by the delegator over every field except the signature itself.
Verification walks the chain from leaf to root. It checks each hop’s signature, its attenuation against a snapshot of its parent’s constraints taken at delegation time, and revocation at every hop, before verifying the root token’s signature against the policy engine’s key. A chain is valid only if every hop and the root are simultaneously valid. Verification never trusts a cached “was valid” state.
A delegation rule governs which agent types may delegate to which. A hop requires an explicit from-type, to-type rule. A requested depth exceeding that rule’s maximum is rejected.
CHK-3c70c0d345c19a02a85ccb79
overns which agent types may delegate to which. A hop requires an explicit from-type, to-type rule. A requested depth exceeding that rule’s maximum is rejected. The rule’s default behavioral bound applies when the delegator supplies none.
3.5 Trust-Driven Containment
AgentCap maintains a trust score t∈[0,1]t\in[0,1] for each agent. A normal outcome updates the score as t′=t+r(1−t)t^{\prime}=t+r(1-t), moving it toward 11, while an anomalous outcome applies the multiplicative decay t′=t(1−d)t^{\prime}=t(1-d). Policy-defined thresholds progressively restrict the agent’s authority: crossing the first threshold revokes sensitive capabilities, while crossing the second revokes all capabilities and sandboxes the agent. Anomalous outcomes include both denials by the gate (§3.2) and executed calls that the host environment labels anomalous.
We use t0=0.8t_{0}=0.8, d=0.3d=0.3, and r=0.01r=0.01 as the default configuration. Under the decay rule, three consecutive anomalies produce trust scores of 0.5600.560, 0.3920.392, and 0.2740.274. The agent consequently loses write authority after the second anomaly and is sandboxed after the third. We evaluate these choices through a controlled one-factor-at-a-time sweep over the initial trust, decay rate, recovery rate, and both revocation thresholds.CHK-34114ba9744cd85b15a1e4c6
rd. We evaluate these choices through a controlled one-factor-at-a-time sweep over the initial trust, decay rate, recovery rate, and both revocation thresholds. Across the 23 evaluated configurations, sandboxing occurred after 1 to 10 anomalous outcomes, and the legitimate capability request included in each trial remained authorized. Full results are reported in Appendix A.2.
3.6 Audit Provenance
When audit logging is implemented as a secondary effect of enforcement, the recorded event can diverge from the decision it is intended to describe. A missing logging call may leave a security-relevant decision unrecorded, while separately reconstructed metadata may misstate its subject or outcome. AgentCap instead constructs each authorization decision and its audit record within the same control-flow branch, using the same agent, capability, intent, token identifier, and reason. On successful issuance, the resulting record identifier is embedded in the capability token before signing, creating a cryptographically protected reference to the decision that produced it. A denial records the requesting agent, capability, and exact reason, but contains no token reference. The policy engine, delegation manager, and trust manager contribute to a shared audit log, providing a unified history of issuance, denial, delegation, and trust-triggered revocation.
3.7 Static Surface Analysis
CHK-48ea0153f965fd6e18d7b8ee
ager contribute to a shared audit log, providing a unified history of issuance, denial, delegation, and trust-triggered revocation.
3.7 Static Surface Analysis
AgentCap complements per-request authorization with deployment-time analysis of the policy as a whole. The surface analyzer constructs a compatibility relation over the capabilities produced by the policy compiler. From this relation, it reports permitted and prohibited capability pairs, the largest set of capabilities that may be held concurrently, and potential exfiltration paths in which sensitive-data access remains co-holdable with an external communication channel. It also evaluates declared workflows against the same constraints, identifying workflows whose required capabilities cannot be acquired together.
These analyses expose two classes of policy error before deployment: over-permission, where a dangerous combination remains reachable, and under-permission, where interacting constraints prevent a legitimate workflow from completing. Because both runtime enforcement and surface analysis operate on artifacts derived from the same policy, the reported authorization surface corresponds directly to the rules that AgentCap enforces. Section 4.5 evaluates the analyzer across both policy domains and describes an unreachable-capability defect detected in the banking policy.
4 Evaluation
CHK-e635873bfd1d681c1209564a
rces. Section 4.5 evaluates the analyzer across both policy domains and describes an unreachable-capability defect detected in the banking policy.
4 Evaluation
We evaluate whether AgentCap reduces attack success while preserving utility,
whether its authorization mechanisms enforce their intended invariants, and
whether its policy analysis and runtime costs support practical deployment.
4.1 Benchmarks and Metrics
We evaluate the complete AgentDojo suite
[4], comprising 97 benign tasks and 949 attacked
instances across banking, travel, Slack, and workspace (v1.2.2), and all 1,054 attacked
instances from InjecAgent [5]. For InjecAgent, we also
construct 51 clean instances from its 17 distinct user tasks and reference tool
calls. We report benign utility, utility on the original user task under
attack, and attack success rate (ASR). Utility is determined by each
benchmark’s task-completion check; ASR records successful execution of the
attacker-directed action.
AgentCap mediates each proposed invocation at the tool boundary and forwards
it only after capability authorization. For every model–benchmark pair, the
native and AgentCap conditions use identical tasks, attacks, model settings,
and evaluators. We evaluate GPT-4o and GPT-5.4 to test the same enforcement
boundary across models with different native attack susceptibility. Each
CHK-da3672dd26f3485a2a5b5b0d
settings,
and evaluators. We evaluate GPT-4o and GPT-5.4 to test the same enforcement
boundary across models with different native attack susceptibility. Each
condition is a single run over the full task set (GPT-4o at temperature 0;
GPT-5.4 at default sampling with reasoning effort set to none), so we report
point estimates without variance. On AgentDojo with both models, we also compare
against Progent [9], whose policies are generated at runtime
by the same model. We run its released pipeline on v1.2.2 with the same
attack, restoring two Travel injection tasks that the release disables, so
that both systems face the same 949 attacked instances.
4.2 Benchmark Policy Construction
Policies are application specifications rather than attack-string filters. For
each AgentDojo domain, we construct a catalog by mapping every benchmark tool
to an action, resource, finite set of permitted task intents, and, where the
tool has security-sensitive inputs or outputs, a bound parameter or provenance
label. Prerequisites encode the information-gathering steps required before a
write, and deny-combination rules prevent hazardous authority pairs from being
held concurrently. Each domain policy was written from the tool schemas and
user-task descriptions and frozen before the evaluation runs. The same frozen
policy is used for both the native and AgentCap conditions, for clean tasks,
CHK-1a5634581cc80cfc63923158
and
user-task descriptions and frozen before the evaluation runs. The same frozen
policy is used for both the native and AgentCap conditions, for clean tasks,
and for every attack in that benchmark setting, and it was not modified in
response to evaluation outcomes. The policy contains no rules that match
individual injection payloads: it specifies which fields are untrusted and
which arguments are security-sensitive, not which strings are malicious.
The AgentDojo adapter adds the finite intent set to the tool schema presented
to the model, submits every proposed call and its arguments to AgentCap, and
executes the original benchmark tool only after authorization. It records the
user task as trusted context and propagates the policy’s field-level provenance
labels from tool results to subsequent calls. This implementation ensures that
the benchmark measures the same proposed calls and tools as the native
pipeline; the difference is the authorization decision at the tool boundary.
For InjecAgent, we construct a benchmark profile from the released tool
descriptions, parameter schemas, and the mapping from each user task to its
legitimate tool. The profile assigns each tool a permitted task intent, identifies
security-sensitive arguments, and applies the same provenance and
deny-combination rules used by the runtime gate. We then evaluate the official
CHK-244b8f011a793e32af4f93f1
nt, identifies
security-sensitive arguments, and applies the same provenance and
deny-combination rules used by the runtime gate. We then evaluate the official
direct-harm and data-exfiltration trajectories under that fixed profile. The
same construction also produces the clean instances from the benchmark’s
distinct user tasks and reference tool calls. Thus, neither benchmark is
protected by a payload-specific detector; the policy constrains the effects
that any proposed call may produce.
4.3 End-to-End Security and Utility
Figure 3 shows that AgentCap reduces ASR in all
four model–benchmark settings, by 11.95–40.54 percentage points, while utility
under attack remains within 11.86 points of the native system. On AgentDojo,
GPT-4o ASR falls from 45.63% to 5.09%, an 88.8% relative reduction, while
utility under attack increases from 73.61% to 74.88%. For GPT-5.4, AgentCap reduces ASR from 33.23% to 0.00% while retaining 75.04% utility under attack,
compared with 75.68% natively.
Progent retains less utility: 68.04% on clean tasks and 59.64% under attack, compared with 78.35% and 74.88% for AgentCap. Its generated policies often restrict arguments to values
anticipated from the task, blocking legitimate calls with unanticipated arguments, whereas AgentCap admits a bound argument whenever trusted context supports it.
CHK-4f627a590bfc0b6515ec9b16
ticipated from the task, blocking legitimate calls with unanticipated arguments, whereas AgentCap admits a bound argument whenever trusted context supports it.
The result generalizes to InjecAgent’s direct-harm and data-exfiltration
attacks. AgentCap lowers GPT-4o ASR from 23.24% to 8.63%, a 62.9% relative
reduction, and lowers GPT-5.4 ASR from 11.95% to 0.00%. Corresponding utility
under attack is 62.24% and 65.37% for AgentCap versus 74.10% and 72.96% natively. Thus,
the authorization boundary sharply reduces attacker-directed effects across
benchmarks and models without broadly suppressing task execution.
The utility results also expose the intended trade-off of a fail-closed
authorization boundary. AgentCap may reject a call that a native agent would
execute when the call lacks a required prerequisite, attempts to combine
incompatible authority, or supplies a protected argument unsupported by
trusted context. These denials are useful diagnostic outcomes rather than
silent model failures: their reasons are recorded in the audit log and returned
to the agent, which can continue the user task with an authorized alternative.
Figure 3 reports this cost directly: clean
utility falls by 3.1 and 7.2 points on AgentDojo (GPT-4o and GPT-5.4) and by
11.7 and 5.9 points on InjecAgent.
Residual attacks.
The remaining GPT-4o successes (5.09% on
CHK-e2681ac5893a9e26a2a5ff95
ls by 3.1 and 7.2 points on AgentDojo (GPT-4o and GPT-5.4) and by
11.7 and 5.9 points on InjecAgent.
Residual attacks.
The remaining GPT-4o successes (5.09% on
AgentDojo, 8.63% on InjecAgent) fall into three groups: attacks whose goal
is a textual response rather than a tool effect, which lie outside a
tool-boundary monitor; attacker-chosen arguments the policy does not bind;
and bound arguments whose injected value arrived through a field the policy
left unlabeled. The latter two are policy gaps rather than enforcement
failures, and the surface analyzer could be extended to flag them.
Figure 3: Security and utility on AgentDojo and InjecAgent under matched
native and AgentCap conditions, with Progent on AgentDojo for both models.
AgentCap reduces ASR in every setting, reaches zero ASR in both GPT-5.4
evaluations, and achieves lower ASR than Progent while retaining higher utility.
4.4 Mechanism-Level Evaluation
Five controlled scenarios isolate request scoping, prompt-injection
containment, delegation attenuation, mutual exclusion, and confused-deputy
prevention. In Scenario 1, AgentCap issues only the four capabilities required by the
task, rather than granting all eight as under ambient authority, while
authorizing every legitimate action. In Scenario 2, it completes the intended workflow and
blocks all three malicious calls; ambient authority admits all three, while a
CHK-3d40c009daff8ff3aaaa8728
ng every legitimate action. In Scenario 2, it completes the intended workflow and
blocks all three malicious calls; ambient authority admits all three, while a
lifetime-and-budget-only baseline admits eight calls before exhaustion.
Across Scenarios 3 and 5, AgentCap rejects all nine attempts to escalate or
reuse delegated authority across unrelated sessions. It also blocks both
prohibited capability combinations in Scenario 4. These results show that
scoping, workflow state, delegation, session binding, and containment are
enforced jointly rather than approximated by token lifetime or call count.
They also provide component-level attribution for the end-to-end result:
Scenario 1 isolates capability scoping, Scenario 2 isolates workflow and
provenance enforcement, Scenarios 3 and 5 isolate delegation and session
binding, and Scenario 4 isolates mutual exclusion. A 593-test suite
additionally exercises issuance, delegation, revocation, prerequisites,
behavioral bounds, and audit integration.
4.5 Policy Analysis
For the eight-capability customer-service policy, the analyzer classifies all
28 capability pairs, identifies six prohibited pairs, and finds no co-holdable
combination of sensitive-data access and external communication. It also
detects that delete_customer is unreachable because its prerequisite
and exclusion rules conflict. After correcting an analogous configuration
CHK-37d2b7bbf0f8098d2e2cb706
ication. It also
detects that delete_customer is unreachable because its prerequisite
and exclusion rules conflict. After correcting an analogous configuration
pattern in banking, the analyzer classifies all 55 pairs across 11
capabilities, finds nine prohibited pairs and no exfiltration path, and confirms
that all six workflows are feasible. Compiled policies also agree with
equivalent hand-authored configurations on grants, prerequisites, exclusion
groups, delegation, trust tiers, and workflows, confirming that analysis and
enforcement share the same policy semantics.
4.6 Sensitivity and Runtime Overhead
Across 23 trust-policy configurations, every legitimate request is authorized
and repeated anomalous behavior always triggers containment. The parameters
control containment latency, which ranges from one to ten anomalies and is
three under the default configuration. Over 10,000 iterations, median latency
is 66.9 μ\mus for issuance, 79.9 μ\mus for verification, 151.4 μ\mus for a
three-level delegation chain, 0.6 μ\mus for exclusion checking, and
1.0 μ\mus for a trust update. Every measured enforcement path therefore
completes in less than 0.2 ms.
5 Related Work
Authorization and information flow.
Indirect prompt injection can turn untrusted content into attacker-directed
tool use [3], motivating enforcement outside the
model.
CHK-d8a892c0501a3832ac69b877
zation and information flow.
Indirect prompt injection can turn untrusted content into attacker-directed
tool use [3], motivating enforcement outside the
model. Progent, MiniScope, ClawGuard, and ScopeGate constrain agent tool use
through symbolic policies, task-specific permissions, user-confirmed rules, or
invocation-level checks
[9, 14, 18, 19]. CaMeL, Fides,
and RTBAS instead constrain control or information flow using provenance and
security labels [8, 10, 7]. AgentCap complements
these approaches by representing each permitted effect as request-scoped
authority and jointly enforcing intent, parameter provenance, prerequisites,
forbidden combinations, trust, budget, and delegation at the tool boundary.
Capabilities and delegation.
AgentCap builds on capability systems developed to prevent confused-deputy
failures [1] and cryptographically attenuated credentials
[2]. Recent agent systems bind authority to user
intent and delegated workflow steps or govern inter-agent communication
[12, 15, 17]. Doshi et al. specify data-flow and temporal properties for an augmented MCP interface and analyze a bounded
model in Alloy [16]. AgentCap instead enforces authorization at runtime through capability issuance and revocation, and analyzes policy composition before deployment.
MCP security.
MCP Security Bench and MCPTox study attacks arising during MCP planning,
CHK-ed1a2a4097dfc335335e5a52
uance and revocation, and analyzes policy composition before deployment.
MCP security.
MCP Security Bench and MCPTox study attacks arising during MCP planning,
invocation, response handling, and tool discovery
[13, 11]. MCP’s authorization specification defines
OAuth-based server access and resource-bound token validation
[20], but does not standardize per-call intent, argument
provenance, workflow prerequisites, or forbidden capability combinations.
AgentCap enforces these application-level constraints through its MCP wrapper
and tool-call authorization boundary.
6 Limitations and Future Work
Future work will extend
provenance tracking to persistent agent memory and cross-context execution,
preserving the integrity history of information across retrieval,
summarization, and session transitions while maintaining session-bound
authority. Additional directions include automated policy synthesis from
declared workflows and secure delegation across independently administered
agents and MCP servers.
7 Conclusion
AgentCap separates model-generated action selection from authorization by
mediating tool invocations through request-scoped capabilities. Its MCP wrapper
and authorization gateway enforce intent, provenance, prerequisites, mutually exclusive
authority, trust, budget, revocation, and session-bound delegation independently
of the model’s reasoning.
CHK-86fdfe61e9d08c14cefa99df
intent, provenance, prerequisites, mutually exclusive
authority, trust, budget, revocation, and session-bound delegation independently
of the model’s reasoning. A shared declarative policy supports both runtime
enforcement and predeployment analysis. Across AgentDojo and InjecAgent,
AgentCap reduces attack success in every evaluated model–benchmark setting,
and reaches zero attack success with GPT-5.4 on both benchmarks.
References
[1]
Hardy, N. (1988). The Confused Deputy: (or why capabilities might have been
invented). ACM SIGOPS Operating Systems Review, 22(4), 36–38.
https://doi.org/10.1145/54289.871709
[2]
Birgisson, A., Politz, J.G., Erlingsson, Ú., Taly, A., Vrable, M., &
Lentczner, M. (2014). Macaroons: Cookies with Contextual Caveats for
Decentralized Authorization in the Cloud. In NDSS 2014.
https://www.ndss-symposium.org/ndss2014/ndss-2014-programme/macaroons-cookies-contextual-caveats-decentralized-authorization-cloud/
[3]
Greshake, K., Abdelnabi, S., Mishra, S., Endres, C., Holz, T., & Fritz, M.
(2023). Not What You’ve Signed Up For: Compromising Real-World LLM-Integrated
Applications with Indirect Prompt Injection. In Proceedings of the 16th
ACM Workshop on Artificial Intelligence and Security (AISec), 79–90.
https://doi.org/10.1145/3605764.3623985
[4]
Debenedetti, E., Zhang, J., Balunović, M., Beurer-Kellner, L., Fischer, M.,
& Tramèr, F. (2024).
CHK-eb61d150991902d355f0754d
ity (AISec), 79–90.
https://doi.org/10.1145/3605764.3623985
[4]
Debenedetti, E., Zhang, J., Balunović, M., Beurer-Kellner, L., Fischer, M.,
& Tramèr, F. (2024). AgentDojo: A Dynamic Environment to Evaluate Prompt
Injection Attacks and Defenses for LLM Agents. In NeurIPS 2024 Datasets
and Benchmarks Track.
https://proceedings.neurips.cc/paper_files/paper/2024/hash/97091a5177d8dc64b1da8bf3e1f6fb54-Abstract-Datasets_and_Benchmarks_Track.html
[5]
Zhan, Q., Liang, Z., Ying, Z., & Kang, D. (2024). InjecAgent: Benchmarking
Indirect Prompt Injections in Tool-Integrated Large Language Model Agents. In
Findings of ACL 2024, 10471–10506.
https://aclanthology.org/2024.findings-acl.624/
[6]
Zhang, H., Huang, J., Mei, K., Yao, Y., Wang, Z., Zhan, C., Wang, H., & Zhang,
Y. (2025). Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and
Defenses in LLM-based Agents. In ICLR 2025.
https://proceedings.iclr.cc/paper_files/paper/2025/hash/5750f91d8fb9d5c02bd8ad2c3b44456b-Abstract-Conference.html
[7]
Zhong, P.Y., Chen, S., Wang, R., McCall, M., Titzer, B.L., Miller, H., &
Gibbons, P.B. (2025). RTBAS: Defending LLM Agents Against Prompt Injection and
Privacy Leakage. arXiv:2502.08966.
https://arxiv.org/abs/2502.08966
[8]
Debenedetti, E., Shumailov, I., Fan, T., Hayes, J., Carlini, N., Fabian, D.,
Kern, C., Shi, C., Terzis, A., & Tramèr, F. (2025). Defeating Prompt
Injections by Design.
CHK-a48db042bd32a1f5a9fb4494
etti, E., Shumailov, I., Fan, T., Hayes, J., Carlini, N., Fabian, D.,
Kern, C., Shi, C., Terzis, A., & Tramèr, F. (2025). Defeating Prompt
Injections by Design. arXiv:2503.18813.
https://arxiv.org/abs/2503.18813
[9]
Shi, T., He, J., Wang, Z., Li, H., Wu, L., Guo, W., & Song, D. (2025).
Progent: Securing AI Agents with Privilege Control. arXiv:2504.11703.
https://arxiv.org/abs/2504.11703
[10]
Costa, M., Köpf, B., Kolluri, A., Paverd, A., Russinovich, M., Salem, A.,
Tople, S., Wutschitz, L., & Zanella-Béguelin, S. (2026). Securing AI
Agents with Information-Flow Control. In NeurIPS 2026.
https://neurips.cc/virtual/2026/poster/152696
[11]
Wang, Z., Gao, Y., Wang, Y., Liu, S., Sun, H., Cheng, H., Shi, G., Du, H., &
Li, X. (2026). MCPTox: A Benchmark for Tool Poisoning on Real-World MCP
Servers. In Proceedings of the AAAI Conference on Artificial
Intelligence, 40(42), 35811–35819.
https://doi.org/10.1609/aaai.v40i42.40895
[12]
Goswami, A. (2025). Agentic JWT: A Secure Delegation Protocol for Autonomous AI
Agents. arXiv:2509.13597.
https://arxiv.org/abs/2509.13597
[13]
Zhang, D., Li, Z., Luo, X., Liu, X., Li, P., & Xu, W. (2026). MCP Security
Bench (MSB): Benchmarking Attacks Against Model Context Protocol in LLM Agents.
In ICLR 2026. https://iclr.cc/virtual/2026/poster/10007929
[14]
Zhu, J., Huang, X., Tseng, K., Vernik, G., Patil, S.G., Fang, V., & Popa,
R.A. (2025).
CHK-f9bf1fca0a78d9b553f26cab
M Agents.
In ICLR 2026. https://iclr.cc/virtual/2026/poster/10007929
[14]
Zhu, J., Huang, X., Tseng, K., Vernik, G., Patil, S.G., Fang, V., & Popa,
R.A. (2025). MiniScope: Authorizing Agents with Least-Privilege Permissions.
arXiv:2512.11147. https://arxiv.org/abs/2512.11147
[15]
South, T., Marro, S., Hardjono, T., Mahari, R., Whitney, C.D., Chan, A., &
Pentland, A. (2025). Position: AI Agents Need Authenticated Delegation. In
Proceedings of the 42nd International Conference on Machine Learning
(ICML), PMLR 267, 82211–82231.
https://proceedings.mlr.press/v267/south25a.html
[16]
Doshi, A., Hong, Y., Xu, C., Kang, E., Kapravelos, A., & Kästner, C.
(2026). Towards Verifiably Safe Tool Use for LLM Agents. In Proceedings
of the IEEE/ACM 48th International Conference on Software Engineering: New
Ideas and Emerging Results (ICSE-NIER), 201–205.
https://doi.org/10.1145/3786582.3786839
[17]
Syros, G., Suri, A., Ginesin, J., Nita-Rotaru, C., & Oprea, A. (2026). SAGA:
A Security Architecture for Governing AI Agentic Systems. In NDSS
2026. https://www.ndss-symposium.org/ndss-paper/saga-a-security-architecture-for-governing-ai-agentic-systems/
[18]
Zhao, W., Li, Z., Zhang, P., & Sun, J. (2026). ClawGuard: A Runtime Security
Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection.
arXiv:2604.11790. https://arxiv.org/abs/2604.11790
[19]
Mellafe Zuvic, D. (2026).
CHK-5326b1b2e0722ccc0d4c964e
ity
Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection.
arXiv:2604.11790. https://arxiv.org/abs/2604.11790
[19]
Mellafe Zuvic, D. (2026). Capability Gates Are Not Authorization:
Confused-Deputy Failures in LLM Agent Frameworks. arXiv:2606.28679.
https://arxiv.org/abs/2606.28679
[20]
Model Context Protocol (2025). Authorization. MCP Specification,
revision 2025-11-25.
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization
Appendix A Supplementary Technical Details
A.1 Policy Language
The AgentCap policy language is parsed by a deterministic recursive-descent
parser according to the following grammar. Here, id denotes an
identifier or quoted string, list a comma-separated list, and
number a numeric literal.
policy ::= block*
block ::= grant | deny | delegation | trust | workflow
grant ::= "grant" id "{" grant-field* "}"
grant-field ::= "action" ":" id
| "resource" ":" id
| "intent" ":" list
| "trust" ":" ">=" number
| "requires" ":" list
| "ttl" ":" duration
| "budget" ":" number
| "deny_groups" ":" list
| "tool" ":" id
| "bound_params" ":" list
| "taints_output" ":" boolean
| "trusted_output" ":" boolean
| "tainted_fields" ":" list
| "trusted_fields" ":" list
deny ::= "deny_combination" id "{"
id ("+" id)+
("resolution" ":" id)? "}"
delegation ::= "delegation" id "{" delegation-field* "}"
delegation-field
CHK-963706316b2aa2b3a0cde26c
st
deny ::= "deny_combination" id "{"
id ("+" id)+
("resolution" ":" id)? "}"
delegation ::= "delegation" id "{" delegation-field* "}"
delegation-field
::= "from" ":" "type" "(" id ")"
| "to" ":" "type" "(" id ")"
| "max_depth" ":" number
| "require" ":" id
| "behavioral_bound" ":" sequence
trust ::= "on_trust" id "below" number "{"
trust-field* "}"
trust-field ::= "revoke" ":" ("all" | "action" "in" list)
| "sandbox" ":" boolean
workflow ::= "workflow" id "{"
"capabilities" ":" list "}"
sequence ::= "[" (id ("->" id)*)? "]"
duration ::= number "s"
boolean ::= "true" | "false"
Every trust block must contain a revoke field. Each block is compiled
directly into the representation consumed by the policy
engine, delegation manager, trust manager, or surface analyzer. Deny blocks
with more than two groups expand into pairwise exclusion rules, and trust tiers
are ordered by threshold during compilation.
A.2 Trust-Policy Sensitivity
Table 1 reports the complete 23-configuration sweep,
grouping settings that produce identical outcomes. Every configuration
authorizes the legitimate request and contains repeated anomalous behavior.
Table 1: Trust-policy sensitivity. Grouped ranges contain all tested values.
Parameter setting
Anomalies to sandbox
Legitimate blocked
Decay 0.1,0.2,0.3,0.4,0.5,0.6,0.70.1,0.2,0.3,0.4,0.5,0.6,0.7
10,5,3,2,2,2,110,5,3,2,2,2,1
0
CHK-377afb04f48cf126668dccb7
d values.
Parameter setting
Anomalies to sandbox
Legitimate blocked
Decay 0.1,0.2,0.3,0.4,0.5,0.6,0.70.1,0.2,0.3,0.4,0.5,0.6,0.7
10,5,3,2,2,2,110,5,3,2,2,2,1
0
Recovery 0.005,0.01,0.02,0.050.005,0.01,0.02,0.05
3
0
Partial threshold 0.4,0.5,0.6,0.70.4,0.5,0.6,0.7
3
0
Full threshold 0.2,0.3,0.40.2,0.3,0.4
4,3,24,3,2
0
Initial trust 0.6,0.7,0.8,0.9,1.00.6,0.7,0.8,0.9,1.0
2,3,3,4,42,3,3,4,4
0