Skip to content

A general policy and enforcement layer for agent tool-call safetyA General-Purpose Policy and Enforcement Layer for Secure Agent Tool Calls

Shincheol Lee, Chansu Han, Takeshi Takahashi
National Institute of Information and Communications Technology
arXiv: 其他 AI 安全论文arXiv:2612.05202Originally published Indexed by this site · 2 days agoDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose a general tool-call policy and enforcement layer, compare enforcement on and off on AgentDojo and AgentThreatBench, and report improved security but utility that varies by model and task.

Threat modelThe defense sits on the path from the agent to the environment, making reject, approve, or redact before a tool call changes the environment. The risk comes from indirect prompt injection in tool-returned data, memory, emails, or tickets; the policy reads the call, user task, and conversation, and the decision stays outside the model.

Questions
An agent's tool calls change the external environment, and indirect prompt injection may use calls to cause side effects. The authors argue that in-model defenses change with the model, and existing benchmark scores do not directly indicate whether each call should be allowed.
Methods
The authors group tools by send, alter, collect, create, and recon, write reject, approve, and redact rules for tools, and enforce them on the path from the agent to the environment; the same policy is used for two existing benchmarks.
Experiments and results
Six models participated in the case study. The authors report that security rises in multiple places on the two benchmarks, but utility may be maintained, rise, or fall; AgentDojo additionally measures FAR/FDR, and on travel the consistency of two LLM judgments with rule-based judgment is also compared.
Limitations and future work
The authors raise two open questions: how to choose general yet explicit conditions when future uses are unknown, and how deployers should choose the judge; the consistency on travel still needs to be checked in other environments and models. The full policy and enforcement code are planned to be released after the paper is accepted.
Experimental setupGemma4 26B、Qwen3.5 27B et al. · AgentDojo、AgentThreatBench · utility、security et al.
Metrics
utilitysecurityFARFDRSame ruleSame decision
AI summaryThe paper proposes a general policy and enforcement layer deployed between an agent and its environment, which decides to deny, approve, or redact a tool call based on the call's content, the user task, and the conversation before the call changes the environment. The policy groups tools by effect and writes rules for each group, is not tied to a specific model, benchmark, or deployment environment, and organizations or benchmarks can use it as a baseline and customize it to their own environment and risks. A case study applies the policy to two benchmarks, AgentDojo and AgentThreatBench, comparing utility and safety with enforcement on and off. Results show safety rises on both benchmarks, with notable gains in cases where safety was lower with enforcement off, while utility is maintained, increased, or decreased depending on model and task. On AgentDojo, the layer additionally measures the false allow rate (FAR) and the false deny rate (FDR).

