T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:14- Finding
Automatic Execution of an Unpinned npm Package
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to support the stated ecommerce content workflow, but it runs a mutable external npm package and forwards the full local environment to it.
Review before installing. Use only in an environment where sending product materials and prompts to IMIVA is acceptable, avoid running it with unrelated secrets in the environment, and prefer a pinned/reviewed MCP package version with a minimized environment allowlist.
scripts/imiva_mcp.py:14Automatic Execution of an Unpinned npm Package
scripts/imiva_mcp.py:50Third-Party Child Process Inherits the Complete Parent Environment
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 includes shell commands, environment-variable handling, and file-path based operations, but it does not declare a restrictive tool scope such as allowed-tools or permissions. In an agent environment, that increases the chance the skill can access broader local resources or execute helper commands than users expect, especially because it instructs use of local files and token-bearing environment variables.
Line L054 states the skill is especially suitable for Chinese users, which establishes a language/locale preference in the skill’s natural-language instructions. The file does not offer an alternative language option or make this an explicit user opt-in, so it conflicts with the policy against forcing a specific language or locale without choice.
The display name, description, and default prompt are entirely in Chinese and direct use of a specific Chinese e-commerce context, with no indication that users can choose another language or locale. This can violate language/locale policy when the skill is presented to users who have not opted into Chinese-language interaction.
The skill enables implicit invocation but does not define any narrow activation boundaries, so it may be auto-selected in conversations where the user did not explicitly request this ecommerce workflow. Because the skill can trigger downstream MCP-backed content generation behavior, overly broad invocation increases the chance of unintended tool use, surprise data handling, or confusing the user about why the skill was activated.
The script passes MCP_TOKEN and tool-call arguments to an external MCP process that then communicates with a remote API, but the code does not clearly warn the user that credentials and potentially sensitive content will leave the local environment. In an ecommerce-content workflow, inputs may include proprietary product assets, marketing plans, or customer-adjacent business data, making silent transmission more sensitive.
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,
This script executes a remote npm package (npx -y @infimind/ecom-content-cli@latest) without any interactive confirmation or in-code warning. That creates a supply-chain trust issue: users may not realize they are fetching and running code from the npm ecosystem, and @latest allows behavior to change over time without review.
The script's error messages and CLI description/help strings are written in Chinese, and there is no indication that the user can select another language or that the tool is intentionally limited to a Chinese-speaking audience. This can violate language/locale policy where user-facing output should not force a specific language without opt-in or clear justification.