Back to skill

Security audit

AI电商专家|批量 SKU 内容生产

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to support its stated IMIVA ecommerce workflow, but it runs mutable third-party code with broad environment access and has overly broad invocation/tool scope that merits review before installation.

Install only if you trust the IMIVA npm package and are comfortable sending authorized product assets to that service. Prefer a pinned package version, run it in a low-privilege or clean environment containing only the required MCP_TOKEN/API_URL variables, and require explicit user confirmation before creating paid tasks or processing local business files.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Error
Location
scripts/imiva_mcp.py:14
Finding

Automatic Execution of an Unpinned Mutable npm Dependency

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, ) ``` `references/mcp-config.example.json:3-11`: ```json "imiva-ecommerce": { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ], "env": { "MCP_TOKEN": "your-token-here", "API_URL": "https://imiva.ecpro.com" } } ``` `SKILL.md:83-94`: ```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 project executes `@infimind/ecom-content-cli@latest` through `npx -y`. The `latest` npm distribution tag is mutable and does not identify an immutable, audited package release. The `-y` option suppresses the normal installation confirmation, causing the package currently referenced by that tag to be downloaded and executed automatically. Consequently, the code that runs on a user's system can change after this Skill has been reviewed. This creates a supply-chai ...[truncated 2197 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imiva_mcp.py:47
Finding

Downloaded Third-Party 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, ) ``` ### Technical Analysis The call to `os.environ.copy()` copies every environment variable from the parent process into the environment passed to the npm package. The package only demonstrably requires a limited runtime environment plus `MCP_TOKEN` and `API_URL`, but it receives all other variables as well. Development workstations, CI jobs, and hosted agent environments commonly store sensitive values in environment variables, including cloud credentials, source-control tokens, deployment keys, database passwords, proxy credentials, and tokens belonging to unrelated services. This unnecessarily broad inheritance violates least-privilege principles. Its security significance is amplified because the recipient is the mutable package `@infimind/ecom-content-cli@latest`, which is downloaded and executed using `npx`. Any code executed by that package or its installation lifecycle can inspect its process environment. No evidence shows that the currently published package exfiltrates these values. The flaw is the avoidable exposure of unrelated secrets to third-party code. ### Attack Path 1. The parent environment contains credentials unrelated to IMIVA, such as a cloud API key or source-control token. 2. The user invokes the helper script. 3. `os.environ.c ...[truncated 1448 chars]
Remediation
View remediation
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 (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is described as a dedicated batch-SKU visual migration workflow, but its referenced behavior acts as a generic MCP client that can list tools and invoke arbitrary MCP tool names. This breaks the principle of least privilege and can let a user pivot from a narrowly branded ecommerce skill into broader actions permitted by the token, including unrelated or more sensitive MCP operations.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

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

The skill exposes shell, file-read, and environment-backed behavior but does not declare an explicit tool scope such as allowed-tools or permissions. That makes the effective capability surface larger than what a user or orchestrator can infer from the manifest, increasing the risk of unintended command execution, local file access, or token exposure if the wrapper script is invoked in unexpected ways.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description says to use the skill for a wide set of generic ecommerce and content workflows, including product images, detail pages, KOC seeding, product video, marketplace listing, and social commerce workflows. This broad phrasing does not clearly distinguish when this specific skill should activate versus other ecommerce skills, increasing the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file declares applicability to users searching for broad terms like 批量SKU, 自动化出图, 电商, 营销, 广告, Listing, and related platform names, which overlap with many ordinary ecommerce requests. It provides extensive keyword coverage but no exclusion criteria or negative examples, making the trigger scope ambiguous.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables allow_implicit_invocation without any visible activation constraints, which can cause the agent to auto-select this skill in situations where the user did not clearly request ecommerce batch SKU content production. Because this skill can trigger real MCP tooling for content-generation workflows, unintended invocation could send user-provided local paths, HTTPS assets, or business materials into downstream processing, creating authorization, privacy, cost, and workflow-integrity risks.

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

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The metadata fixes the skill language to zh-CN, and the document further targets Chinese users without offering any user choice or opt-in for language or locale. This can violate language or locale policy when the skill is presented in contexts where users may expect multilingual support or language selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The error messages shown to users are hard-coded in Chinese for missing runtime and token conditions. This imposes a specific language on all users without opt-in or justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.