Back to skill

Security audit

AI电商专家|母婴童装电商图片视频

Security checks for vulnerabilities and agentic risk

Overview

This skill is for IMIVA ecommerce content creation, but it runs an automatically downloaded npm tool with broad environment access and loosely scoped MCP calls, so it should be reviewed before install.

Install only if you trust the IMIVA npm package and service, can use a least-privilege MCP token, and are comfortable with product data and media being sent to IMIVA. Prefer pinning the npm package version, limiting the subprocess environment, and requiring explicit confirmation before any paid task creation.

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:13
Finding

Automatic Execution of an Unpinned npm Package

Content
View full analysis

Vulnerability Details

File Location: scripts/imiva_mcp.py:13, 53-54; references/mcp-config.example.json:4-8; SKILL.md:72, 111-116
Vulnerability Type: T08: Insecure Dependencies
Risk Level: High

The project downloads and executes the mutable latest release of an npm package without a lockfile, integrity hash, or installation confirmation.

Vulnerable Code

From scripts/imiva_mcp.py:

python
PACKAGE = "@infimind/ecom-content-cli@latest"
DEFAULT_API_URL = "https://imiva.ecpro.com"
python
proc = subprocess.Popen(
    [npx, "-y", PACKAGE],
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE,
    text=True,
    bufsize=1,
    env=env,
)

From references/mcp-config.example.json:

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"
      }
    }
  }
}

The same unsafe runtime dependency pattern is recommended in SKILL.md:

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 @latest npm tag is mutable and does not identify a reproducible, previously reviewed package artifact. The -y option instructs npx to proceed without requesting installation confirmation. Consequently, each invocation can download and execute whatever package version the publisher currently assigns to latest.

The downloaded package runs as a subprocess with the invoking user's permissions. It also receives a copy of the parent pro ...[truncated 2290 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace @infimind/ecom-content-cli@latest with a specific, reviewed version in the Python helper, example configuration, and documentation.
  2. Install the dependency during a controlled setup or build step rather than downloading it on every invocation.
  3. Commit an npm lockfile and use a reproducible installation command such as npm ci.
  4. Verify package integrity using the lockfile integrity value, a trusted artifact checksum, or package-signature/provenance controls.
  5. Remove automatic runtime installation through npx -y. Invoke a locally installed, version-controlled executable instead.
  6. Review dependency changes before upgrading and use automated vulnerability, provenance, and package-maintainer monitoring.
  7. Construct a minimal subprocess environment instead of passing os.environ.copy(). Include only variables required by the MCP package.
  8. Scope the MCP token to the minimum required permissions and usage limits. Support prompt revocation and rotation if compromise is suspected.
  9. Where feasible, isolate the MCP process in a sandbox or container with restricted filesystem and network access.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose is a narrow maternity/baby ecommerce content workflow, but the skill text instructs use of a generic helper that can list tools and invoke arbitrary IMIVA MCP methods. That mismatch weakens containment: a user or downstream prompt injection could steer the skill into unrelated privileged actions exposed by the MCP server, defeating the expectation that only create_koc_collage_task is in scope. Because the skill encourages trusting runtime tools/list results, its effective capability expands with server-side changes.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
74% confidence
Finding

Using os.environ.copy() forwards the entire parent environment into the child npm process, not just the token and API URL needed for operation. That broad inheritance can expose unrelated secrets, proxy credentials, cloud keys, or internal configuration to third-party code launched via npx, which is especially concerning in an enterprise ecommerce integration skill.

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 declares no explicit tool scope or allowed-tools boundary while its content instructs use of environment variables, file paths, and shell commands. In practice, that gives the skill broader effective capability than users may expect, increasing the chance of unintended access to local files, secrets, or command execution through the hosting agent. This is more concerning because the skill also positions itself as turnkey and hides implementation details from the user, which can mask the breadth of access required.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The description says 'Use this skill for IMIVA ecommerce content, product images, product detail pages, KOC seeding, product video, viral creative recreation, marketplace listing and social commerce workflows.' This is a very broad activation description that overlaps with many ordinary ecommerce requests and does not provide explicit trigger constraints or exclusions, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The metadata sets 'language: zh-CN', and the document later targets '中文用户' without stating that users may choose another language. This can violate language/locale policy when a skill appears to force a specific language rather than offering an opt-in or clearly justified region-specific restriction.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill enables implicit invocation (allow_implicit_invocation: true) without any visible constraints on when it should activate, what user intents it should match, or when it must defer. In a commerce workflow that can trigger real MCP tooling and content-generation tasks, this increases the risk of unintended activation, accidental task creation, budget-impacting actions, or the skill influencing conversations outside its intended scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script reads MCP_TOKEN from the environment and forwards it to a spawned third-party CLI process, but gives the user no explicit warning that their credential will be exposed to that child process. If the external package is compromised, logs environment variables, or behaves unexpectedly, the token could be leaked and abused against the IMIVA service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

User-supplied tool arguments are serialized and sent through the MCP client to a remote API, but the CLI does not clearly disclose that provided data may leave the local machine. In this skill context, users may supply local media paths, product data, or other business-sensitive content, so silent transmission raises privacy and data-handling concerns.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

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
91% confidence
Finding

The helper automatically executes @infimind/ecom-content-cli@latest via npx, which can fetch and run code from the npm ecosystem at execution time. Using @latest materially increases supply-chain risk because behavior can change without review, and users are not warned that invoking this script causes third-party code execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The display name, description, and default prompt are all written in Chinese, which may impose a language expectation without any stated opt-in, fallback, or justification. The policy requires avoiding forced language or locale constraints unless the user is given a choice or the limitation is clearly documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's error messages and command descriptions are presented in Chinese, which imposes a specific language on users without any opt-in or fallback. Under the policy, a skill should not force a language or locale unless it offers a choice or clearly documents a justified locale restriction.

Content

No source excerpt is available for this finding.