subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run(cmd: str, timeout: int = 30) -> str: """Run a shell command and return stdout.""" r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout) return r.stdout.strip()- Confidence
- 98% confidence
- Finding
- r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
