Explicit authorization scope improves LLM-based permission checking in coding agents

Shimeng Yang, Changjian Zhou, Chuan Qin, Junfeng Fang, Anchen Ni, Bin Yan and 1 more

TL;DR

The authors test the permission checkers in Claude Code, Codex and Qwen Code on DevOps and prompt injection tasks, and find most out-of-scope actions get approved because the user request never states what is off limits.

Read this as a

Why builders care

Editor's note

If your agent has an auto-approve mode, a smarter model or more context will not fix it. Under the original requests the checkers approved 54% to 93% of out-of-scope actions; adding the missing authorization rules cut misses on the affected actions to 8% to 26% and also reduced false blocks.

How to apply it

Editor's note
  1. 1Make authorization scope explicit: pass written allow and deny rules to the permission checker alongside the user request instead of relying on the request alone.
  2. 2Do not count on a stronger checker model or extra context to catch out-of-scope actions; in this study neither consistently lowered miss rates.
  3. 3Once rules are explicit, also give the checker the tool outputs and the attributes of the action's target, which further reduced misses.
  4. 4Add out-of-scope and prompt injection cases to your agent evals and track the approval miss rate and the false-block rate as separate numbers.

Code

Not found

No verified code link yet. We checked the abstract, arXiv comments and Hugging Face; if the authors release code later it will show up here.

Key results

From the abstract
  1. 1

    The results show that, under the original user requests, the three permission checkers incorrectly approve 54%-93% of out-of-scope actions.

  2. 2

    Neither stronger models nor additional context consistently reduces these miss rates.

  3. 3

    Adding these authorization rules to the user requests reduces the miss rates for these 132 actions from 67%-92% to 8%-26%, while also reducing false-block rates for authorized actions.

  4. 4

    Moreover, when complete tasks are rerun with explicit authorization rules, none of the three agents proposes any out-of-scope actions.

  • Coding agents use auto mode to delegate some approval decisions to permission checkers, reducing the need for repeated user confirmation.
  • Permission checkers determine whether actions are authorized based on user requests and context.
  • However, natural language requests often do not fully specify the scope of authorization.

  • We evaluate three widely used coding agents (Claude Code, Codex, and Qwen Code) on DevOps and prompt injection benchmarks, recording their actions and the corresponding approval decisions throughout task execution.
  • We then re-evaluate the recorded actions to separately assess the effects of model capability, available information, and explicit authorization rules on approval decisions.

Coding agents use auto mode to delegate some approval decisions to permission checkers, reducing the need for repeated user confirmation. Permission checkers determine whether actions are authorized based on user requests and context. However, natural language requests often do not fully specify the scope of authorization. We evaluate three widely used coding agents (Claude Code, Codex, and Qwen Code) on DevOps and prompt injection benchmarks, recording their actions and the corresponding approval decisions throughout task execution. We then re-evaluate the recorded actions to separately assess the effects of model capability, available information, and explicit authorization rules on approval decisions. The results show that, under the original user requests, the three permission checkers incorrectly approve 54%-93% of out-of-scope actions. Neither stronger models nor additional context consistently reduces these miss rates. Further analysis shows that 132 of the 143 out-of-scope actions violate authorization rules that are absent from both user requests and tool outputs. Adding these authorization rules to the user requests reduces the miss rates for these 132 actions from 67%-92% to 8%-26%, while also reducing false-block rates for authorized actions. Once the authorization scope is explicit, providing tool outputs and target attributes further reduces miss rates. Moreover, when complete tasks are rerun with explicit authorization rules, none of the three agents proposes any out-of-scope actions. Taken together, these results suggest that reliable automatic approval requires clearly defined permissions, accurate identification of action targets, and approval decisions that consistently follow authorization rules.

Everything on this page is written from this abstract. For methods and full results, read the paper PDF.

Ask the paper

Answers come from the paper summary and abstract.

Ask anything about “Explicit authorization scope improves LLM-based permission checking in coding agents”, or start with one of these:

Closest matches across the feed and every collection, by shared words in titles, topics and abstracts.