subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = subprocess.SW_HIDE subprocess.Popen( ["cmd", "/c", "start", "OpenCode Server", "opencode", "serve", "--port", str(port), "--hostname", host], startupinfo=startupinfo,- Confidence
- 89% confidence
- Finding
- The wrapper can spawn a local process to start the OpenCode server automatically via subprocess.Popen. Although the arguments are passed as a list rather than shell-interpolated, this still expands the skill's authority from a pure HTTP client into local code execution and relies on resolving an executable from PATH, which can be abused in compromised environments or violate least-privilege expectations.
