subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"""Restart a service that has crashed.""" start = time.time() try: subprocess.run(["pkill", "-f", service_name], capture_output=True, timeout=5) time.sleep(1) except Exception:- Confidence
- 95% confidence
- Finding
- subprocess.run(["pkill", "-f", service_name], capture_output=True, timeout=5)
