T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:14- Finding
Unpinned Remote npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
dict: npx, token = require_runtime() 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, stderr=subprocess.PIPE, text=True, bufsize=1, env=env, ) ``` From `references/mcp-config.example.json`: ```json "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ] ``` The same invocation pattern is documented in `SKILL.md`: ```json "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ] ``` ### Technical Analysis The helper invokes `npx` with the mutable package selector `@latest`. The `-y` option automatically accepts installation and execution without an interactive review step. Consequently, the code that runs is not fixed to the version that was present when this Skill was audited. A newly published package release can therefore alter the effective executable payload without requiring any modification to this repository. If the package maintainer account, npm publishing token, registry resolution process, or upstream dependency chain is compromised, malicious code could be delivered the next time the helper is invoked. This issue is especially significant because the downloaded package executes with the permissions of the user running the Skill and receives the configured MCP token and inher ...[truncated 1488 chars]- Remediation
View remediation
