Repository navigation
Closed
Description
Question
The #2080 fix (read an eval's arguments as a wait-loop payload in gh-write-guard.py) has now spent the edit round #2139 authorized and both edit rounds of its new push under local-strict-review "Disposing of Findings". The latest pass still found four defects in code the branch adds. How should the lane continue?
Handoff: #2137 (track auto-2080). Branch: feature/auto-2080 at c99a6484, pushed, no pull request yet. No other pull request is blocked.
What this round did
- Applied Decide How the #2080 eval Fix Continues Past Its Review Budget #2139's three designs: the redirection as an outer group, ending the payload at the eval's line where quoting is unknown, and a skip for chained evals.
- The textual suffix skip in Decide How the #2080 eval Fix Continues Past Its Review Budget #2139's design gave a false allow, so it became an index-based skip: a later eval inside the first eval's arguments is not read again at that level.
- The second pass then found three more false allows: an unknown-quoting redirection, the skip under unknown quoting, and a separator fused to a redirection such as
;>. All three are fixed, the last one in_runs_as_commandtoo. - Every fix has a self-test row that fails when the fix is reverted.
The four open findings (all introduced by the branch)
- False allow at a parenthesis. The argument scan ends at any unquoted
(or), which in an eval's words is usually$(...)or<(...). Soeval $(true) 'until false; do sleep 1; done'is allowed, and bash runs the loop. Develop allows it too. - False allow at a quoted newline. The line-end check ignores the mask, so an argument that is a quoted newline alone, as in
eval true '<newline>' '<loop>', ends the payload. Develop allows it too. - False deny where quoting is unknown. The tokenizer fuses a newline with an operator next to it (
;\n), and only a bare newline ends the payload. So a line ending in;runs the payload into the next line, andeval "$(ssh-agent -s)";followed by a boundedtimeout 60 bash -c '...'line is denied. Develop allows it. - Scan time.
_sleepsreads each eval payload with no quote mask, so every nested level re-reads later evals. A loop body of 30eval x;statements with no sleep takes about 11 seconds where develop takes none.
Findings 3 and 4 make the branch worse than develop. Findings 1 and 2 are shapes develop also allows, so the branch still denies strictly more eval loops than develop does.
Options
- Recommended: fix the two regressions, file the two false allows, then drive to develop. For finding 3, end the unknown-quoting payload at any operator token holding a newline. For finding 4, give
_sleepsthe quote-kept mask of each payload, as_unbounded_wait_loopalready does, and add a timing row for a body that does not sleep. Findings 1 and 2 go to their own issues. The reason: merging then makes nothing worse than develop, and the incomplete coverage that remains gets an issue of its own instead of another round of this one. The parked branch is kept and extended. - Fix all four with one more edit round, then drive to develop. Same as option 1, plus: end the arguments only at
;,&,|, and newline, alone or fused, never at a parenthesis. And end the payload only at an unquoted newline. Each fix is small, but every round so far has found new defects in the previous round's fixes, so this may need another decision. - Close The Guard's Wait-Loop Rule Never Reads an eval Argument #2080 as a known limit. Delete the branch and worktree and document an
evalpayload as unseen, as a wait inside a script file is. The guard keeps its develop behavior, which allows every eval'd loop. The;>fix in_runs_as_command, which also closes a pre-existing false allow forbash -c, would be lost unless it is split out.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ptr727 commentedon Oct 1, 2026
Answered by the maintainer: option 1. Fix the two regressions (end the unknown-quoting payload at any operator token holding a newline, and give
_sleepsthe quote-kept mask of each payload with a timing row for a body that does not sleep), file the parenthesis and quoted-newline false allows as their own issues, then drive to develop.End an Unknown-Quoting eval at a Fused Newline, Mask Its Sleep Scan