subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if system == "Darwin": # macOS subprocess.run(["open", str(abs_path)], check=True) elif system == "Windows": subprocess.run(["start", "", str(abs_path)], shell=True, check=True) else: # Linux subprocess.run(["xdg-open", str(abs_path)], check=True) print(f"\n✓ HTML 报告已自动打开: {abs_path}", file=sys.stderr)- Confidence
- 91% confidence
- Finding
- subprocess.run(["start", "", str(abs_path)], shell=True, check=True)
