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
Check Placeholders Inside a String Handed to a Second Shell in Paste-Safe #4375
The paste-safe rule in prose_lint.py reads a copy-and-run command the way the outer shell does. A placeholder sitting inside a single-quoted string that is passed to a second shell gets no check, even though that second shell reads a bare <name> as a redirection.
Here is a constructed case that the rule passes without a finding:
su -l root -c 'usermod -aG sudo <account>'
The outer shell treats <account> as literal text inside the single quotes. su then gives the string to a shell, and that shell tries to open a file named account for input. The same goes for sh -c '...', bash -c '...', ssh host '...', and sudo sh -c '...'.
GOVERNANCE.md "Copy-and-Run Commands" already requires quoting inside a string handed to a second shell. The rule just does not check it. The one instance in the tree, host-setup/README.md:32, was fixed by hand in #4374.
Done when
paste-safe reports an unquoted placeholder inside the string argument of a known second-shell command (su -c, sh -c, bash -c, ssh), and the test suite includes this constructed case.
Predicted files: .github/actions/prose-gate/prose_lint.py, tests/test_prose_lint.py, .github/actions/prose-gate/prose-gate.json, host-setup/agent-safety/README.md (granted 2026-11-23 on the maintainer's approval; the pull request merges only on his go-ahead), GOVERNANCE.md (the "Copy-and-Run Commands" sentence, granted 2026-11-24 after #4378 merged) and its build_dist-generated include regions.
Maintainer's answer, 2026-11-23 (recorded during backlog burndown round 5): approved. Where the stricter check flags the whole-command placeholder in host-setup/agent-safety/README.md, rewrite that span as a concrete constructed loop or as prose rather than a copy-and-run command, and add no exemption to the gate. Because that file is under host-setup/agent-safety/, the pull request merges only on the maintainer's own go-ahead after he reads the diff.
Activity
ptr727 commentedon Nov 23, 2026
Backlog burndown claim (round 5, 2026-11-23): branch
burndown/paste-safe-second-shell.Predicted files: .github/actions/prose-gate/prose_lint.py, tests/test_prose_lint.py, .github/actions/prose-gate/prose-gate.json, host-setup/agent-safety/README.md (granted 2026-11-23 on the maintainer's approval; the pull request merges only on his go-ahead), GOVERNANCE.md (the "Copy-and-Run Commands" sentence, granted 2026-11-24 after #4378 merged) and its build_dist-generated include regions.
Group issues: #4375. Resumed 2026-11-24.
ptr727 commentedon Nov 23, 2026
Maintainer's answer, 2026-11-23 (recorded during backlog burndown round 5): approved. Where the stricter check flags the whole-command placeholder in
host-setup/agent-safety/README.md, rewrite that span as a concrete constructed loop or as prose rather than a copy-and-run command, and add no exemption to the gate. Because that file is underhost-setup/agent-safety/, the pull request merges only on the maintainer's own go-ahead after he reads the diff.Check Placeholders Inside a String Handed to a Second Shell in Paste-…