subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
prompt_file.write_text(prompt, encoding="utf-8") command = build_command(request, request_json, response_json, prompt_file) proc = subprocess.run( command, capture_output=True, text=True,- Confidence
- 96% confidence
- Finding
- The code executes an external program via subprocess using a command derived from environment-controlled configuration. Although shell=True is not used, this still creates a code-execution bridge whose behavior can be redirected to arbitrary binaries or scripts if the environment is attacker-influenced. In a helper skill, this materially expands the trust boundary and can lead to arbitrary local command execution.
