subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
''' def run(cmd, capture=True, check=True): result = subprocess.run(cmd, shell=True, capture_output=capture, text=True) if check and result.returncode != 0: return None, result.stderr return result.stdout.strip() if capture else None, None- Confidence
- 94% confidence
- Finding
- result = subprocess.run(cmd, shell=True, capture_output=capture, text=True)
