subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_cmd(cmd: List[str], input_data: Optional[bytes] = None, timeout: float = 10.0) -> tuple[int, str, str]: """Run a command and return (returncode, stdout, stderr).""" try: result = subprocess.run( cmd, input=input_data, capture_output=True,- Confidence
- 70% confidence
- Finding
- subprocess module calls execute external commands. Without careful input validation, this enables command injection.
