arXiv(opens in a new tab)cs.CRSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.39678

Aletheia: Permission-Minimality Testing for Coding-Agent Rules

Jieke Shi, Yuchen Chen, Junda He, Yue Liu, David Lo

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

JIEKE SHI, Singapore Management University, Singapore

YUCHEN CHEN, Nanjing University, China

JUNDA HE, Singapore Management University, Singapore

YUE LIU, Adelaide University, Australia

DAVID LO, Singapore Management University, Singapore

Repository instruction files guide coding agents, but also expose them to prompt injection. Malicious rules can request credential access or data transfer while the agent produces a correct patch. We present ALETHEIA, a framework for permission-minimality testing. ALETHEIA translates requested authority into a typed language and synthesizes executable sandbox configurations. It runs the unchanged rule and task under full permissions and independent restrictions that remove one permission at a time. Passing independent functional tests under strictly reduced authority provides a dispensability witness, which ALETHEIA interprets against task context to diagnose suspicious requests. We formalize synthesis and the conditions connecting witnesses to enforced restrictions. On a shared refactoring task, ALETHEIA executes and detects all 314 AIShellJack attack inputs, with no alarms on five benign templates. Among 80 manually verified benign GHAgentFiles rules, it raises three false positives (3.75%).

1 INTRODUCTION

Repository instructions, such as AGENTS.md and Cursor rules, guide coding agents through project conventions, but also enable indirect prompt injection [4, 6]. An attacker can request uploading a local archive before a refactoring, and the agent may comply while producing a correct patch. Functional correctness alone therefore does not reveal the attack. Conversely, file access and communication also support legitimate development, so their presence alone does not establish malicious behavior.

Our insight turns least privilege [9] into an executable test: can the agent complete an independently specified task when a requested permission is withheld? Both executions retain the rule. If both pass the tests and the sandbox restriction removes authority, that authority is dispensable for the tested task. The comparison requires no recognition of particular payload wording.

Two challenges govern this comparison. Permissions overlap and share dependencies: deleting a file grant is ineffective if another covers its directory, while surviving tools must retain shared dependencies. Acceptance must come from trusted tests, since an attacker can claim that unwanted operations are mandatory. Executions must also restore the same initial state. ALETHEIA combines typed extraction, dependency-aware synthesis, and independent deletion experiments to connect source requests to enforceable restrictions preserving tested functionality. These witnesses establish task-relative dispensability, rather than malicious intent or a globally minimum policy.

References (14)