T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:12- 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’s ecommerce purpose is coherent, but it automatically runs an unpinned npm package with the user’s IMIVA token and full inherited environment.
Review before installing. Use only if you trust the IMIVA npm package publisher and are comfortable giving it your IMIVA token and any inherited environment variables. Prefer a pinned package version, a minimal allowlisted environment, scoped/rotatable tokens, and manual confirmation before credit-spending generation tasks.
scripts/imiva_mcp.py:12Automatic Execution of an Unpinned npm Dependency
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 documents shell execution, environment-variable access, and local file path handling, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates an overbroad execution surface where a host may permit more capabilities than the skill strictly needs, increasing the risk of unintended command execution, exposure of local files, or misuse of secrets like MCP tokens. In this context, the risk is elevated because the workflow explicitly references shell commands, local file paths, and environment-based authentication.
The description ends with 'Use this skill for IMIVA ecommerce content, product images, product detail pages, KOC seeding, product video, viral creative recreation, marketplace listing and social commerce workflows.' This is an expansive invocation description covering many common ecommerce tasks without explicit boundaries or negative examples, making activation scope ambiguous for a markdown skill description.
The file states the skill is especially suitable for '中文用户', and the provided command examples hard-code 'language':'简体中文'. This indicates a language/locale constraint in the natural-language instructions without presenting user choice or documenting why other languages are excluded.
The user-facing error messages are hard-coded in Chinese, and the CLI description/help text later in the file is also Chinese-only. For a general-purpose skill, this imposes a specific language on users without opt-in or documented justification, which matches the language/locale policy violation criteria.
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,