subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
command = check.get("command", "echo ok") try: result = subprocess.run( ["ssh", target, command], capture_output=True, text=True,- Confidence
- 88% confidence
- Finding
- The SSH health check executes a remote command taken directly from configuration, allowing arbitrary command execution on the target host if the health-check definition is untrusted or attacker-modified. In a deployment automation skill, this is especially dangerous because operators may run it with privileged SSH access to production systems, turning configuration tampering into remote code execution.
