&& as a structure, not a shell text: a list of commands with their arguments and where each stream goesOpen and answer this issue on GitHub.
note, safety · opened 2026-11-19 · updated 2026-11-19 · 0 comments
Follows from “Decision: which shell process::shell runs on Windows” (#1937), owner, 2026-11-19, ADR-raw-sinks-1 D9 item 3.
What a program wants a shell for (a pipe a | b, a redirection > file, && / ||, a glob) is given later as a structure: a list of commands, each a program with its arguments, and where each stream goes. A value from outside is always one argument, so nothing is escaped and nothing has to be proved. It runs without a shell, the same on every platform. A sketch of the shape, not decided:
use std::process
let out = process::pipe([process::cmd("convert", [name, "-resize", "64x64", "-"]),
process::cmd("gzip", [])];
stdout: process::to_file("thumb.png.gz"))
A library that does hand a text to sh or cmd.exe is the shell library ADR-raw-sinks-1 keeps the untrusted-shell key for (D4, D5): its escaping is its own, and the application allows it.
readystd or an official package (ADR-289 D2: is a pipeline an operating-system resource or a library on top of process::run?).&& / || and of a glob, written as an ADR.- is not solved by this: “Decision: an outside argument that starts with - is read as an option” (#1939).Status note until a program needs it; then it becomes a decision with a decision paper.