T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:83- Finding
Configurable API Endpoint Can Receive the Bearer API Key
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/imagegen.py:83Configurable API Endpoint Can Receive the Bearer API Key
scripts/imagegen.py:267Server-Controlled Download URLs and Filenames Are Not Safely Validated
SKILL.md:69Dependency Installation Instruction Does Not Pin or Verify the Package
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.
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.
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.
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.
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.
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.
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.
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.