T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:12- Finding
Unpinned External Package Is Downloaded and Executed with Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mainly for product image recoloring, but it runs a mutable external package with a token and can invoke any MCP tool available to that token.
Install only if you trust the IMIVA npm package publisher and are comfortable giving this skill an MCP token that may reach more than the color-change task. Prefer a pinned reviewed package version, a narrowly scoped revocable token, and a minimal child-process environment before use.
scripts/imiva_mcp.py:12Unpinned External Package Is Downloaded and Executed with Credentials
scripts/imiva_mcp.py:104Arbitrary MCP Tool Dispatch Without a Local Allowlist
The skill is presented as a narrowly scoped color-unification workflow, but the documented behavior includes generic MCP tool listing and arbitrary tool invocation through a wrapper. That creates a confused-deputy risk: users or orchestrators may trust and auto-select the skill for low-risk image editing while it can access unrelated MCP capabilities exposed by the same 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 capabilities implying environment access, file reads, and shell execution, but does not declare any tool scope or allowed-tools boundary. In a skill that handles local file paths and token-based MCP access, this omission weakens least-privilege controls and can let a broader runtime invoke sensitive operations than users would expect.
The description says to use the skill for broad contexts like "IMIVA ecommerce content" and multiple generic workflows such as product images, detail pages, KOC seeding, and social commerce workflows. In a manifest-style file, this lacks clear trigger constraints or exclusion conditions, increasing the chance of unintended invocation for ordinary ecommerce-related requests.
The manifest metadata sets language: zh-CN, which indicates a fixed language/locale. The file does not clearly state that the skill is limited to Chinese by design or offer multilingual/user-selected language behavior, creating a potential language policy issue.
This Python file contains user-facing error messages in Chinese and also uses a Chinese CLI description/help text elsewhere, but provides no opt-in, fallback, or explanation that the skill is intended only for Chinese-speaking users. That creates a natural-language locale policy issue because the skill effectively forces a specific language on all 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 argparse description and subcommand help strings are user-facing natural language and are all written in Chinese. Because the file does not offer an alternative locale or indicate that the tool is intentionally limited to a Chinese-language environment, this is a language policy violation under the stated rule.