Back to skill

Security audit

AI电商专家|多平台电商内容适配

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its ecommerce content purpose, but it runs a mutable external npm package with broad environment access and weak local limits on MCP actions.

Review before installing. Use only a narrowly scoped, revocable IMIVA token; run it from a clean shell or container with minimal environment variables; prefer a pinned reviewed npm package version; and require explicit user confirmation before any image or video generation that may spend credits.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T08 · Insecure Dependencies

Error
Location
scripts/imiva_mcp.py:14
Finding

Unpinned Remote npm Package Is Automatically Downloaded and Executed

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 "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ] ``` The same invocation pattern is documented in `SKILL.md`: ```json "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ] ``` ### Technical Analysis The helper invokes `npx` with the mutable package selector `@latest`. The `-y` option automatically accepts installation and execution without an interactive review step. Consequently, the code that runs is not fixed to the version that was present when this Skill was audited. A newly published package release can therefore alter the effective executable payload without requiring any modification to this repository. If the package maintainer account, npm publishing token, registry resolution process, or upstream dependency chain is compromised, malicious code could be delivered the next time the helper is invoked. This issue is especially significant because the downloaded package executes with the permissions of the user running the Skill and receives the configured MCP token and inher ...[truncated 1488 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imiva_mcp.py:49
Finding

Third-Party MCP Subprocess Receives the Complete 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 implementation creates the subprocess environment using `os.environ.copy()`. This passes every environment variable from the parent Agent process to the externally maintained npm package, even though the MCP client only needs a limited set of values. Agent, developer, CI, and cloud environments commonly contain unrelated sensitive variables, including API keys, cloud access credentials, repository tokens, database credentials, signing secrets, and service authentication tokens. Passing these values to a third-party executable violates least-privilege and secret-compartmentalization principles. The package is also retrieved through an unpinned `@latest` reference. Although no secret-exfiltration logic was found in this repository, a compromised or defective package would be able to enumerate and transmit all inherited variables. ### Attack Path 1. The Agent or user process starts with unrelated secrets stored in environment variables. 2. The user invokes the MCP helper. 3. `os.environ.copy()` duplicates all parent environment variables. 4. The complete environment is supplied to the npm subprocess through `subprocess.Popen`. 5. A compromised, malicious, or vulnerable package reads variables unrelated to its legitimate operation. 6. The package transmits tho ...[truncated 674 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/imiva_mcp.py:105
Finding

Caller-Controlled MCP Tool Dispatch Lacks an Explicit Allowlist

Content
View full analysis
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

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

The skill instructs users to run shell commands, read local files via $SKILL_PATH, and configure secrets through environment variables, yet it declares no explicit tool scope or allowed-tools boundary. In a skill execution environment, this increases the chance that an agent may access shell, filesystem, or env capabilities more broadly than intended, which can expose tokens, local paths, or permit unintended command execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description states the skill is especially suitable for '中文用户', which imposes a language/locale preference in natural-language guidance. The file does not offer an opt-in or alternative language path, so this appears to conflict with the policy against forcing a specific language without user choice.

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 written in Chinese and instruct operation in that language, with no indication that the user can choose another language. This can violate language/locale policy when a skill imposes a specific language without explicit user choice or documented justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill enables allow_implicit_invocation without any visible trigger constraints, allowing the agent to invoke this ecommerce workflow automatically based on loose context matching. In a tool-capable environment, that increases the chance of unintended tool use, unexpected data sharing, or user confusion about why a commerce-content skill was activated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code presents user-facing error messages only in Chinese, and the CLI description/help text is also Chinese. That can violate language/locale policy when a skill forces a specific language without user opt-in and does not document that it is intentionally region-specific.

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

Several command-line validation and help strings are only available in Chinese, which continues the same language-forcing behavior across the interface. Because no alternative locale or user choice is offered, this is a natural-language policy concern rather than a code-security issue.

Content

No source excerpt is available for this finding.