Repository navigation
Closed
Description
Question
The #2080 fix (read an eval's arguments as a wait-loop payload in gh-write-guard.py) used up its two edit rounds under local-strict-review "Disposing of Findings", and the third pass still found three defects in code the branch adds. How should the lane continue?
Handoff: #2137 (track auto-2080). Branch: feature/auto-2080 at 1dd74971, pushed, no pull request yet. No pull request is blocked beyond the one this lane has not opened.
The three open findings (all introduced by the branch)
- False allow from an eval redirection.
_eval_payloadappends the eval's redirections after the payload text, which binds them to the payload's last command. Bash applies them to the eval as a whole, under any redirection or pipe inside the payload. Soeval 'yes | while read -r l; do sleep 1; done' < fis allowed, and bash loops until the timeout. The same cause denieseval 'while read -r l; do sleep 1; done; echo end' < f, which develop allowed. - Near-quartic scan time. Each
evalin command position recurses on the rest of its run, which holds every latereval, up to the depth cap. A command of 60 chained evals followed byecho sleeptakes about 86 seconds to classify, where develop takes none. - False deny of the prescribed bound where the quote mask is unknown. Reading the payload to the end of the command unquotes every later word, so
eval "$(ssh-agent -s)"; timeout 60 bash -c '<a loop>'is denied when a later apostrophe leaves the quoting unparseable. The deny message then asks for the form already used.
Three earlier findings were fixed in rounds one and two, and four pre-existing ones were filed as #2138 and a comment on #2058.
Options
- Recommended: authorize one more edit round with these designs, then drive to develop. Model an eval redirection as an outer group (
{ <payload>newline} <redirs>) rather than appending it. Stop reading a nestedevalwhose payload is a suffix of one already being read, which removes the repeated rescans. Where the mask is unknown, end the payload at the end of the eval's own line rather than the whole command. Each of these is small and has a self-test row to write. This keeps the fix whole and the reason is that every finding has a concrete, local design, so the risk of another non-converging round is lower than the rounds so far suggest. The parked branch is kept and extended. - Narrow the fix and drive it. Keep only the core reading: eval's arguments up to its own separator with the quote mask known, one leading
--dropped, and no read at all where the mask is unknown. Drop the redirection handling, so an eval'd read loop bounded by an outer< fis denied, which is the safe direction. Add a single recursion guard for the scan time. The parked branch is trimmed rather than extended, and a smaller surface draws fewer findings. - Close The Guard's Wait-Loop Rule Never Reads an eval Argument #2080 as a known limit. Document an
evalpayload as unseen, the same as a wait inside a script file, and abandon the branch. The guard keeps its develop behavior, which allows every eval'd loop.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ptr727 commentedon Sep 30, 2026
Answered by the maintainer on 2026-09-30: option 1: one more edit round with the three stated designs (the redirection as an outer group, the suffix-payload guard, and ending the payload at the eval's own line when the quote mask is unknown), then drive to develop.
Read an eval Redirection as a Group, Stop Rereading Chained Payloads