T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:13- Finding
Automatic Execution of an Unpinned npm Dependency
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to be a real IMIVA ecommerce image workflow, but it runs an unpinned remote npm package with broad environment access and a generic MCP call wrapper.
Review before installing. Use a dedicated low-privilege IMIVA token, avoid running it in shells or CI jobs that contain unrelated secrets, and prefer a pinned reviewed version of the npm MCP package with a minimal environment allowlist. Treat generated tasks as potentially billable and confirm model, quantity, and credit limits before submitting.
scripts/imiva_mcp.py:13Automatic Execution of an Unpinned npm Dependency
scripts/imiva_mcp.py:49Third-Party MCP Process Inherits the Complete Parent Environment
The skill is described as a dedicated '爆款主图复刻与改造' workflow centered on create_visual_migration_task, but its documented behavior includes listing all MCP tools and invoking arbitrary tool names through a generic wrapper. That mismatch is dangerous because it broadens the effective authority of the skill beyond user expectations, enabling unintended actions against the IMIVA MCP surface if additional tools become available to the token.
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
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 shell, file-read, and environment-variable handling behaviors but does not declare any explicit tool scope such as allowed-tools or permissions. This creates unnecessary capability ambiguity: a caller may trust the skill as a narrow ecommerce workflow while it can access broader local resources and execute helper commands, increasing the chance of unintended data exposure or misuse.
The description states the skill is especially suitable for '中文用户', which imposes a language preference in natural language rather than merely describing a regional compliance scope. The file does not offer an alternative language option or indicate that language selection is user-controlled.
The script forwards MCP_TOKEN and user-supplied tool arguments to a remote API endpoint without an in-band disclosure at execution time. While sending credentials and arguments is expected for an API client, the lack of clear notice increases the risk of inadvertent sensitive-data transmission, especially in an agent skill that may be run by non-expert users.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
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 runs an external package via npx, which can download and execute code from the package registry at runtime. In a skill context, this is risky because users may not realize they are triggering remote code execution and package retrieval on the local machine, especially with @latest allowing unpinned updates.
The script's error messages are hard-coded in Chinese, and there is no indication that the tool is region-specific or that users can select another language. This can violate language/locale policy where user-facing text should not force a specific language without opt-in or justification.