T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:53- Finding
Mutable npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly aligned with ecommerce content generation, but it needs review because it runs a mutable npm MCP package with token access and exposes more local environment data than necessary.
Install only if you are comfortable giving this IMIVA MCP package access to an MCP token and the environment of the agent process. Prefer a pinned reviewed package version, run it in a low-secret environment, avoid broad API_URL overrides, and confirm all paid generation tasks before submission.
scripts/imiva_mcp.py:53Mutable npm Package Is Automatically Downloaded and Executed
scripts/imiva_mcp.py:48Third-Party MCP Process Inherits the Entire Parent Environment
scripts/imiva_mcp.py:48Unvalidated Environment Variable Can Override the Token-Bearing API Endpoint
The skill is presented as a specific Instagram ecommerce content workflow, but the instructions expose generic MCP enumeration and arbitrary tool invocation via a local wrapper. That mismatch is dangerous because users may grant trust and credentials for a narrow purpose while the documented behavior enables broader account queries and execution of any MCP-exposed operation available to the 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 documentation instructs use of shell commands, local file paths, and environment variables, but the manifest does not declare any explicit tool scope or restrictions. This creates an authorization and transparency gap: a host or reviewer may believe the skill is narrowly scoped while it actually depends on shell execution, file access, and secret-bearing environment access.
The description says the skill is especially suitable for Chinese users, and the file metadata also fixes the language to zh-CN. This creates a natural-language locale constraint without any user-facing opt-in or indication that other languages are supported.
The skill enables implicit invocation without any trigger constraints, exclusion rules, or user-confirmation safeguards. In a commerce workflow, this can cause the agent to auto-select the skill based on broad matching and initiate product-content generation or related business actions in contexts the user did not explicitly intend, increasing the risk of prompt hijacking, misrouting, or unintended tool use.
This code file includes natural-language strings that force a specific language for errors and usage guidance. Under the policy rule, locale or language restrictions should be optional or clearly justified; here there is no opt-in, fallback, or documentation indicating the skill is intentionally Chinese-only.
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 manifest description and metadata emphasize automatic use of the real MCP tool create_koc_note_package_task, suggesting a narrowly scoped KOC/content-package workflow. However, later sections document additional capabilities including product main image generation, detail page generation, video generation, task history lookup, and credit balance queries, which is broader than the headline behavior described in the manifest metadata.
All user-facing manifest text and the default prompt are written to operate in Chinese, with no indication that the user can choose another language. This can violate language/locale policy when a skill imposes a language without explicit opt-in or documented regional justification.