T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:14- Finding
Automatic Execution of an Unpinned Mutable npm Dependency
- 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, ) ``` `references/mcp-config.example.json:3-11`: ```json "imiva-ecommerce": { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ], "env": { "MCP_TOKEN": "your-token-here", "API_URL": "https://imiva.ecpro.com" } } ``` `SKILL.md:83-94`: ```json { "mcpServers": { "imiva-ecommerce": { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ], "env": { "MCP_TOKEN": "your-token-here", "API_URL": "https://imiva.ecpro.com" } } } } ``` ### Technical Analysis The project executes `@infimind/ecom-content-cli@latest` through `npx -y`. The `latest` npm distribution tag is mutable and does not identify an immutable, audited package release. The `-y` option suppresses the normal installation confirmation, causing the package currently referenced by that tag to be downloaded and executed automatically. Consequently, the code that runs on a user's system can change after this Skill has been reviewed. This creates a supply-chai ...[truncated 2197 chars]- Remediation
View remediation
