Back to skill

Security audit

AI电商专家|竞品构图参考重制

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned, but it needs review because it runs an unpinned external MCP package with the user's token and exposes broader IMIVA tool-calling than the headline workflow suggests.

Install only if you trust the IMIVA npm package and are comfortable giving it an MCP token that can create tasks and consume account credits. Use a scoped/revocable token, confirm costs before generation, avoid setting a generic API_URL to an unintended endpoint, and provide only media files you intend to upload.

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 (9)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
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,
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
This is a mismatch because the description presents a narrowly scoped skill focused on '竞品构图参考重制' and specifically says it automatically calls the real MCP tool create_visual_migration_task. The actual code does not implement that specific workflow or constrain usage to that tool. Instead, it exposes a general mechanism to list tools and call any tool accessible through the IMIVA MCP service, based on user-supplied tool names and arguments. While using IMIVA MCP is consistent with the broader platform mentioned in the description, the code's primary purpose is materially broader than the declared specialized function.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest describes a narrowly scoped skill for '竞品构图参考重制' and specifically says it automatically calls the real MCP tool create_visual_migration_task. In code, the CLI can list all tools and invoke any tool name supplied by the user, which materially broadens behavior beyond the declared single-purpose workflow.

Context-Inappropriate Capability

Low
Confidence
88% confidence
Finding
Listing every tool available to the token is an administrative or exploratory capability, not an obvious requirement for performing the advertised composition-reference remaking task. This makes the skill act as a broader MCP client surface than the manifest's business-purpose description suggests.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
Line L054 states the skill is especially suitable for '中文用户', which imposes a language/locale preference in the skill's natural-language description. The file does not offer an alternative language option or explain why the capability must be limited to Chinese users.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The script emits user-facing error messages only in Chinese in its runtime checks, which imposes a specific language on all users. The file does not provide any opt-in, fallback language, or justification that this is a region-specific tool, so it conflicts with the language/locale policy criteria.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
npx = shutil.which("npx")
    if not npx:
        raise SystemExit("未找到 npx。请先安装 Node.js 18 或更高版本。")
    token = os.environ.get("MCP_TOKEN", "").strip()
    if not token:
        raise SystemExit("缺少 MCP_TOKEN。请在 IMIVA 的 MCP Token 页面创建后通过环境变量提供。")
    return npx, token
Confidence
70% confidence
Finding
Code accesses environment variables that may contain secrets (API keys, tokens). This is a common pattern for credential theft.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
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(
Confidence
60% confidence
Finding
Code accesses environment variables that may contain secrets (API keys, tokens). This is a common pattern for credential theft.

Static analysis

No suspicious patterns detected.