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
Decide Whether a Shell String That Is Only an xargs Replace String Fails Closed in the Write Guard #3385
Found by the local review of the change closing #3336 and #3337, which fails closed on a shell string that xargs fills where that string runs git or gh. Develop's guard shares the case below, and it was read from _xargs_filled_body and confirmed with a classify probe on a constructed command.
A Shell String That Is Only the Replace String Keeps Its Verdict
echo 'git reset --hard' | xargs -I{} sh -c '{}', run in a primary checkout, is allowed. xargs supplies the whole script, so the string runs whatever the input holds, yet the string itself runs neither git nor gh. Before a push, the config-change scan already fails closed on this shape. Outside a push, nothing reads it.
Decision Needed
Fail closed where a string xargs fills holds nothing but the replace string, in a command naming git or gh. That denies a command whose script comes wholly from xargs's input, such as the case above. xargs -I{} sh -c 'echo {}' keeps its verdict.
Keep it allowed, as a script the guard does not read. It then stays in the same class as bash script.sh and printf ... | xargs -0 sh -c, and the README records the gap.
Decided by the maintainer: keep a shell string that is only the xargs replace string allowed. It is a script the guard does not read, in the same class as bash script.sh. The guard code does not change. What remains here is the documentation: the guard README records the gap. The decision label comes off, and this issue stays open as that documentation work.
Activity
Close Export, Xargs, Env, and Launcher Allow Gaps in the Write Guard (#…
ptr727 commentedon Oct 23, 2026
Decided by the maintainer: keep a shell string that is only the xargs replace string allowed. It is a script the guard does not read, in the same class as
bash script.sh. The guard code does not change. What remains here is the documentation: the guard README records the gap. Thedecisionlabel comes off, and this issue stays open as that documentation work.State the Write Guard's Threat Model and Document Two Allowed Shapes (#…
Rewrite the Write Guard as a Small Lexer With Plain-Shape Rules (#3407)