subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
system = platform.system() if system == "Windows": subprocess.Popen(["start", "brave", url], shell=True) elif system == "Darwin": subprocess.Popen(["open", "-a", "Brave Browser", url]) else:- Confidence
- 95% confidence
- Finding
- The Windows branch launches a subprocess with shell=True, which is inherently riskier because command resolution is delegated to the shell. Although the URL is hardcoded and there is no direct user input here, using shell invocation expands the attack surface and can enable unexpected command execution behavior if arguments or environment assumptions change.
