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
- 89% confidence
- Finding
- The script launches an external Node package via `npx -y @infimind/ecom-content-cli@latest`, which implicitly trusts and executes whatever code is currently published under that package/version tag. Because it also passes API credentials and inherited environment variables into that child process, a compromised package, dependency, or registry response could exfiltrate secrets or perform unintended actions.
