subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# DNS resolution test try: start = time.time() result = subprocess.run( ["getent", "hosts", "google.com"], capture_output=True, text=True, timeout=5 )- Confidence
- 90% confidence
- Finding
- Although the subprocess itself is not command injection, it performs an external lookup to `google.com`, causing network egress and disclosing that diagnostics were run from this host. In restricted or sensitive environments, unsolicited outbound connectivity can violate expectations, leak metadata, or trigger monitoring.
