Manuscript Offprint

arXiv:2610.05840

Compromise Is Not Consequence: Evaluating Task-Scoped Authorization in LLM Agents with Paired Replay

Tural Hagverdiyev

Tural Hagverdiyev

Abstract—A tool-using model can follow a malicious instruction even when its credentials are valid. We study whether task-scoped authorization contains the resulting tool execution. Our paired-replay testbed samples a model request once and submits the same action, resource, and arguments to broad bearer, scoped JWT, sender-constrained, and Open Policy Agent conditions. The frozen main experiment uses 128 scenarios across four tool domains and five local model configurations. Among valid attacked post-exposure decisions, broad-bearer harmful execution ranges from 8.9% to 37.8% across models; all three scoped conditions record zero. The policy changes execution, not the frozen model decision. These results support containment of the tested cross-action and cross-resource consequences under researcher-supplied task authority, not prevention of prompt injection. A bounded six-task AgentDojo extension preserves native scoring and records 11/24 injected broad-policy attack flags versus 0/24 scoped flags, with utility of 5/24 and 6/24. Low exposure, invalid decisions, and purposive task selection limit that comparison. The primary experiment measures safe continuation rather than final-answer correctness. An empirical-bank fresh-sampling comparison finds no estimation advantage from pairing when scoped outcomes are constant zero. The contribution is a controlled measurement of compromise, enforcement, and continuation, with explicit limits on what each observation establishes.

I. INTRODUCTION

End-to-end evaluations of tool-using LLM agents often collapse two distinct security failures into one outcome: whether the model selected a request outside the user's task authority, and whether the service allowed that request to execute. This paper addresses that measurement problem. Imagine an assistant asked to summarize report.txt. Retrieved content tells it to delete the file, and the model selects file.delete. The model has departed from the user's task, but deletion has not yet occurred. A broadly authorized service may execute the request; a read-scoped service may reject the identical request. Model compromise and operational consequence are related, but they are not the same event.

The distinction matters because a single end-to-end attack-success rate can hide qualitatively different outcomes. The model may resist the injection; select an out-of-scope action that policy denies; select one that reaches the tool but fails for another reason; recover safely after denial; or remain safe yet fail to finish the user's task. A low aggregate rate therefore does not reveal which security layer prevented harm. Separating these events supports more precise evaluation of agent defenses, fairer comparison of authorization mechanisms, and composition of model-side, orchestration-side, and service-side controls.

Indirect prompt injection is well established [1], [2], [3]. Recent work addresses important adjacent layers: Task Shield checks semantic task/action alignment; AgentSandbox evaluates a layered defense architecture; SPA combines a fixed plan with information-flow control and persistence; PAuth derives authority and tracks operand provenance; Progent generates and enforces privilege policy; and AgentDojo evaluates utility and security in a stateful benchmark [4], [5], [6], [7], [8]. The relevant limitation is methodological, not that these systems are ineffective: their reported evaluations generally do not make the service-side response to the same already-sampled model request across authorization conditions the primary experimental unit. With fresh model samples, Policy A may receive a deletion while Policy B receives a read, so an attack-success difference can reflect both model stochasticity and policy behavior. Fresh-sampling evaluation estimates the expected behavior of the whole stochastic model–policy pipeline. Fixed-request paired replay instead estimates the downstream enforcement contrast conditional on one concrete model-selected request; increasing the number of fresh samples improves estimation of the former estimand but does not convert it into the latter.

Isolating post-decision enforcement creates three experimental-design challenges. First, stochastic action selection makes the request itself vary across runs. Second, tool execution is stateful: successful requests mutate resources, so every policy replay must begin from equivalent pre-state while failures remain visible. Third, model compromise, policy denial, execution, residual state change, recovery, and final task correctness are distinct events requiring separate observations. These are identification and measurement problems, not merely implementation bookkeeping.

We introduce paired replay to address them. A live model traverses the stateful trajectory and samples one structured request q=(a,r,x)q = (a, r, x) after exposure to untrusted content. We normalize and freeze its action, resource, and arguments, reset or reconstruct equivalent pre-state, and replay that identical request under each authorization condition. Recovery remains unpaired because a denial changes the model's next observation. Holding q fixed removes one source of ambiguity from cross-policy comparison; it identifies differences among the implemented policies for that request, not a general causal effect beyond the tested design.

Our primary evidence is a controlled five-model, 128-scenario experiment. A bounded AgentDojo evaluation provides secondary evidence in an external stateful environment. We observe separation between model compromise and realized consequence and also a useful negative result: paired replay does not produce a practical estimation advantage when scoped harmful-execution outcomes are constant zero. Incomplete hosted observations remain exploratory in Appendix A.

The novelty is not task-scoped authorization itself. We contribute (1) a reusable post-decision paired-replay evaluation protocol for isolating downstream enforcement from stochastic model selection that samples one live structured request and replays its frozen action, resource, and arguments across policies; (2) a request-level event decomposition of compromise, intervention, execution, residual state effect, and post-denial continuation; and (3) an empirical study across the controlled corpus and bounded AgentDojo tasks, including the negative paired-versus-fresh-sampling result. This identification-oriented method evaluates what enforcement does after a concrete model decision has been sampled; it is not a new authorization architecture, automated scope inference, or a claim that static scope replaces richer defenses [9].

References (14)