arXiv(opens in a new tab)cs.SESep 2026Cited by 5 papers on PaperVantage

Manuscript Offprint

arXiv:2609.08371

Authority Is Not a String: A Capability-Scoped Harness for Prompt-Injection-Resistant Coding Agents

Dimitrios Stamatios Bouras, Yihan Dai, Sergey Mechtaev

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Dimitrios Stamatios Bouras

2501112125@stu.pku.edu.cn

Key Lab of HCST (PKU), MoE and

School of Computer Science

Peking University

Beijing, China

Yihan Dai

2501112020@stu.pku.edu.cn

Key Lab of HCST (PKU), MoE and

School of Computer Science

Peking University

Beijing, China

Sergey Mechtaev

mechtaev@pku.edu.cn

Key Lab of HCST (PKU), MoE and

School of Computer Science

Peking University

Beijing, China

Abstract

Coding agents use system-level tools to read files, execute commands, and modify source code. Within the agent's sandbox, these tools often carry ambient authority: naming a resource is sufficient to act on it. Indirect prompt injection exploits this authority by placing instructions in repository files or tool output that cause the agent to perform actions the user did not request.

We propose CapScope, a harness-level authorization mechanism that restricts tool use without requiring the model to identify malicious text. Before repository contents or tool output are read, CapScope derives a task-wide authority ceiling from trusted input. It then assigns each agent a separate set of typed capabilities, stored outside the model's context. Every tool call is checked against the capabilities of the agent that issued it. Permissions assigned to one sub-agent are therefore not automatically available to another. An injection may cause an agent to request an action, but the request is blocked unless that agent already has the required capability.

We implement CapScope on the Pi coding agent and evaluate it in a repair workflow where an orchestrator delegates subtasks to separate sub-agents. The evaluation covers five Python tasks, five injection surfaces, four authorization conditions, and three trials per cell (300 runs). The injected effect executes in 33–47/75 runs under the ambient-authority and global-policy baselines, compared with 3/75 under CapScope. CapScope completes 68/75 repairs, while the baselines complete 68–72/75.

CCS Concepts: • Security and privacy → Access control.

Keywords: coding agents, indirect prompt injection, capabilities, least authority, tool authorization

ACM Reference Format:

Dimitrios Stamatios Bouras, Yihan Dai, and Sergey Mechtaev. 2026. Authority Is Not a String: A Capability-Scoped Harness for Prompt-Injection-Resistant Coding Agents. In Proceedings of the 2nd ACM SIGPLAN Workshop on Language Models and Programming Languages (LMPL '26), October 04–09, 2026, Oakland, CA, USA. ACM, New York, NY, USA, 10 pages. https://doi.org/10.1145/3843750.3843843

References (13)