Back to skill

Security audit

AI电商专家|品牌电商视觉一致性

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent ecommerce image workflow, but it runs an unpinned remote npm MCP package with broad environment exposure and a generic tool caller, so users should review it before installing.

Before installing, make sure you trust the IMIVA npm package and account behind @infimind/ecom-content-cli. Prefer a pinned reviewed version, run it from an environment without unrelated secrets, use a narrowly scoped revocable MCP token, and verify tool calls before creating tasks that may consume credits.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/imiva_mcp.py:14
Finding

Runtime Execution of an Unpinned Remote npm Package

Content
View full analysis
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, ) ``` 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" } } } } ``` ### Technical Analysis The Skill invokes `npx` with both the automatic-confirmation option (`-y`) and the mutable package selector `@latest`. Consequently, the executable code is resolved from the npm registry at runtime rather than being fixed to the version reviewed during this audit. The contents of the package can change whenever a new release receives the `latest` distribution tag. A compromised package publisher, npm account, package release process, or registry response could therefore cause future Skill invocations to execute code materially different from the audited code. This issue is primarily remote payload retrieval and execution because the effective executable payload is downloaded dynamically and can change after review. It also repre ...[truncated 1765 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imiva_mcp.py:52
Finding

External MCP Process Inherits the Entire Parent Environment

Content
View full analysis
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, ) try: send(proc, { ``` ### Technical Analysis The wrapper creates the child-process environment with `os.environ.copy()`. This passes every environment variable available to the Python process into the externally sourced npm executable. Only a limited environment is required for the documented operation, principally the runtime path, `MCP_TOKEN`, and the intended service endpoint. The inherited environment may also contain unrelated secrets such as repository tokens, cloud credentials, proxy credentials, CI/CD secrets, database connection strings, or API keys. The exposure is especially significant because the recipient process is the unpinned remote dependency described in the preceding finding. A compromised or unexpectedly modified package would not need to exploit another local vulnerability to read these variables. The endpoint is also selected from inherited `IMIVA_API_URL` or `API_URL` without validating its scheme or hostname. This creates a configuration-based redirection risk. Whether the external package transmits the token to that endpoint depends on its implementation, which was not included in the audited project; therefore, token exfiltration through endpoint redirection is a plausible risk rather than a confirmed behavior. ### Attack Path 1. The Agent, shell ...[truncated 1306 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is presented as a dedicated brand-visual-consistency workflow centered on create_visual_migration_task, but the documented behavior includes listing available tools and invoking arbitrary MCP tools by name. That turns the skill into a generic MCP transport layer, increasing the chance of privilege expansion, accidental misuse of unrelated tools, and token-backed actions outside the user’s expected scope.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

The child process environment is initialized with os.environ.copy(), forwarding all parent environment variables to a dynamically executed external package. Because that package is fetched and run via npx, any unrelated secrets in the parent environment may be exposed to third-party code, significantly increasing blast radius beyond 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
83% confidence
Finding

The skill exposes shell, file-read, and environment-variable handling behaviors 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, tokens, or execute helper commands beyond what a narrow visual-migration workflow should require.

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

The code executes '@infimind/ecom-content-cli@latest' via npx, which fetches and runs the latest published package at runtime. This is a classic supply-chain risk: a compromised publisher account, malicious update, or dependency hijack would execute attacker-controlled code in the local environment with access to the MCP token and inherited environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The wrapper exposes a generic 'call' command that accepts any tool name and arbitrary JSON arguments, while the skill metadata claims a narrower visual-consistency purpose. In a skill ecosystem, this creates a capability-expansion issue: users or downstream agents may trust the stated scope, but the code can invoke any IMIVA MCP tool the token is authorized to use, potentially enabling unintended data access or privileged operations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The text explicitly says the skill is especially suitable for Chinese users, which is a locale/language preference stated in natural language. Because the document does not offer an opt-in choice or explain a strict region-specific compliance reason, this can be read as a language/locale policy restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's error messages are written only in Chinese, and the command description/help text also uses Chinese, with no opt-in or alternative locale. This creates a language policy concern if users are not explicitly told the skill is Chinese-only or given a language choice.

Content

No source excerpt is available for this finding.