T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:14- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent ecommerce content purpose, but it downloads and runs a mutable npm package with broad environment access, so users should review it before installing.
Install only if you are comfortable running the IMIVA npm MCP client locally. Prefer a pinned reviewed package version, run it in a restricted environment with only MCP_TOKEN and API_URL exposed, and avoid launching it from shells that contain unrelated cloud, CI, or production credentials. Confirm costs before creating image or video tasks.
scripts/imiva_mcp.py:14Unpinned npm Package Is Automatically Downloaded and Executed
Using os.environ.copy() forwards the entire parent environment into a child process that runs remotely sourced npm code. If that process or any dependency is malicious or compromised, it can read and exfiltrate unrelated secrets from the environment beyond MCP_TOKEN, such as cloud credentials, CI tokens, or proxy settings.
def invoke(method: str, params: dict | None = None) -> 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(
The skill documents shell commands, environment variable handling, and file-path based inputs, but it does not declare any explicit tool restrictions such as allowed-tools or permissions. That creates a mismatch where an agent may infer broad capability to read local files, access environment secrets, or invoke shell-backed helpers without a clearly bounded scope, increasing the chance of unintended data exposure or overbroad execution.
The top-level description says to use the skill for broad ecommerce content and workflow needs without clear triggering boundaries. In agentic routing systems, this can cause the skill to activate for loosely related requests and then steer the agent toward external tool use, file handling, or token-dependent workflows that the user may not have explicitly requested.
The search coverage section enumerates many brands, marketplaces, models, and commercial-intent keywords far beyond the core Amazon content workflow. This broad keyword net can bias retrieval or auto-invocation toward this skill for unrelated user queries, potentially leading to inappropriate tool suggestions, unnecessary exposure to local/remote asset handling, or accidental use in contexts outside the intended trust boundary.
The display name, description, and default prompt are written to operate in Chinese and do not indicate that users may choose another language. This is a natural-language policy concern because it imposes a specific language without documented opt-in or alternative locale handling.
The skill enables implicit invocation without any trigger constraints, exclusions, or clear scoping. In a broad ecommerce assistant, this can cause the agent to auto-select the skill in unrelated contexts and initiate content-generation or downstream tool workflows based on ambiguous user input, increasing the chance of unintended actions, data exposure, or prompt-routing abuse.
The script launches npx -y @infimind/ecom-content-cli@latest, which fetches and executes the latest remote npm package at runtime. This creates a supply-chain execution risk: a compromised publisher account, malicious dependency, or unexpected package update would result in arbitrary code execution on the host with access to the provided environment and local system resources.
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,
The tool silently executes a remote npm package without clearly warning the operator that code will be downloaded and run. In a skill intended for enterprise ecommerce workflows, this reduces informed consent and increases the chance that users execute unreviewed third-party code in sensitive environments containing tokens, product assets, or internal data.
The script's user-facing error messages and command descriptions are written in Chinese, with no option to select another language and no indication that the tool is intentionally region- or locale-specific. This can violate language/locale policy when a skill imposes a language without user opt-in.