Back to skill

Security audit

微信小店 电商图片生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its image-generation purpose, but it handles API credentials and downloads with weak origin and path controls that users should review before installing.

Install only if you are comfortable giving this skill an AI Hive API key, uploading selected product/reference media to AI Hive, and saving generated outputs locally. Avoid custom base URLs unless you fully trust the endpoint, use a dedicated/revocable API key, and prefer a virtual environment with pinned dependencies.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:83
Finding

Configurable API Endpoint Can Receive the Bearer API Key

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:267
Finding

Server-Controlled Download URLs and Filenames Are Not Safely Validated

Content
View full analysis
0: pct = int(downloaded * 100 / total) bar = "█" * (pct // 5) + "░" * (20 - pct // 5) print( f"\r {bar} {pct}% ({downloaded // 1024}KB)", end="", flush=True, ) print() size_mb = downloaded / (1024 * 1024) print(f"[ok] {out_path} ({size_mb:.1f} MB)") except requests.exceptions.RequestException as e: print(f"\n[error] Download failed: {e}", file=sys.stderr) ``` ```python out_dir = Path(output_dir) out_dir.mkdir(parents=True, exist_ok=True) task_type = task.get("taskType", "task") 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, ou ...[truncated 2148 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:69
Finding

Dependency Installation Instruction Does Not Pin or Verify the Package

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing natural language almost entirely in Chinese, and it does not indicate that the language is optional or provide an alternative locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes shell commands, installs dependencies, accesses files, and likely performs network operations through imagegen.py, yet it declares no permissions or allowed-tools constraints. This creates an overbroad execution surface where an agent may run the skill with more capabilities than necessary, increasing the chance of unintended command execution, file access, or data exfiltration if the script or inputs are compromised.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description says "Use this skill for" followed by a long list of common ecommerce-image scenarios, but it does not define specific trigger phrases, scope limits, or exclusion conditions. This broad natural-language activation text could overlap with many ordinary requests about WeChat shop or social-media images and cause unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill content and examples are entirely in Chinese and centered on Chinese-platform usage, but there is no statement that language/locale is optional or user-selected. This can violate language/locale policy when a skill implicitly constrains outputs to a specific language without offering a choice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a narrowly scoped skill for generating and editing ecommerce images for 微信小店 and related channels. However, this file implements broad AI Hive capabilities including text chat and video generation, as stated in the module docstring and implemented by cmd_chat/cmd_video and corresponding API methods, which exceeds the described image-focused behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level docstring and user-facing guidance are written entirely in Chinese, and the CLI throughout the file uses Chinese-only prompts and messages. This imposes a specific language on users without any opt-in or alternate locale path, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill's stated purpose is creating and editing ecommerce imagery, but the code includes a get_user_info endpoint and a user-info command described as querying user information and wallet balance. Accessing account profile/billing data is not an obvious requirement for generating shop images and is unjustified by the manifest description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example API key placeholder uses Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration content. There is no indication that the skill supports multiple languages or that this locale choice is required for a region-specific purpose.

Content

No source excerpt is available for this finding.