Back to skill

Security audit

AI电商专家|多图统一商品颜色

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly for product image recoloring, but it runs a mutable external package with a token and can invoke any MCP tool available to that token.

Install only if you trust the IMIVA npm package publisher and are comfortable giving this skill an MCP token that may reach more than the color-change task. Prefer a pinned reviewed package version, a narrowly scoped revocable token, and a minimal child-process environment before use.

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

Unpinned External Package Is Downloaded and Executed with Credentials

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imiva_mcp.py:104
Finding

Arbitrary MCP Tool Dispatch Without a Local Allowlist

Content
View full analysis
None: parser = argparse.ArgumentParser(description="调用 IMIVA Ecommerce MCP") sub = parser.add_subparsers(dest="command", required=True) sub.add_parser("list-tools", help="列出当前 Token 可用工具") call = sub.add_parser("call", help="调用一个 MCP 工具") call.add_argument("tool") call.add_argument("--args") call.add_argument("--args-file") ns = parser.parse_args() if ns.command == "list-tools": response = invoke("tools/list") else: response = invoke("tools/call", {"name": ns.tool, "arguments": load_args(ns.args, ns.args_file)}) ``` ### Technical Analysis The positional `tool` argument is accepted as an unrestricted string and forwarded unchanged as the MCP `tools/call` name. The wrapper does not enforce an allowlist corresponding to the Skill's intended operations, validate tool-specific argument schemas, distinguish read-only from state-changing operations, or require confirmation before a billable operation. The documented workflow primarily requires `create_color_change_task`, `get_user_credits`, and `get_user_tasks`. However, the wrapper can invoke any current or future tool exposed to the token by the remote MCP server. The remote server may independently enforce authorization, but the local helper does not provide a least-privilege boundary. Consequently, prompt-influenced command construction, automation errors, or direct misuse can extend execution beyond the advertised image-recoloring workflow. ### Attack Path 1. The MCP token is authorized for tools beyond the intended color-change workflow. 2. Untrusted instructions, generated shell arguments, or operator error supply an unintended tool name to the helper. 3. The helper accepts the name through `call.add_argument( ...[truncated 1150 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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is presented as a narrowly scoped color-unification workflow, but the documented behavior includes generic MCP tool listing and arbitrary tool invocation through a wrapper. That creates a confused-deputy risk: users or orchestrators may trust and auto-select the skill for low-risk image editing while it can access unrelated MCP capabilities exposed by the same token.

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

The skill exposes capabilities implying environment access, file reads, and shell execution, but does not declare any tool scope or allowed-tools boundary. In a skill that handles local file paths and token-based MCP access, this omission weakens least-privilege controls and can let a broader runtime invoke sensitive operations than users would expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The description says to use the skill for broad contexts like "IMIVA ecommerce content" and multiple generic workflows such as product images, detail pages, KOC seeding, and social commerce workflows. In a manifest-style file, this lacks clear trigger constraints or exclusion conditions, increasing the chance of unintended invocation for ordinary ecommerce-related requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest metadata sets language: zh-CN, which indicates a fixed language/locale. The file does not clearly state that the skill is limited to Chinese by design or offer multilingual/user-selected language behavior, creating a potential language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing error messages in Chinese and also uses a Chinese CLI description/help text elsewhere, but provides no opt-in, fallback, or explanation that the skill is intended only for Chinese-speaking users. That creates a natural-language locale policy issue because the skill effectively forces a specific language on all users.

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

The argparse description and subcommand help strings are user-facing natural language and are all written in Chinese. Because the file does not offer an alternative locale or indicate that the tool is intentionally limited to a Chinese-language environment, this is a language policy violation under the stated rule.

Content

No source excerpt is available for this finding.