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 eval Reading Ends Its Payload at a Quoted Newline #2363
The guard's eval reading (#2080) ends an eval's payload at a newline token without consulting the quote mask. An argument that is a quoted newline alone is one of the arguments, and bash joins it into the payload, so the loop in a later argument is never read.
Reproduce (constructed)
Allowed by the guard, and loops under timeout 3 bash -c until the timeout kills it. The second argument is a single-quoted newline:
evaltrue'''until false; do sleep 1; done'
Done looks like
Where the quote mask is known, an eval's payload ends only at an unquoted newline. The command above is denied, and a self-test row pins it.
Found by the third local strict review of the #2080 branch and split out per decision #2208. Develop allows this command too, since it reads no eval argument at all.
The same gap has a second form where the quote mask is unknown, which this issue's known-mask scope does not cover. A word such as x"a b" earlier in the payload leaves the mask unknown. A quoted ";<newline>" or "&&<newline>" then reads as the operator token that ends the eval's line, so the payload stops at until false. A bare quoted newline does the same. Constructed, allowed by the feature/auto-2080 branch at 549b8e3, and looping under timeout 3 bash -c until the timeout kills it:
bash -c 'echo x"a b"; eval until false ";" do sleep 1 ";" done'
Develop allows this too, since it reads no eval argument at all. Where the quoting is unknown, nothing tells a quoted operator token from a real one, so a fix here probably needs that distinction before it can be anything other than a guess. Found by the local strict review of the #2080 branch.
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 4, 2026
The same gap has a second form where the quote mask is unknown, which this issue's known-mask scope does not cover. A word such as
x"a b"earlier in the payload leaves the mask unknown. A quoted";<newline>"or"&&<newline>"then reads as the operator token that ends the eval's line, so the payload stops atuntil false. A bare quoted newline does the same. Constructed, allowed by thefeature/auto-2080branch at 549b8e3, and looping undertimeout 3 bash -cuntil the timeout kills it:Develop allows this too, since it reads no eval argument at all. Where the quoting is unknown, nothing tells a quoted operator token from a real one, so a fix here probably needs that distinction before it can be anything other than a guess. Found by the local strict review of the #2080 branch.
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.