Back to skill

Security audit

AI电商专家|服装时尚电商图片视频

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-aligned, but it runs a mutable npm package with an MCP token and the full parent environment, so users should review it before installing.

Install only if you trust the IMIVA npm package and are comfortable sending selected product assets to IMIVA. Use a narrowly scoped, revocable MCP token, run it from an environment that does not contain unrelated secrets, and prefer a pinned or preinstalled CLI version over `@latest` before using it for business content.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
scripts/imiva_mcp.py:14
Finding

Mutable npm Dependency Executes with Access to the Complete Parent Environment

Content
View full analysis

Vulnerability Details

File Location: scripts/imiva_mcp.py:14, scripts/imiva_mcp.py:48-62, SKILL.md:84-96, references/mcp-config.example.json:3-12
Vulnerability Type: Mutable third-party dependency execution and excessive environment inheritance
Risk Level: High

The skill invokes npx -y with the mutable npm package specifier @infimind/ecom-content-cli@latest. The package is downloaded and executed without an exact version, lockfile, or integrity constraint. The resulting subprocess receives a copy of the complete parent environment.

Relevant implementation:

python
PACKAGE = "@infimind/ecom-content-cli@latest"
python
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(
        [npx, "-y", PACKAGE],
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        text=True,
        bufsize=1,
        env=env,
    )

The recommended configuration also uses the mutable package reference:

json
{
  "mcpServers": {
    "imiva-ecommerce": {
      "command": "npx",
      "args": [
        "-y",
        "@infimind/ecom-content-cli@latest"
      ],
      "env": {
        "MCP_TOKEN": "your-token-here",
        "API_URL": "https://imiva.ecpro.com"
      }
    }
  }
}

Technical Analysis

The npm latest tag is mutable. The code reviewed during this audit is therefore not sufficient to determine which third-party package version will execute during a future invocation. The -y option allows npx to install and execute the resolved package without an interactive installation confirmation.

No package lockfile, exact semantic version, or integrity hash constrains the down ...[truncated 2552 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace @infimind/ecom-content-cli@latest with an audited, exact package version in the Python script, SKILL.md, and the example MCP configuration.
  2. Install the dependency through a committed lockfile that records package integrity hashes. Use a reproducible installation command such as npm ci rather than downloading a mutable dependency during each normal invocation.
  3. Consider vendoring or preinstalling the verified dependency so runtime operation does not automatically retrieve and execute new code.
  4. Add an explicit dependency-update process that includes code review, vulnerability scanning, integrity verification, and controlled lockfile updates.
  5. Replace os.environ.copy() with a minimal environment allowlist. Pass only variables strictly required for process execution, such as a controlled PATH, MCP_TOKEN, and API_URL.
  6. Run the MCP package in a sandbox or restricted service account with limited filesystem and network access.
  7. Avoid placing unrelated secrets in the parent environment used to launch this skill. Use narrowly scoped, short-lived tokens and rotate MCP_TOKEN if package compromise is suspected.
  8. Apply the same exact-version requirement to every documented configuration so users do not bypass the hardened Python helper and execute the mutable package directly.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
92% confidence
Finding

Using os.environ.copy() forwards the entire parent environment to the child process, not just the needed token and API URL. Because the child process is a remotely fetched npm package, this expands the blast radius to any other secrets present in the environment, such as cloud credentials, CI tokens, or proxy settings.

Content

Scanner excerpt · scripts/imiva_mcp.py (reported line 51)May include surrounding context.

python
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(

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents and encourages shell execution, environment-variable use, and local file access, but does not declare any explicit tool scope such as allowed-tools or permissions. This creates an overbroad-trust problem: an agent or reviewer cannot easily determine the minimum required capabilities, increasing the chance the skill will run with more privileges than necessary and expose local files or secrets during operation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The text states the skill is especially suitable for Chinese users, which imposes a locale preference in natural language. There is no accompanying opt-in, multilingual alternative, or justification that this is a region-specific compliance or localization constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The user-facing display name, description, and default prompt are entirely in Chinese, which implies a fixed language/locale experience. The file does not offer user opt-in for language selection or document that the skill is intentionally limited to a Chinese-language or region-specific audience.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill enables implicit invocation while exposing a broad ecommerce-content capability through a generic default prompt. This can cause the agent to activate the skill without clear user intent, leading to unintended use of external content-generation workflows, unnecessary task creation, or accidental transmission of product assets and business context to the linked platform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script reads MCP_TOKEN from the environment and forwards it to the spawned child process, but does not clearly disclose that the credential will be exposed to externally sourced code. If the npm package is compromised or behaves unexpectedly, the token can be used to access IMIVA MCP capabilities and associated enterprise content workflows.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The script launches npx -y @infimind/ecom-content-cli@latest, which executes code fetched from the package registry at runtime. Even though shell=True is not used, this still creates a supply-chain execution risk because the package version is floating (latest) and the script gives that child process network access plus the MCP token via environment variables.

Content

Scanner excerpt · scripts/imiva_mcp.py (reported line 54)May include surrounding context.

python
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,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script silently downloads and runs a remote npm package through npx with no disclosure to the operator. In a security-sensitive enterprise skill, hidden remote code execution increases trust and supply-chain risk because users may not realize they are executing unpinned third-party code.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script's user-visible error messages and command descriptions are written in Chinese, with no option to select another language or locale. This is a natural-language policy issue under the language/locale rule because the file imposes a specific language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.