T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:13- Finding
Unpinned npm Dependency Is Automatically Downloaded and Executed
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches an IMIVA ecommerce video workflow, but it runs an unpinned external npm package with broad environment/token access and exposes a generic MCP call surface, so it should be reviewed before installation.
Install only if you trust the IMIVA service and the @infimind npm package publisher. Prefer a pinned package version, run it from a clean environment without unrelated secrets, use a limited IMIVA token, keep API_URL fixed to the expected HTTPS IMIVA host, and confirm credit-spending actions before generation.
scripts/imiva_mcp.py:13Unpinned npm Dependency Is Automatically Downloaded and Executed
scripts/imiva_mcp.py:48Third-Party MCP Process Inherits the Complete Host Environment
scripts/imiva_mcp.py:48Environment-Controlled API Endpoint Can Redirect Credential-Bearing Requests
The skill is presented as a narrowly scoped first/last-frame video generator, but the content instructs the agent to list tools and generically call IMIVA MCP operations, which expands the effective capability beyond the declared purpose. This mismatch is dangerous because users and orchestrators may trust the skill for a single bounded workflow while it actually enables broader tool discovery and invocation that could reach unrelated account functions or perform unintended billable actions.
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 operational capabilities involving environment variables, file access, and shell execution through documented commands, but it does not declare any explicit tool scope such as allowed-tools or permissions. That omission weakens least-privilege controls and makes it easier for an agent runtime to grant broader capabilities than users would expect, especially because the skill references local paths, tokens, and command execution.
The description says to use the skill for a very wide range of workflows including ecommerce content, product images, product detail pages, KOC seeding, product video, marketplace listing, and social commerce. For a manifest/markdown description, this scope is broad enough to overlap with many ordinary ecommerce requests, without clear trigger boundaries or exclusion conditions.
The text says the skill is especially suitable for '中文用户', which expresses a language/locale preference in the skill's natural-language description. Because the file does not offer a language choice or explain a necessary compliance reason for limiting use by Chinese users, this can conflict with language/locale policy expectations.
The display name, short description, and default prompt are all written to prescribe the skill as a Chinese-language experience, with no indication that users may choose another language. This can violate language/locale policy when a skill imposes a specific language without explicit opt-in or documented justification.
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 exposes a generic MCP proxy that can call arbitrary tool names and pass arbitrary JSON arguments, which exceeds the skill's stated purpose of first/last-frame video generation. In a token-bearing environment, this broad capability can be abused to invoke unrelated MCP tools accessible to the same token, expanding the blast radius far beyond the advertised single-function skill.
This Python file contains hard-coded Chinese error messages for missing runtime and token conditions. Under the policy rule, forcing a specific language without user opt-in or a documented regional justification is a natural-language policy violation.
Providing a list-tools command reveals all MCP tools available to the token, even though the skill is presented as a narrowly scoped ecommerce video-generation helper. This leaks capability information that can help an attacker or misbehaving workflow discover additional privileged actions exposed by the same backend.