Back to skill

Security audit

AI眼镜试戴效果图|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with AI-HIVE eyewear image generation, but it needs review because its API client can send a bearer key to a configurable server and downloads unchecked result files.

Review before installing. Use only the official AI-HIVE base URL, keep the config file under your control, avoid running it in environments where untrusted parties can set AI_HIVE_BASE_URL or edit ~/.ai-hive/config.json, and monitor generated downloads for size and source. Do not provide API keys or sensitive images unless you trust the AI-HIVE account and workflow.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imagegen.py:96
Finding

Bearer API Key Disclosure Through a Caller-Controlled Base URL

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:289
Finding

Unbounded and Unvalidated Downloads From API-Supplied URLs

Content
View full analysis
0: pct = int(downloaded * 100 / total) ``` The download URL is taken directly from task data returned by the API: ```python for i, item in enumerate(succeeded): result_url = item.get("resultUrl") if not result_url: continue ext = ".mp4" if "video" in task_type.lower() else ".png" filename = f"{task_type}_{task_id}_{i+1}{ext}" out_path = out_dir / filename download_file(result_url, out_path) for item in succeeded: last_frame = item.get("lastFrameUrl") if last_frame: out_path = out_dir / f"{task_type}_{task_id}_lastframe.png" download_file(last_frame, out_path) ``` ### Technical Analysis Task result URLs are treated as trusted and passed directly to `requests.get()`. The downloader does not enforce: - An HTTPS-only policy. - An allowlist of approved object-storage hosts. - Restrictions on loopback, link-local, or private-network destinations. - A maximum response size. - A maximum number of downloaded bytes when `Content-Length` is missing or false. - Expected image or video content types. - File signature validation. - Cleanup of partially downloaded files after a network or v ...[truncated 1819 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared behavior promises AI-HIVE OpenAPI interactions, image uploads, pricing checks, routing, polling, and downloadable try-on outputs, but the described runnable example appears to produce only a generic blueprint/init flow. This kind of description-behavior mismatch is dangerous because downstream systems or users may grant trust, permissions, budget, or data access based on capabilities the skill does not actually implement or validate, increasing the chance of unsafe misuse and deceptive operation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file is presented as an eyewear try-on preview skill, but the implementation exposes a broad AI Hive client with chat, video, model enumeration, account inspection, upload, and generic generation flows. This expands the skill far beyond its declared purpose, increasing attack surface and enabling misuse through capability confusion, unauthorized feature use, or policy bypass via the bundled generic interface.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises runnable commands that use environment variables, local files, network access, and shell execution, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, that mismatch can lead to over-broad capability exposure, making unintended file access, network requests, or command execution more likely if the skill is invoked or extended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

Natural-language policy violations apply to all file types, including markdown. The description is written as a Chinese-only invocation and workflow description, and the example inputs and outputs do not indicate that users may choose another language or locale.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

For markdown files, vague activation triggers should be flagged when they are broad enough to match many ordinary requests. The phrase "眼镜广告" could refer to general ad strategy, copywriting, media buying, or design work beyond AI try-on preview generation, making invocation boundaries unclear.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default prompt hard-codes 'production-ready Chinese workflow', which can override or conflict with a user's preferred language. This is a prompt-quality and trust issue because it may cause unexpected behavior, reduce usability, and make downstream review harder, but it does not by itself create direct code execution or data exfiltration risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python skill presents its top-level docstring, CLI help text, status messages, and initialization guidance entirely in Chinese, which imposes a language/locale requirement through natural-language strings. The file does not offer an opt-in language selection or document that the skill is intentionally restricted to a Chinese-speaking or China-specific context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Querying user account information and wallet balance is unnecessary for generating eyewear try-on previews and exposes extra authenticated functionality. Even if not directly harmful by itself, it leaks sensitive operational/account metadata and broadens the blast radius if the skill is invoked in an untrusted or over-permissioned context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The chat capability is unrelated to the stated image try-on use case and gives users a general-purpose text/multimodal channel through the same authenticated client. In a constrained skill environment, this can be abused to perform actions outside approved scope, route sensitive images/prompts to unintended models, or bypass governance tied to the advertised function.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Generic video-generation support materially exceeds the declared eyewear try-on image-preview function and allows creation of broader media outputs using uploaded images, audio, and video. That scope expansion increases misuse potential, including producing unauthorized synthetic media or bypassing controls that would otherwise limit the skill to static product-preview imagery.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This Python file contains user-facing natural-language strings in Chinese, including the module docstring, argparse description, and skill name, with no indication that other languages are supported. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a policy violation when no choice or justification is provided.

Content

No source excerpt is available for this finding.