subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_cmd(label: str, cmd: str, execute: bool): print(f"{label}: {cmd}") if execute: subprocess.run(cmd, shell=True, check=True) def command_control(args, token, api_base_url, zip_code):- Confidence
- 99% confidence
- Finding
- The control subcommand executes a user-supplied string via subprocess.run(..., shell=True), which allows arbitrary shell command execution. In an agent skill context, this is especially dangerous because upstream prompts, tool arguments, or automations may be influenced by untrusted input, turning a price-threshold helper into a general command-execution primitive.
