subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if platform.system() == 'Windows': os.startfile(url) elif platform.system() == 'Darwin': # macOS subprocess.Popen(['open', url]) else: # Linux subprocess.Popen(['xdg-open', url])- Confidence
- 91% confidence
- Finding
- The script launches a URL returned from externally sourced model output using the local OS handler (`open`). Even though it avoids shell injection by passing arguments as a list, it still performs a dangerous action on untrusted data: arbitrary links can trigger browser launches, custom URI handlers, or other local applications without user confirmation.
