Back to skill

Security audit

AI电商专家|达人 UGC 商品图

Security checks for vulnerabilities and agentic risk

Overview

The skill appears aimed at a real ecommerce image workflow, but it runs a mutable external npm package with user credentials and broad environment access, so it needs review before installation.

Review this skill carefully before installing. Use it only with a dedicated IMIVA token, avoid running it from an environment containing unrelated secrets, and prefer a pinned/audited version of the npm package or a sandboxed MCP configuration. Confirm credit-consuming image or video tasks before submission.

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

Unpinned Remote npm Package Is Automatically Downloaded and Executed

Content
View full analysis

Vulnerability Details

File Locations:

  • scripts/imiva_mcp.py:13
  • scripts/imiva_mcp.py:51-58
  • references/mcp-config.example.json:4-11
  • SKILL.md:108-114

Vulnerability Type: Runtime execution of an unpinned third-party dependency
Risk Level: High

Vulnerable Code

scripts/imiva_mcp.py:13:

python
PACKAGE = "@infimind/ecom-content-cli@latest"

scripts/imiva_mcp.py:51-58:

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,
    stderr=subprocess.PIPE,
    text=True,

references/mcp-config.example.json:4-11:

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

SKILL.md:108-114:

json
"command": "npx",
"args": [
  "-y",
  "@infimind/ecom-content-cli@latest"
],
"env": {
  "MCP_TOKEN": "your-token-here",

Technical Analysis

The Skill invokes npx with both the automatic-confirmation option (-y) and the mutable npm version selector @latest. Consequently, each invocation may download and execute package code that differs from the version available when the Skill was audited.

No exact package version, lockfile, package integrity hash, or locally verified installation is used. The security of the local execution path therefore depends on the continuing integrity of the npm publisher account, package registry, package release process, and transitive dependency graph.

The downloaded process receives a copy of the complete parent environment through os.environ.copy(). This environment explicitly includes MCP_TOKEN and may also contain unrelated credentials i ...[truncated 1905 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace @latest with an exact, reviewed package version, for example @infimind/ecom-content-cli@X.Y.Z.
  2. Install dependencies during a controlled build or setup phase rather than downloading them whenever the Skill is invoked.
  3. Commit and enforce a lockfile, and verify npm integrity metadata or an independently maintained artifact checksum.
  4. Configure CI to audit package updates before changing the pinned version. Do not permit automated updates to become executable without review.
  5. Avoid npx -y for uninstalled remote packages. Prefer invoking a verified local binary from a controlled dependency directory.
  6. Replace os.environ.copy() with a minimal environment containing only required runtime variables, such as a controlled PATH, MCP_TOKEN, and the validated API URL.
  7. Run the MCP package in a sandbox with restricted filesystem and network access where the deployment environment supports it.
  8. Restrict the API endpoint to an approved HTTPS allowlist before forwarding the token, preventing accidental credential transmission to an arbitrary endpoint.
  9. Rotate the MCP token if an untrusted or subsequently compromised package version may already have been executed.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose is a specific UGC product-image workflow, but the referenced helper pattern can list all available MCP tools and invoke arbitrary tool names with arbitrary arguments. That turns the skill into a general-purpose MCP transport layer, so any token-granted capability on the backend may be reachable, including operations outside the advertised scope, increasing the risk of unauthorized actions, data access, or unintended charges.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
93% confidence
Finding

Using os.environ.copy() sends the parent process environment wholesale into a spawned third-party package, potentially exposing unrelated secrets such as cloud keys, CI tokens, proxy credentials, and internal configuration. In this skill context, the child process is an npm package executed via npx and fetched as @latest, which makes broad environment inheritance materially more dangerous because external code may access far more than the intended MCP token.

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

The skill exposes shell, file-read, and environment-dependent behavior but does not declare any explicit tool scope or allowed-tools boundary. In practice this weakens least-privilege controls and makes it easier for the skill to access local files, environment secrets, or execute broader commands than users would expect from a narrowly described ecommerce image workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest sets language: zh-CN, and the document repeatedly frames the skill for Chinese-language users rather than presenting language as a selectable preference. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy concern unless clearly justified as region-specific compliance tooling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The phrase '特别适合...的中文用户' indicates a language/locale restriction in the natural-language description. The file does not offer an alternative language choice or explain a necessary compliance or regional reason for restricting use to Chinese users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's user-visible error messages are written only in Chinese, which imposes a specific language on users without opt-in or explanation. This is a natural-language locale policy issue because the skill does not offer alternative language output or justify a Chinese-only audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script forwards MCP_TOKEN to an externally fetched and executed npm package without any in-script disclosure, confirmation, or restriction, so a user may unknowingly expose a sensitive credential to third-party code. This is especially risky because the package is invoked through npx with @latest, meaning the exact code receiving the token can change over time.

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,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The argparse description and help strings are presented only in Chinese, which constrains interaction to a single language. The file does not indicate that this is a region-specific tool or provide any language choice.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This manifest config defines an MCP server and credentials but provides no natural-language description of when or how the skill should be invoked. For manifest files, the absence of explicit trigger scope or exclusion conditions can make activation expectations ambiguous to integrators.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
70% confidence
Finding

The config pins the skill to a specific production URL, which may implicitly constrain use to a particular service region or locale without offering user choice. If this skill is expected to support multiple locales or regions, the fixed endpoint could violate organizational language or locale flexibility requirements.

Content

No source excerpt is available for this finding.