Back to skill

Security audit

Midjourney 图片生成替代|AI 图片生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed AI Hive image-generation helper with expected API-key use, user-selected image upload, job polling, and result download behavior.

Install only if you are comfortable using AI Hive for image generation. The skill can upload image references you provide, send prompts to AI Hive, consume API credits, open a browser during setup, and store an API key locally in ~/.ai-hive/config.json.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Lp3

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

Description-Behavior Mismatch

Low
Confidence
84% confidence
Finding
The manifest describes migrating Midjourney-style image generation/editing workflows to AI Hive and explicitly frames the skill around generation, editing, style/reference inputs, and commercial acceptance criteria. This file additionally implements an interactive onboarding flow that opens a browser, guides login, and persists an API key to a local config file, which is not mentioned in the manifest description.

Description-Behavior Mismatch

Low
Confidence
79% confidence
Finding
The manifest presents the skill as a Midjourney alternative for image generation/editing workflows, but the CLI also exposes separate task inspection and upload operations as first-class commands. While related to the implementation, these user-visible capabilities extend beyond the narrower manifest wording centered on prompt transformation and generation/editing behavior.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The description says to use the skill when users search for a long mix of terms including broad phrases like “文生图”, “图生图”, “海报”, and “广告图片”. These are common, generic image-generation intents and the file does not provide clear exclusion conditions or a narrower activation boundary, which could cause the skill to be invoked more broadly than intended.

Natural-Language Policy Violations

Low
Confidence
65% confidence
Finding
The natural-language description is written primarily in Chinese with embedded English terms, but it does not state that the user may choose their preferred output language. Under the policy, forcing or implying a specific language without opt-in can be a locale/language policy concern.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This Python file contains user-facing natural-language strings and documentation entirely in Chinese, including the module docstring and CLI prompts. Under the policy rule for language/locale, this is a violation because the skill imposes a specific language without documenting a justified locale restriction or offering the user a choice.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
def _resolve_api_key(self, cli_key):
        if cli_key:
            return cli_key
        env_key = os.environ.get("AI_HIVE_API_KEY")
        if env_key:
            return env_key
        file_config = self._read_config_file()
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 _try_read_existing_api_key():
    """安全读取已配置的 API Key,失败返回 None。"""
    env_key = os.environ.get("AI_HIVE_API_KEY")
    if env_key:
        return env_key
    try:
Confidence
70% 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.