subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if model: cmd.extend(["--model", model]) process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,- Confidence
- 87% confidence
- Finding
- The script executes an `opencode` binary discovered from the local environment, including PATH, and passes through a user-controlled `--model` argument. While `shell=False` prevents classic shell injection, this still creates an execution-trust vulnerability: a malicious or trojaned `opencode` earlier in PATH, or an unsafe model/backend value consumed by that binary, could lead to arbitrary code execution or unintended external actions under the user's privileges. In this skill context, the script is specifically designed to create files and repeatedly launch the external tool in parallel, which increases the blast radius if executable resolution is subverted.
