T03 · Remote Payload Retrieval and Execution
- Location
scripts/imiva_mcp.py:13- Finding
Unpinned Remote 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 has a coherent ecommerce-content purpose, but it automatically runs a mutable npm package with a user token and broad environment access, so it needs review before installation.
Install only if you are comfortable letting this skill run an external npm MCP client, send ecommerce assets and task parameters to IMIVA, and use an IMIVA token that may create billable tasks. Prefer a restricted environment, a narrowly scoped token, a fixed trusted API endpoint, and a pinned or pre-reviewed package version before production use.
scripts/imiva_mcp.py:13Unpinned Remote npm Package Is Downloaded and Executed Automatically
scripts/imiva_mcp.py:49Environment-Controlled API Endpoint Can Redirect Token-Bearing Requests
The skill is presented as a focused 1688 ecommerce content workflow, but its documented behavior includes generic tool listing and arbitrary MCP tool invocation by name. That broader control surface can let the skill reach capabilities beyond the stated purpose if additional MCP tools are exposed under the same token, increasing the chance of unauthorized actions, data access, or misuse through prompt-driven tool selection.
Using os.environ.copy() forwards the entire parent environment to the child npm process, potentially exposing unrelated secrets such as cloud credentials, CI tokens, proxy settings, or internal endpoints. Since the child process executes third-party package code fetched via npx, any compromise of that package could harvest far more than the intended MCP_TOKEN.
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 execution, environment-variable access, and local file path handling, but does not declare any explicit tool scope or allowed-tools boundary. That creates an avoidable trust gap: a host or reviewer cannot easily enforce least privilege, and the included examples encourage access to secrets (MCP_TOKEN), local files, and command execution without a formal permission contract.
The manifest sets language: zh-CN, and the surrounding skill description is explicitly targeted to Chinese users and Chinese-language usage. Under the policy rule, forcing a specific language or locale without user opt-in is a natural-language policy violation unless clearly justified as region-specific compliance, which is not stated here.
The phrase 特别适合...的中文用户 narrows usage to Chinese users as a locale/language constraint, but the document does not present this as an optional preference or a justified regional restriction. This matches the language/locale policy violation category for natural-language constraints.
The display name, short description, and default prompt are all written in Chinese and instruct use of the skill in that language, with no indication that users may choose another language. This can violate language/locale policy when a skill imposes a specific language without explicit user opt-in or documented regional justification.
The skill enables implicit invocation with no visible trigger constraints, exclusions, or user-consent guardrails. In a commerce workflow skill that can generate and potentially act on content-production tasks, this increases the chance the assistant auto-invokes the skill in unrelated contexts, causing unintended data sharing, unexpected task creation, or user confusion about which system is acting.
The code passes the MCP token to the spawned process and then sends tool arguments over stdio to software that likely communicates with a remote API endpoint. Without explicit disclosure, users may unknowingly expose secrets or business data off-host, which is especially relevant here because the skill handles ecommerce media/content inputs that may include proprietary assets.
The script spawns an external process that executes an npm package via npx, which expands the trust boundary from local Python code to remotely sourced Node.js code. Because this package is versioned as @latest and receives sensitive environment variables, compromise of the package or its supply chain could lead to token theft or unintended network/data access.
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,
Running npx -y on a package causes third-party code to be fetched and executed without any interactive confirmation or in-tool warning to the operator. In a skill context that may be triggered by automation, this increases the risk of silent remote code execution if the package is malicious, typo-squatted, or compromised upstream.
The script's error messages and command descriptions are written in Chinese only, such as the SystemExit messages and argparse help text. This imposes a specific language/locale on all users without opt-in or documented justification, matching the language-policy concern described in this rule.
The argparse description and subcommand help strings are presented only in Chinese. Because the file does not provide a language choice or justify a Chinese-only locale constraint, this is a natural-language policy issue under the stated rule.