subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for dep, val in outputs.items(): cmd = cmd.replace(f"{{{{{dep}}}}}", (val or "").strip()) print(f"▶ 运行 {k}: {cmd}") r = subprocess.run(cmd, shell=True, capture_output=True, text=True) stdout = r.stdout if n.get("capture") == "stdout": outputs[k] = stdout- Confidence
- 98% confidence
- Finding
- The orchestrator executes chain-defined commands with subprocess.run(..., shell=True), which allows arbitrary shell syntax and metacharacters to be interpreted. In this skill, commands are not only taken from the workflow definition but are also modified by injecting upstream node stdout into later commands, so attacker-controlled data can become executable shell content.
