You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A Heredoc Opener Inside a Script Fed to a Shell Strips Past the Script's End #2125
gh-write-guard.py keeps a heredoc body fed to a shell, since it is the script that shell runs. Where that body is the last one its line opens, it is read line by line as ordinary commands of the outer text rather than kept whole, so a heredoc opener inside the script strips past the script's own delimiter and swallows the real commands after it. The wait-loop rule then never judges them.
Reproduce (constructed)
Allowed on develop and on the #2112 branch, and piping the same text with echo ran in place of the loop into bash prints ran:
bash <<Bcat <<XBwhile [ !-f /x ];do sleep 1;done
X
The same holds with a data heredoc before it on the line, as in cat <<A >/dev/null; bash <<B. The #2112 fix keeps a fed body whole only where a data body follows it on the same line.
Done looks like
The command above is denied, and a self-test row pins it, without denying a script fed to a shell that writes a document through a heredoc of its own.
Found by the local strict review of the #2112 fix (handoff #2123). It is older than that fix.
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.
Activity
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.