subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_command(command: str) -> int: proc = subprocess.run(shlex.split(command), text=True) return proc.returncode- Confidence
- 98% confidence
- Finding
- The download path constructs command strings and later executes them via subprocess.run(shlex.split(command)). Although shell metacharacter injection is reduced by avoiding shell=True, the code still executes externally sourced commands derived from result data or user-controlled source/id inputs. In this skill context, that is dangerous because the tool is supposed to help obtain datasets, but it can trigger arbitrary local CLI actions and network downloads on the host.
