T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:13- Finding
Unpinned npm Package Is Retrieved and Executed at Runtime
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent IMIVA video-generation integration, but it runs an unpinned npm package at runtime with the user's token and full inherited environment.
Review before installing. Use it only with a dedicated IMIVA token, avoid running it from environments containing unrelated secrets, and prefer a pinned or locally vetted MCP package version over `@latest`. Confirm costs before creating non-dry-run video tasks and keep the token out of chats, screenshots, and repositories.
scripts/imiva_mcp.py:13Unpinned npm Package Is Retrieved and Executed at Runtime
Using os.environ.copy() passes the entire parent environment to the spawned npm package, potentially exposing unrelated secrets such as cloud credentials, CI tokens, proxy credentials, and internal configuration. In this skill's context, the child process is an external package fetched via npx, so broad environment inheritance materially increases the blast radius of any malicious or compromised dependency.
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 includes operational instructions that rely on shell execution, environment variables, and local file access, but it does not declare any explicit tool scope such as allowed-tools or permissions. This can cause an agent platform to over-grant capabilities or invoke the skill in contexts where users and orchestrators are not clearly informed about the required access, increasing the risk of unintended command execution or exposure of local paths and secrets.
The description uses broad activation language like 'Use this skill for IMIVA ecommerce content' across many adjacent workflows without clear trigger boundaries. In agentic environments, this can make the skill eligible for invocation in loosely related contexts, increasing the chance that external tools are called or paid video-generation tasks are proposed when the user did not explicitly request this specific integration.
The metadata fixes the language to zh-CN, and the document later states it is especially suitable for Chinese users, but does not indicate this is an opt-in or region-justified constraint. This can violate language/locale policy when a skill forces a specific language experience without giving the user a choice.
The phrase saying the skill is particularly suitable for Chinese users implies a locale-specific preference in natural-language instructions. Because the file does not clearly present this as optional or justified by a strict regional requirement, it may conflict with policy against forcing a language or locale without user choice.
The script forwards the MCP_TOKEN credential to an externally fetched npm package without any explicit user disclosure, confirmation, or minimization of what is shared. Because the package is referenced as @latest and executed through npx, users may unknowingly expose sensitive credentials to updated third-party code, increasing supply-chain and secret-handling risk.
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,
All user-facing error strings shown here are hard-coded in Chinese, while the file provides no opt-in, locale detection, or alternative language selection. This creates a natural-language policy issue when a skill imposes a specific language on users without documented justification.