subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if system == 'Windows': os.startfile(url) elif system == 'Darwin': subprocess.Popen(['open', url]) else: subprocess.Popen(['xdg-open', url]) except Exception as e:- Confidence
- 96% confidence
- Finding
- The code launches a URL returned by a remote API via the platform URL opener on macOS. Although it does not invoke a shell directly, it still hands attacker-controlled data to a trusted OS handler, which can open dangerous URI schemes such as file://, custom app protocols, or other handler-triggering links. In an agent skill context, automatically opening remote-supplied URLs increases the risk because the action happens without an explicit user confirmation step.
