Skip to content

ParseGap: testing what coding agents authorize and what the shell executesParseGap: Testing What Coding Agents Authorize and What Shells Execute

arXiv: 其他 AI 安全论文· arXiv:2611.29546· Jieyu Li·Indexed by this site · 1 days ago· Originally publishedSelected Attacks· Its place in the scan record →SelectedAttention43

Quick read

Based on the paper's full text (AI-generated); refer to the original

AI summaryResearchers propose the ParseGap differential testing framework, comparing the command approval checkers of 8 production coding agents item by item against the actual execution behavior of GNU Bash 5.2, cataloging 17 deduplicated root causes, and summarizing three classes of authorization-execution divergence boundaries: parsing, tool parameters and sandbox. Across all 8 agents, every checker let through policy violations caused by tool parameters (9–47 of 55 cases); in Codex CLI, matching an allow rule also disables the read-only OS sandbox. Live model-driven trials produced the target violation effect on all 16 agent–model combinations, 14 of which were under configured restriction rules. To eliminate the second parse, the authors design ShellPlan, which compiles a strict Bash subset into a typed execution plan dispatched directly via execve, letting through 0 of 4,174 active attack cases across 6 static suites, with 0/90 attack hits on a ten-model controlled benchmark (62/90 without defenses) and a median gate latency of 1.28 ms.

Questions
The approval gate of an LLM coding agent only parses the command string and allows based on that, but then hands the same original string to the system shell for execution, so authorization and execution may understand the same command differently. The authors count 171 shell approval bypass advisories from July 2025 to October 2026, and argue that such divergence causes policy violations at three boundaries: parse, utility parameter semantics, and OS isolation.
Methods
The authors build the ParseGap differential testing framework: each input is fed both to the unmodified vendor checker and to GNU Bash 5.2 in an isolated container, tracking process launches and filesystem changes, and any case where the checker allows but the runtime effect violates the reference policy is recorded as a violation. To eliminate the second parse, the authors design ShellPlan, which compiles a strict Bash subset once into a typed execution plan, validates tool parameters against a positive capability specification, and then dispatches directly via execve, without invoking a shell and without loosening the OS sandbox.
Experiments and results
On eight production coding agents, ParseGap induces 17 deduplicated root causes; all checkers allowed writes or subprocess launches caused by read-only tool parameters (9–47 of 55 cases), and in Codex CLI matching an allow rule also disables the read-only sandbox; under two frontier models, all 16 agent–model combinations produced targeted violation effects. ShellPlan allows 0 cases on 4,174 active attack cases across six static suites, with 0/90 attack hits on a ten-model controlled benchmark (62/90 without gating), and a median gating latency of 1.28 ms; six frontier models maintain 36/36 completion on standard development tasks, and the ten models total 74/100 (93/100 without gating). In a pre-registered external evaluation, on SWE-bench Verified there were 0/348 over-allowances beyond the modeled exception scope, and 343/343 were byte-identical to Bash.
Limitations and future work
The authors list the remaining boundaries: stateful cd chains in OpenHands trajectories cause 0/108 coverage, one pre-placed symlink metadata edge case M1, and two Bash fidelity inconsistencies F1 and F2; cd and nl together account for 89.6% of read-only escalations in real trajectories. In addition, unspecified tools and npm are outside the scope of the effect-inclusion theorem, the repository-state git calls at Codex startup occur outside the tool gate, and benign task completion drops noticeably on small models.
Why it was selectedThe paper uses differential testing to compare command approval against actual Bash execution in 8 coding agents, summarizing three classes of divergence boundaries: parsing, tool parameters and sandbox.

The paper uses differential testing to compare command approval against actual Bash execution in 8 coding agents, summarizing three classes of divergence boundaries: parsing, tool parameters and sandbox.

Paper analysis in progress

Related events and news

1 events · 0 news mentions

Read originalarxiv.org