Do Coding Agents Understand Least-Privilege Authorization?

Zheng Yan, Jingxiang Weng, Charles Chen, Dengyun Peng, Ethan Qin, Jiannan Guan, Jinhao Liu, Qiming Yu, Yixin Yuan, Fanqing Meng, Carl Che, Mengkang HuarXiv 2026

TL;DR

As LLM-powered coding agents transition from writing code to executing commands in real-world environments, securing their workspace access via the principle of least privilege is paramount. This paper introduces AuthBench, a benchmark showing that frontier models struggle to infer safe permission boundaries, often locking into model-specific failure modes ("authorization attractors") even with increased reasoning compute. To overcome this, the authors propose Sufficiency-Tightness Decomposition, a two-phase generation and audit strategy that significantly boosts task success while minimizing security exposure.

What Problem Does This Paper Address?

When we give AI agents access to terminal shells, repositories, and local files, we face a classic security dilemma. Granting coarse, blanket permissions creates a massive attack surface; conversely, overly restrictive permissions break the agent's ability to complete tasks.

Ideally, an agent should operate under least-privilege authorization—having access to exactly what it needs, and nothing more. The authors formalize this challenge as permission-boundary inference: the ability of a model to look at a task instruction and a terminal environment, and map out a precise file-level read/write/execute whitelist before execution begins.

Figure 1: Motivation and overview of our work.

Methods

The core bottleneck in direct policy generation is that a single prompt forces an LLM to simultaneously maximize sufficiency (discovering all necessary files/tools) and tightness (rejecting all unnecessary or sensitive files).

To resolve this conflict, the authors introduce Sufficiency-Tightness Decomposition, which splits the task into two distinct, sequential phases:

  1. Phase 1: Sufficiency Reasoning: The model is explicitly instructed to prioritize coverage over minimality. It forward-simulates the execution plan and toolchain (interpreters, compilers, package managers) to generate a generous, coverage-oriented policy ($\pi_{suf}$).
  2. Phase 2: Tightness Audit: The model takes $\pi_{suf}$ and performs a per-entry backward audit. It evaluates each permission against three criteria: task grounding, scope minimality, and sensitivity checks (e.g., overlapping with credential files). Unjustified paths are pruned to produce the final policy ($\pi_{final}$).

Datasets

The paper introduces AuthBench, a benchmark containing 120 realistic terminal tasks spread across 10 professional domains (such as Security Analyst, Software Engineer, and Data Engineer).

  • Composition: 80 standard tasks (ordinary command-line workflows) and 40 sensitive tasks (augmented with realistic attack surfaces like tempting but unnecessary helper scripts or credential files).
  • Ground Truth: Unlike synthetic datasets, AuthBench uses human-reviewed permission specifications ($S_{gold}$) derived from actual system call traces (strace) of verified safe oracle solutions.
  • Validation: It features executable utility validators (to check if the task actually succeeds under the generated policy) and attack validators (to check if a downstream agent exploits a dangerous endpoint).

Key Insights and Ideas

  • Authorization Attractors: Simply scaling up inference-time reasoning (asking the model to "think harder") does not naturally lead to a least-privilege policy. Instead, models migrate toward model-specific "attractors." For instance, Gemini's attractor inherently favors broad task coverage at the expense of security, while Claude and GPT-4/5 variants favor tight, brittle policies that frequently miss critical execution dependencies.
  • Two-Sided Failures Co-occur: Models do not merely exhibit a uniform bias toward being too conservative or too permissive. They frequently fail on both sides at once—omitting a necessary interpreter path while simultaneously over-granting access to a sensitive .env file.
  • Decoupled Safety Dimensions: A model's execution safety (how safely it behaves when given full access) is entirely decoupled from its authorization safety (how safely it restricts its own access). A model might execute a task perfectly safely under full access, yet generate a highly over-privileged policy that leaves the system vulnerable to future exploits.

Key Results

  • The Authorization Bottleneck: Models that reliably solve tasks under full access suffer severe performance drops when forced to generate their own permission boundaries first, proving that policy inference is a distinct, harder bottleneck than task execution.
  • Decomposition Performance: The Sufficiency-Tightness Decomposition successfully breaks the attractor constraints:
  • It increases sensitive-task success rates by up to 15.8% on tightness-biased models (like GPT-5.4).
  • It drastically reduces security risks across all models. For Gemini 3.1 Pro, it cut static sensitive file exposure from 34.8% to 15.7% and slashed actual attack success from 28.3% to 12.5%.
  • It improved execute-axis F1 scores by up to 16.7% on standard tasks.

Limitations and Future Work

While AuthBench marks an important step forward, the authors note several boundaries to their current work:

  • File-System Only: The benchmark is currently limited to file-level read, write, and execute permissions in terminal environments.
  • Uncharted Attack Surfaces: It does not yet cover network access control, inter-process communication (IPC), cloud resources, database credentials, or API-level permissions.
  • Broader Agent Decisions: Future research is needed to see if similar "attractor" dynamics impact other multi-objective agent behaviors, such as tool selection, data sharing, or cross-agent delegation.

Summary updated

BibTeX
@misc{yan2026do,
  author = {Zheng Yan and Jingxiang Weng and Charles Chen and Dengyun Peng and Ethan Qin and Jiannan Guan and Jinhao Liu and Qiming Yu and Yixin Yuan and Fanqing Meng and Carl Che and Mengkang Hu},
  title = {{Do Coding Agents Understand Least-Privilege Authorization?}},
  year = {2026},
  eprint = {2605.14859},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.14859},
}
Figure