#972 Template interpolation into tools.shell.run is raw text: upstream output executes as shell (bypasses #374 quoting)

in-progress high bug engine Created 2026-10-20 00:43 · Updated 2026-10-20 00:47

Description

Edit
EARS: When a {{var}} placeholder is resolved into a tools.shell.run command, the Highway engine shall pass the value to the shell as data (quoted), never as shell syntax. EVIDENCE (found during #961, tenant test, API): task inj echo 'a;b' && echo done (result_key semi); task use_inj args echo [{{semi}}] -> sandbox ran "echo [a;b\ndone]" and failed exit 127 because 'b' and 'done]' were executed as commands (run bf038a48). Same class with {{x.stdout}}: trailing newline ends the command line (run 8a6e5df9: 'echo [sample,data,values\n]' exit 127). CAUSE: the interpreter's VariableResolver.interpolate_value substitutes before the tool runs (task.py resolves args), so engine/tools/shell_command/streaming.py _resolve_variables_for_shell (shlex.quote, Fix #374) never sees a placeholder. Sandbox limits blast radius to the throwaway container, but any unsandboxed tenant gets worker-level injection. Golden demos rely on raw substitution inside single quotes; a fix needs a migration story for them.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...