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 Command Substitution Inside Double Quotes Hides a Loop When a Line's Quoting Does Not Parse #1843
When a line's quoting does not parse, the guard's token fallback cannot follow a double quote that opens inside a command substitution in another double quote. So a loop that bash runs after that point is not seen. This predates the #1635 work: the develop base allows it too.
Both develop and the feature/auto-1635 branch allow this. It is an unbounded wait loop, so requirement 7 should deny it.
Cause
A nested "$( ... "'" ... )" pairs its quotes differently from how shlex pairs them. The apostrophe in the comment makes the whole-command parse fail. The per-line fallback then either splits on whitespace or bails out of comment stripping when it sees $(. In both cases the loop keywords stay fused to their operators.
Done looks like
The command above is denied. A self-test case for it fails when the fix is reverted.
Found by the local strict review on the #1635 fix (handoff #1835).
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
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.