T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:15- Finding
Unpinned npm Package Is Downloaded and Executed Automatically
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to support the promised ecommerce content workflow, but it runs mutable remote code and exposes more local environment data than necessary.
Review this skill before installing. Use it only if you trust the IMIVA npm package and service, prefer a pinned package version, avoid running it from an environment containing unrelated secrets, and confirm credits/budget before creating paid generation tasks. Treat saved MCP tokens like credentials and revoke them if no longer needed.
scripts/imiva_mcp.py:15Unpinned npm Package Is Downloaded and Executed Automatically
The skill is presented as a narrowly scoped ecommerce content generator, but its instructions include generic IMIVA tool discovery and invocation patterns that could be used with any tool exposed by the token. This creates a trust boundary problem: a user may authorize the skill for image/video generation while the agent is effectively enabled to enumerate and potentially use unrelated backend capabilities.
Using os.environ.copy() passes the full parent environment into a child process that is executing remotely sourced npm code. This unnecessarily exposes all ambient secrets and configuration present in the caller's environment, not just MCP_TOKEN, amplifying the blast radius if the package is malicious or compromised.
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 exposes operational capabilities involving environment variables, file reads, and shell commands but does not declare any explicit tool scope or allowed-tools boundary. In a skill that instructs users to run local commands and handle tokens, this lack of scoping increases the chance that an agent could access broader local resources or invoke unintended capabilities without clear user expectations.
The description says the skill is especially suitable for '中文用户', which imposes a language/locale expectation in the natural-language documentation. The file does not present this as an optional preference or offer an alternative language choice, so it appears to enforce a locale-specific policy without user opt-in.
The manifest enables implicit invocation for a commerce-content skill without any visible trigger constraints, scoping rules, or confirmation requirements. That can cause the skill to activate on broad product/media-related requests and steer user interactions, tool usage, or content-generation workflows without sufficiently explicit user intent, increasing the risk of unintended actions or data exposure in a business context.
The script's natural-language error messages are presented only in Chinese, and there is no indication that the tool is region-specific or that users can opt into another language. This can violate language/locale policy because it imposes a specific language without user choice.
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: if the package is compromised, unpublished/replaced, or its latest version becomes malicious, arbitrary code runs locally with access to the provided environment and the user's privileges.
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 script silently executes a remote npm package via npx without explicit user-facing warning in the tool itself. Even if intended, undisclosed remote code execution materially increases risk because users may not realize the script downloads and runs third-party code that can access tokens and process data.
The display name, description, and default prompt all prescribe Chinese-language interaction, but the file does not state that this is optional, user-selected, or limited to a justified region-specific deployment. This can violate language/locale policy when users are not given a choice or informed of the constraint.
The command-line description and help text are only in Chinese, with no locale option or explanation that the skill is intended exclusively for Chinese-speaking users. This is a natural-language locale constraint applied by default rather than by user choice.