T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:13- Finding
Unpinned npm Package Is Downloaded and Executed Automatically
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent ecommerce-content purpose, but it runs an unpinned npm MCP package with the user's token and inherited environment, which deserves review before installation.
Review this before installing in any environment that contains API keys, cloud credentials, repository tokens, or other secrets. Prefer a pinned MCP package version, a minimal allowlisted environment, and explicit user confirmation before billable generation tasks or local product assets are sent to IMIVA.
scripts/imiva_mcp.py:13Unpinned npm Package Is Downloaded and Executed Automatically
scripts/imiva_mcp.py:49Third-Party MCP Process Inherits the Complete Parent Environment
os.environ.copy() passes the full parent environment into a subprocess that executes remotely sourced npm code. Even though the script intentionally sets MCP_TOKEN and API_URL, inheriting all environment variables may expose unrelated secrets such as cloud credentials, proxy tokens, CI secrets, or other sensitive configuration to the child process if the package is malicious or compromised.
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 examples that invoke shell commands, read local files, and rely on environment variables containing sensitive credentials, but it does not declare any explicit tool scope such as allowed-tools or permissions. This creates a mismatch between documented capability and declared restrictions, increasing the risk that a host agent may grant broader-than-necessary access or that users will execute commands handling tokens and local paths without clear sandboxing expectations.
The markdown explicitly says the skill is especially suitable for Chinese users, while the file otherwise includes English text and does not present this as an optional language preference or a clearly justified regional compliance constraint. This creates a natural-language locale policy concern because it steers usage toward a fixed language audience without opt-in.
The skill enables implicit invocation without defining trigger constraints, exclusion conditions, or tighter routing boundaries. This can cause the agent to auto-select the skill in broader contexts than intended, potentially sending user prompts or commerce-related assets to the skill unexpectedly and increasing the risk of unauthorized actions, data exposure, or prompt-routing abuse.
The script spawns npx -y @infimind/ecom-content-cli@latest, which executes code fetched from the npm registry at runtime. Using the mutable latest tag means the exact code is not pinned or verified, so a registry compromise, package takeover, or malicious upstream release would result in arbitrary code execution in the local environment with access to the provided token and inherited process context.
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 helper silently launches a remote npm package without clearly warning the operator that untrusted third-party code may be downloaded and executed. In a security-sensitive skill context, that lack of disclosure increases the risk of users unknowingly exposing credentials or running compromised upstream code.
The script emits user-facing error messages only in Chinese, such as when npx or MCP_TOKEN is missing. This imposes a specific language on all users without opt-in or documented locale justification, which matches the language/locale policy violation criteria.