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
Read Commands an Outer Variable Adds to a Double-Quoted Wrapper Body in the Write Guard #3337
Found while working #3075, which reads a run-time word in a double-quoted wrapper body as one word splitting may split. Develop's guard shares it, and it was confirmed by reading _embedded_wrapper_commands and with a classify probe on a constructed command.
A Double-Quoted Wrapper Body Can Carry Whole Commands an Outer Variable Supplies
The outer shell expands a $ word inside a double-quoted -c body before the inner shell parses it. A value holding a separator therefore adds commands the guard never sees:
B="x; git push origin develop"; sh -c "echo $B" is allowed. The inner shell runs echo x; git push origin develop.
#3075 closes the narrower case where the expansion only adds words to a merge or a commit. This one adds whole commands, so it reaches every rule that reads wrapper bodies.
Decision Needed
Failing closed on every double-quoted wrapper body holding an outer-expanded $ word would also deny ordinary commands such as bash -c "cd $DIR && git status". The options are:
Recommended: fail closed only where the body runs git or gh. A body that names neither cannot reach a git or gh rule, and a body that does is where an injected command matters.
Fail closed on every such body, accepting the false denies.
Leave it, since an agent writing such a command by mistake is unlikely, and record it as an accepted gap in the README.
Decision (maintainer, 2026-10-22): fail closed only where the double-quoted wrapper body runs git or gh. A body that runs neither keeps its current verdict, so an ordinary body such as bash -c "cd $DIR && ls" is not denied for its outer expansion alone.
The decision label is removed. This issue stays open as guard work under that ruling, and it queues with the remaining allow-gap lanes on the engineering handoff track.
Activity
Read Every Launcher and Exported Git Directory in the Write Guard (#3342
Read Tokenizer, Directory-Value, and Launched-String Gaps in the Writ…
ptr727 commentedon Oct 22, 2026
Decision (maintainer, 2026-10-22): fail closed only where the double-quoted wrapper body runs
gitorgh. A body that runs neither keeps its current verdict, so an ordinary body such asbash -c "cd $DIR && ls"is not denied for its outer expansion alone.The
decisionlabel is removed. This issue stays open as guard work under that ruling, and it queues with the remaining allow-gap lanes on theengineeringhandoff track.Close Export, Xargs, Env, and Launcher Allow Gaps in the Write Guard (#…