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
- 86% confidence
- Finding
- The script launches `npx -y @infimind/ecom-content-cli@latest`, which fetches and executes the latest package version at runtime. This creates a supply-chain risk: a compromised upstream package, dependency, or registry response would be executed with the current user's privileges and with `MCP_TOKEN` present in the child process environment. In this skill context, the tool is explicitly intended to handle enterprise ecommerce workflows, so compromise could expose credentials or manipulate content operations at scale.
