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
The Guard's Stdin Redirect Scan Credits a Redirect Inside a Trailing Comment #2152
_redirects_stdin in host-setup/agent-safety/claude/gh-write-guard.py credits a redirect written inside a trailing comment as the loop's input bound.
Allowed on develop, and the loop reads the pipe forever:
yes |whileread l;do sleep 30;done# < f
The #< f spelling behaves the same way. Bash reads everything after # as a comment, so nothing binds descriptor 0 and the loop drains yes. The scan skips the # token as an ordinary word, reaches < and f, and counts them. A comment on its own line (done then a newline, then # < f) is denied already, because the newline ends the scan.
The scan should end at a comment the way it ends at a separator or a reserved word. #2032 is the sibling defect, where the scan ran past a reserved word.
Found by a local strict review pass on feature/auto-2032 (#2032). The code predates that branch.
Activity
End the Guard's Stdin Redirect Scan at a Reserved Word (#2153)
End the Guard's Stdin Redirect Scan at a Trailing Comment (#2227)