subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
kw: dict[str, Any] = dict(capture_output=True, text=True, timeout=15) if hasattr(subprocess, "CREATE_NO_WINDOW"): kw["creationflags"] = subprocess.CREATE_NO_WINDOW r = subprocess.run(["powershell", "-NoProfile", "-NoLogo", "-Command", ps], **kw) if r.returncode != 0: return None t = (r.stdout or "").strip().strip('"')- Confidence
- 78% confidence
- Finding
- r = subprocess.run(["powershell", "-NoProfile", "-NoLogo", "-Command", ps], **kw)
