subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
env = os.environ.copy() env["MCP_TOKEN"] = token env["API_URL"] = os.environ.get("IMIVA_API_URL", os.environ.get("API_URL", DEFAULT_API_URL)) proc = subprocess.Popen( [npx, "-y", PACKAGE], stdin=subprocess.PIPE, stdout=subprocess.PIPE,- Confidence
- 92% confidence
- Finding
- The script launches `npx -y @infimind/ecom-content-cli@latest`, which installs and executes the latest remote package at runtime. This creates a supply-chain risk: a compromised package, malicious dependency, or unexpected upstream update would execute arbitrary code with access to the inherited environment, including `MCP_TOKEN`. In this skill context, the danger is elevated because the tool is explicitly intended to handle enterprise ecommerce workflows and authenticated MCP access.
