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 Multi-Line Quote Strips the Commands After It #2111
_heredoc_openers in gh-write-guard.py reads each line of a command on its own. A << sitting inside a double-quoted string that an earlier line opened is therefore read as a heredoc opener. No later line closes its tag, so everything to the end of the command is stripped as body, and a wait loop on those lines is never judged by rule 7.
Reproduce (constructed)
Allowed on develop at 4c9087d and on feature/auto-2059, although the loop has no bound:
The command above is denied, and a self-test row pins it. The opener scan carries quote state across lines, as _context_lex already does for a whole command, rather than lexing a line that sits inside an open quote as if it stood alone. #2062 is the same shape for an arithmetic context an earlier line opened, and one fix may close both.
Found by the local strict review of the #2059 fix.
Closed: Folded into #1959 per #2517, approved by the maintainer. This is a case of the guard's lexer splitting a command differently from bash, and #1959's single bash-aware scanner fixes the class, with this shape kept as a self-test row there.
Activity
Read a Heredoc on a Line Holding (( Every Way a Shell Might in the Wa…
ptr727 commentedon Oct 8, 2026
Closed: Folded into #1959 per #2517, approved by the maintainer. This is a case of the guard's lexer splitting a command differently from bash, and #1959's single bash-aware scanner fixes the class, with this shape kept as a self-test row there.