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 read Bound Ignores a Group's Input Redirection #2364
The wait-loop rule credits a read loop with a bound only when the input redirection sits on that loop's own invocation, per requirement 7. A redirection on a group that holds the loop feeds the loop just the same, and bash ends the loop at end of file, but the guard denies it.
Reproduce (constructed)
Denied on develop, and ends at once under timeout 3 bash -c with a one-line file f (exit 0):
{ whileread -r l;do sleep 1;done; } < f
The #2080 branch, which reads an eval's arguments as a payload, reads a redirection on the eval as one on a group around the payload, as decision #2139 chose. So the branch also denies eval 'while read -r l; do sleep 1; done' < f, which develop allows only because it never reads an eval.
Done looks like
Where a group's input redirection reaches a read loop inside it, the loop is credited with the same bound as one carrying that redirection itself, both commands above are allowed, and self-test rows pin them.
Found by the local strict review of the #2080 branch.
The eval reading (#2080) meets this too. A redirection on an eval applies to the whole payload, so the guard reads the payload as a group with the redirection after it. A read loop given its input that way is denied:
eval'while read -r l; do sleep 1; done'< f
The plain while read -r l; do sleep 1; done < f is allowed. This is a false deny, in the safe direction, and fixing this issue's group case fixes it too.
Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The guard backstops an agent's own mistakes, and this is a command shape built to defeat it rather than one an agent session writes, so a miss does not realistically occur. See #2517 for the per-issue reason.
Activity
ptr727 commentedon Oct 6, 2026
The
evalreading (#2080) meets this too. A redirection on anevalapplies to the whole payload, so the guard reads the payload as a group with the redirection after it. A read loop given its input that way is denied:The plain
while read -r l; do sleep 1; done < fis allowed. This is a false deny, in the safe direction, and fixing this issue's group case fixes it too.Read an eval's Arguments as a Wait-Loop Payload in the Guard (#2452)
ptr727 commentedon Oct 8, 2026
Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The guard backstops an agent's own mistakes, and this is a command shape built to defeat it rather than one an agent session writes, so a miss does not realistically occur. See #2517 for the per-issue reason.