The paper proposes a general policy and enforcement layer deployed between an agent and its environment, which decides to deny, approve, or redact a tool call based on the call's content, the user task, and the conversation before the call changes the environment. The policy groups tools by effect and writes rules for each group, is not tied to a specific model, benchmark, or deployment environment, and organizations or benchmarks can use it as a baseline and customize it to their own environment and risks. A case study applies the policy to two benchmarks, AgentDojo and AgentThreatBench, comparing utility and safety with enforcement on and off. Results show safety rises on both benchmarks, with notable gains in cases where safety was lower with enforcement off, while utility is maintained, increased, or decreased depending on model and task. On AgentDojo, the layer additionally measures the false allow rate (FAR) and the false deny rate (FDR).

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors aim to make and enforce allow, reject, or redact decisions outside the model before a tool call changes the environment.

    The core question is: how can a general policy that does not depend on a specific model decide and enforce whether an agent's tool call is allowed before that call changes the environment?

    • Risk scenario: Content such as emails, files, and web pages returned by tools can contain malicious instructions; if the agent calls tools based on them, the impact falls on external environments such as email, chat, files, or accounts, not just on generated text.
    • Gaps in existing work: The authors argue that in-model methods such as instruction hierarchy and spotlighting change when the model changes, and that after a call is generated they no longer decide whether to allow or block it; existing benchmarks mostly record task success, attack success, or refusal, rather than the decision for a single call.
    • Core design: The policy groups tools by tool effect, writes rules for each tool, and, using the call, the user task, and the conversation, gives reject, approve, or redact; the enforcement layer sits on the path from the agent to the environment.
    • Threat model:
      • Protection goal: Make and enforce a decision before a call changes the environment, reducing unintended side effects caused by indirect prompt injection.
      • Risk sources: Tool-returned data in AgentDojo, and memory entries, emails, or ticket records in AgentThreatBench.
      • Defense location and inputs: The decision is outside the model and reads the tool name, arguments, user task, and conversation; the agent itself remains unchanged.
      • Not explicitly given in the paper: Assumptions about attacker knowledge such as white-box or black-box, and an adaptive-attacker setting.
    • Deliverable: A general policy and enforcement layer, with case studies on AgentDojo and AgentThreatBench; AgentDojo additionally adds FAR and FDR to distinguish call decisions from task or attack outcomes.
  2. What related research exists?

    Related work is divided into in-model defenses, model-external enforcement, and security benchmarks; the authors position their difference as a general policy and call-level decisions.

    In-model defenses

    • Instruction hierarchy (Wallace et al., 2024): Training makes trusted instructions take precedence over untrusted text; Spotlighting (Hines et al., 2024): Marks untrusted text so the model distinguishes it from user commands.
    • Common boundary noted by the paper: The authors state that both affect whether the agent generates a call, but after the call is generated they no longer allow or block it, and the decision changes when the model changes.

    Model-external policy and enforcement

    • Progent (Shi et al., 2025): Allows or forbids calls by argument conditions, supports fixed human policies and policies updated by an LLM per task; blocks when no rule matches. CaMeL (Debenedetti et al., 2026) separates program generation, value extraction, and an interpreter, and enforces policy based on value provenance and dependencies; FORGE (Palumbo et al., 2026) uses a reference monitor to check an action and its dependency events before the action runs.
    • AgentSpec (Wang et al., 2026): Rules contain trigger, check, and enforcement, and can stop an action, ask the user or the model, etc. Conseca (Tsai and Bagdasarian, 2025) generates a policy for the current task and allows or rejects actions; Task Shield (Jia et al., 2025) has the model judge whether an instruction serves the user goal, and calls that do not contribute are not executed and feedback is returned.
    • Difference from this paper: The authors state that this layer does not split the agent or generate a policy per task; it gives reject, approve, redact based on the call, user task, and conversation. When no rule matches, it defaults to reject, as Progent does; redact runs the call and removes part of the returned text.

    Security benchmarks

    • Attack-capability category: Cybench, InterCode, 3CB, CyberGym, and CVE-Bench use outcomes such as CTF flags, a valid PoC on an unpatched vulnerability, or successful exploitation of a real Web vulnerability.
    • Hijacking and harmful tool use category: AgentDojo evaluates utility and attack goals under indirect prompt injection; CodeIPI targets injection in coding repositories; b3 looks at a single backbone call; AgentThreatBench records utility and security separately; AgentHarm evaluates harm and refusal under harmful user requests.
    • Model cyber-risk compliance category: CyberSecEval 2–3 evaluates cyberattack assistance, code security, prompt injection, etc.; the authors note that some of these tests do not provide application tools, and the scores are properties of the model's answers.

    Baselines and this paper's positioning

    • Experimental comparison: enforcement off is the baseline, and enforcement on applies the same policy; the benchmarks are AgentDojo and AgentThreatBench. The paper does not run the above defenses as experimental baselines.
    • Authors' positioning: Existing systems mostly decide allow or block within their own settings, while benchmarks compute their own outcome scores; the authors aim to provide a general policy that other systems or benchmarks can adopt and specialize, while preserving the benchmarks' utility and security and adding call-level FAR and FDR.
  3. How does the paper address this problem?

    The policy organizes 683 rules by five categories of tool effect, and the model-external enforcement layer rejects, approves, or redacts calls by priority.

    The overall approach is a general-purpose policy and enforcement layer: policies are written for the tools themselves before runtime, and the enforcement layer applies decisions between the agent and the environment, with no modification needed to the agent or model. The main results of the case study come from rule-based judgment.

    Policy Organization and Rule Form

    • Grouped by effect: five categories: send, alter, collect, create, recon; the same tool can belong to multiple effects. If a new tool already has a corresponding effect, rules are added under that effect; if the effect does not exist, the effect and rules are added.
    • Rule content: each rule specifies the tool, the object checked, the risk, the condition, and the decision; conditions combine the user task and the conversation, rather than matching only the tool name.
    • Policy size: send writes 100 rules for 6 tools, alter writes 118 for 15 tools, collect writes 325 for 40 tools, create writes 91 for 9 tools, recon writes 49 for 7 tools; a total of 76 tools and 683 rules, of which 507 are reject, 156 are approve, and 20 are redact (Section 3.6).

    Three Decisions and Execution Order

    • Reject / approve: reject prevents the call from reaching the environment, and approve allows it to continue. Before the call runs, reject rules are tried first, and the first matching rule takes effect; approve is possible only when no reject matches, and if no approve matches, the default is to deny.
    • Redact: after the tool returns text, sensitive or injected content is removed and the rest is kept, without denying the call that obtained the text; if no in-scope content remains, it is denied.
    • Observability: rules are executed first when the required information is already observable before the call; rules that need the return value are executed after the tool returns, and redact belongs to the latter.

    Who Judges the Call

    • Rule-based judgment: checks are written for the policy to determine whether the condition holds based on the call and context, and then the matching rule gives the decision.
    • LLM judgment: the model receives the call, context, and policy and makes a decision. In the comparison experiment, the prompt lists only the rules of the called tool and the tool name, arguments, user task, and prior tool results; the model selects one rule, whose approve or reject becomes the decision, and if no listed rule is selected, it is denied.
    • Does not read the answer list: the benchmark may list ground-truth calls that solve the task, but these are not read during judgment; it judges only the calls the agent actually issues.

    Benchmark Integration and Call-Level Metrics

    • Original scoring retained: enforcement off scores the calls generated by the agent as-is, while on applies the policy; utility still records whether the user task succeeds, and security still records whether the attack fails.
    • FAR / FDR: FAR is the proportion of attack calls that are allowed, where allowed includes approve and redact; FDR is the proportion of user-task calls that are denied. Attack calls or user-task calls are identified through the ground-truth calls listed before the run, with the same tool and arguments containing the arguments of the corresponding call; calls matching neither enter neither ratio.
    • Metric boundaries: the authors state that a high FAR does not equal attack success, and a high FDR does not equal a utility decrease. AgentDojo provides the above lists, so FAR/FDR are computed; AgentThreatBench does not provide them, so they are not computed.
    • Release status: the full policy and enforcement source code are planned to be released after the paper is accepted (Section 3.6).
  4. What experiments did the paper conduct?

    Six models were compared on two benchmarks with enforcement on and off; security rose in multiple places, but utility and some tasks showed decreases or exceptions.

    Experimental Setup

    • Models tested: Gemma4 26B, Qwen3.5 27B, Qwen3 14B, GPT-OSS 20B, Haiku 5.5, Sonnet 5.5, six in total; the main results compare enforcement off and on under rule-based judgment.
    • AgentDojo: workspace 560 samples, slack 100, banking 144, travel 140. The run combinations were 40 user tasks × 14 injection tasks, 20×5, 16×9, 20×7, respectively.
    • AgentThreatBench: memory poison 10 samples, autonomy hijack 6, data exfiltration 8; the tasks themselves already contain attacks.
    • Metrics and determination: utility looks at whether the user task is completed, security is the proportion of attacks that did not succeed; an attack is successful if the attack goal appears in the response or the environment. AgentDojo additionally reports FAR and FDR, defined in Section 4.3.
    • Judgment consistency: on travel, Gemma4 26B and Qwen3 14B each judged the same set of 917 calls, compared with rule-based judgment for Same rule and Same decision; redact is executed after the return and is not included in this comparison.
    • Settings not reported: the paper does not report the number of repetitions, statistical significance tests, model sampling parameters, or the cost or time of the LLM judgment comparison.

    Main Results

    The numbers in the table below are taken from the item-by-item reporting of Figure 5 and Figure 6 in the main text; the format is off→on. The text of Figures 5 and 6 does not give complete values for all model × condition combinations; unreported entries are left as "not reported".

    Swipe horizontally to read the table

    Benchmark and taskModelUtility off→onSecurity off→on
    AgentDojo slackGemma4 26B0.70→0.610.62→1.00
    AgentDojo bankingQwen3.5 27B0.84→0.630.27→1.00
    AgentDojo workspaceQwen3.5 27B0.61→0.720.91→1.00
    AgentDojo travelGemma4 26B0.74→0.610.84→0.95
    AgentDojo travelQwen3.5 27B0.64→0.640.78→0.99
    AgentThreatBench memory poisonQwen3 14B0.70→0.800.40→1.00
    AgentThreatBench autonomy hijackQwen3.5 27B1.00→1.000.67→0.50
    AgentThreatBench data exfiltrationGPT-OSS 20B0.25→0.751.00→1.00
    • The authors' main interpretation: for Gemma4 26B and Qwen3.5 27B on slack, workspace, and banking, the attack success rate drops to 0 and security reaches 1.00; on travel, attacks are still not all failures. The authors use these two models to judge whether utility is maintained, because the off utility of Qwen3 14B and GPT-OSS 20B is already low.
    • Utility is not universally maintained: Gemma4 26B's workspace utility is 0.63→0.61; on slack, Gemma4 26B is 0.70→0.61 and Qwen3.5 27B is 0.67→0.56; on banking, Gemma4 26B is 0.85→0.61.
    • Exceptions: Haiku 5.5 and Sonnet 5.5 already have off security of 1.00 on slack, workspace, and banking; on travel they go from 0.87→0.89 and 0.89→0.91, respectively, but both decrease in all eight utility cells. On AgentThreatBench autonomy hijack, Qwen3.5 27B's security decreases, and GPT-OSS 20B's utility is 1.00→0.83.

    FAR and FDR on AgentDojo

    • Attack calls can still be allowed: in Table 3, Haiku 5.5's FAR on workspace and travel is 1.000, and Sonnet 5.5's is also 1.000; Gemma4 26B's FAR on slack and workspace is 0.259 and 0.629, respectively, even though the main text reports that the attack success rate at these two places drops to 0.
    • False refusals and utility do not coincide: Qwen3.5 27B's FDR on slack is 0.070, and utility is 0.67→0.56; on banking, the FDR of Gemma4 26B and Qwen3.5 27B is 0.237 and 0.220, respectively, and utility decreases for both.
    • The authors' explanation: a high FAR may be because attack calls also conform to the user task, and the attack goal may still not be achieved; a high FDR does not necessarily mean the user task fails. The highest FDR in Table 3 is Qwen3 14B's 0.420 on banking.

    Consistency of the Two Judgment Methods

    • Gemma4 26B: in Table 4, of 917 calls, 885 are Same rule and 885 are Same decision, both 0.965.
    • Qwen3 14B: 861 Same rule (0.939), 886 Same decision (0.966); 56 have different rule names, of which 25 still have the same decision.
    • Scope limitation: the comparison covers only AgentDojo travel, the approve/reject before the call runs, and does not include redact; the authors believe this consistency still needs to be checked in other environments and models.

    Other Ablations and Analyses

    • Memory poison: Gemma4 26B and Qwen3.5 27B already have off security of 1.00; GPT-OSS 20B is 0.50→1.00, Haiku 5.5 is 0.70→1.00, Sonnet 5.5 is 0.60→1.00 (Figure 6 main text).
    • Autonomy hijack: Gemma4 26B, Qwen3 14B, and Haiku 5.5 all have security of 0.33→0.67, GPT-OSS 20B is 0.17→0.33, Sonnet 5.5 is 0.50→0.67 (Figure 6 main text).
    • Data exfiltration: Qwen3.5 27B and Qwen3 14B maintain utility of 0.88 when on; all models have no successful attacks under off and on, with security of 1.00 (Figure 6 main text).
    • Not done in the paper: adaptive attacks, experimental comparison with defenses such as Progent/CaMeL, and item-by-item ablation of policy rules are not reported.
  5. What are some points that can be further explored?

    The authors leave two open questions: general conditions and the choice of judge; the experiments cover six models, two benchmarks, and judgment consistency on travel.

    Limitations and Future Directions Noted by the Authors

    • Choice of general conditions: Section 5.2 states that when future uses are unknown, conditions must both apply to unforeseen uses and be explicit enough to approve, reject, or redact; writing only "the call should be reasonable" cannot produce a decision, and conditions tied to a single environment apply only to that use.
    • Choice of judge: Section 5.3 and the Conclusion state that deployment or benchmarks need to choose rule-based or LLM judgment according to resources, cost, time, and structure; different conditions require different evidence, and different judges may make different decisions on the same call.
    • Consistency still needs extended checking: Section 5.3 explicitly writes that the consistency of the two models with rule-based judgment on travel needs to be checked in other environments and other models.
    • Tool extension is an open design question: Section 5.1 points out that the tool set is too broad, and listing tool names one by one would be rewritten as new tools appear; the authors use effect-based rule extension as a response, rather than claiming to have covered all future tools.
    • Release is still pending: Section 3.6 states that the full policy and enforcement source code are planned to be released after the paper is accepted.

    Scope of Experimental Coverage

    • Models and benchmarks: the experiments run six models, covering the four AgentDojo suites and the three AgentThreatBench tasks; the main results compare enforcement off/on for the same policy.
    • Samples and calls: the AgentDojo suite sample counts are 560, 100, 144, 140, and the AgentThreatBench task counts are 10, 6, 8; LLM judgment consistency is tested only on the 917 calls of travel.
    • Judgment and metrics: the main results use rule-based judgment; LLM judgment compares only Same rule and Same decision, excluding redact. FAR/FDR are computed only on AgentDojo, because AgentThreatBench does not list ground-truth calls.
    • Not reported in the paper: number of repetitions, statistical significance tests, model sampling parameters, the cost or time of LLM judgment, and adaptive attack evaluation.
    • Experimental comparison: the paper discusses multiple in-model and out-of-model defenses, but the baseline of the case study is enforcement off, and these defenses were not run as comparisons.
  6. Summarize the main content of the paper

    The authors use a general model-external policy to govern tool calls and report security gains and utility trade-offs across six models and two benchmarks.

    This is a study of an out-of-model policy and enforcement layer for agent tool calls, aiming to handle risks such as indirect prompt injection before calls change the environment, and to make the same policy usable by different deployments or benchmarks.

    • Method: tools are grouped by send, alter, collect, create, recon, with 76 tools and 683 rules in total; rules combine the call, user task, and conversation to give reject, approve, or redact. Reject rules take priority, the default is to deny when no approve rule matches, and redaction is executed after the tool returns.
    • Evaluation: Gemma4 26B, Qwen3.5 27B, Qwen3 14B, GPT-OSS 20B, Haiku 5.5, Sonnet 5.5 are compared on AgentDojo and AgentThreatBench with enforcement off/on; utility and security are retained, and FAR and FDR are added on AgentDojo.
    • AgentDojo results: Gemma4 26B and Qwen3.5 27B both rise to security 1.00 on slack, workspace, and banking; on travel they go from 0.84→0.95 and 0.78→0.99, respectively. At the same time, banking utility goes from 0.85→0.61 and 0.84→0.63, respectively, indicating that the gains come with task-related utility changes.
    • AgentThreatBench results: on memory poison, the security of Qwen3 14B, GPT-OSS 20B, Haiku 5.5, and Sonnet 5.5 all rises to 1.00; on autonomy hijack most models rise, but Qwen3.5 27B drops from 0.67 to 0.50; on data exfiltration security is 1.00 under both off and on.
    • Call decisions and judges: Table 3 shows that a high FAR can co-occur with attack failure, so the authors emphasize that FAR/FDR cannot replace task results. In Table 4, on the 917 calls of travel, the Same decision of Gemma4 26B and Qwen3 14B with rule-based judgment is 0.965 and 0.966, respectively.
    • Authors' conclusion: the authors state that this layer can be integrated into deployments or existing benchmarks while retaining their utility and safety scores; the open questions are how to formulate general yet explicit conditions under unknown uses, and how to choose the judge. The full policy and code are planned to be released after the paper is accepted.

Research lineage

5 foundations · 0 follow-ups in library
Explore in knowledge graph →
This paper
A General-Purpose Policy and Enforcement Layer for Secure Agent Tool Calls
2026-12-03
Follow-up work

No later in-library follow-ups recorded yet.

Why cited · Relation evidenceCitesThis paper → Foundation
“Cybench takes tasks from professional capture-the-flag (CTF) competitions, and the agent submits the flag from a container [25].”
Cybench: A Framework for Evaluating Cybersecurity Capabilities and Risks of Language Models · 2024-08

Related papers

Show 3 more papers
Read originalarxiv.org