T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
API Key Disclosure Through an Unrestricted Custom Base URL in the Image Generation Client
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill openly supports AI-HIVE image and video generation, but its API-key handling and result downloads create review-worthy risks before installation.
Install only if you are comfortable giving this skill an AI-HIVE API key and letting it upload selected media, submit potentially billable generation jobs, and download results. Do not use a custom base URL unless you fully trust that endpoint, keep the API key scoped and revocable, use a dedicated output directory, and prefer an isolated Python environment with pinned dependencies.
scripts/imagegen.py:92API Key Disclosure Through an Unrestricted Custom Base URL in the Image Generation Client
scripts/videogen.py:92API Key Disclosure Through an Unrestricted Custom Base URL in the Video Generation Client
scripts/imagegen.py:399Path Traversal Through Server-Controlled Task Metadata in Image Result Downloads
scripts/videogen.py:399Path Traversal Through Server-Controlled Task Metadata in Video Result Downloads
SKILL.md:119Unpinned Third-Party Dependency Installation
This finding reflects the same core issue from the video side: the skill's declared role is content-planning and dialogue assistance, but the documented behavior centers on video generation workflows, task management, and local API-key setup. Such hidden breadth increases risk of unintended external calls, credential handling, and billable actions under the guise of a simpler advisory tool.
This finding reflects the same core issue from the video side: the skill's declared role is content-planning and dialogue assistance, but the documented behavior centers on video generation workflows, task management, and local API-key setup. Such hidden breadth increases risk of unintended external calls, credential handling, and billable actions under the guise of a simpler advisory tool.
The file’s implementation is materially broader than the declared skill purpose: it exposes generic AI Hive account access, model enumeration, media upload, image/video generation, and task polling. This mismatch is dangerous because users or higher-level agents may grant trust and permissions based on the manifest’s narrow drama-dialogue description, while the code actually enables unrelated networked capabilities and broader data handling.
The embedded fixed configuration clearly implements a GPT Image 2 image-generation/editing skill, contradicting the declared short-drama dialogue/voiceover purpose. In a skill ecosystem, this kind of capability substitution can mislead users and orchestration layers into invoking a tool with very different behavior, data flow, and cost/exfiltration characteristics than expected.
The skill advertises and demonstrates shell execution, environment-variable use, filesystem access, and networked API interactions, but it does not declare any explicit tool scope such as allowed tools or permissions. This creates an authorization and review gap: consumers and policy enforcers cannot reliably tell what the skill is permitted to do, increasing the chance of over-broad execution in environments that honor metadata-based restrictions.
The manifest sets language: zh-CN, and the skill content is presented entirely in Chinese, but there is no indication that users may choose another language or that the restriction is required for a region-specific compliance reason. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation.
This Python file contains multiple natural-language strings indicating the skill is specifically for '短剧台词旁白' and related Chinese-language content, but it does not offer any user opt-in or language selection. Under the policy, forcing a specific language or locale without user choice is a natural-language policy violation unless clearly justified as region-specific.
This Python skill’s top-level docstring and nearly all CLI prompts, status messages, and help text are written exclusively in Chinese, which imposes a specific language/locale on users. The file does not provide any opt-in, alternative locale, or documented justification for restricting interaction to Chinese.
The code includes a user-info endpoint that can inspect account details and wallet/balance information, which is unrelated to the claimed drama-dialogue use case. Even if not directly destructive, exposing unnecessary account introspection expands the accessible sensitive surface and violates least-privilege expectations for a narrowly scoped creative-writing skill.
The file provides generic video-generation support despite the manifest framing this as a dialogue/voiceover helper and the embedded fixed skill being image-oriented. Extra media-generation pathways increase operational scope, potential abuse surface, and unexpected cost or content-generation risk when the skill is trusted for a narrower function.
The file presents itself as a short-drama dialogue/voiceover skill, but the implementation is a broad AI Hive client supporting chat, model enumeration, uploads, image generation, video generation, task polling, and account-related operations. This capability mismatch expands the attack surface and can mislead users or higher-level agents into granting trust or permissions to a tool that does far more than its declared purpose.
The file-level docstring and nearly all user-facing prompts/help text are written only in Chinese, which imposes a specific language on users without any opt-in or alternative locale path. The policy explicitly calls out language or locale constraints as violations when the skill does not offer choice or document a justified regional limitation.
The embedded SKILL_CONFIG advertises a short-drama video generator, which conflicts with the outer skill metadata describing dialogue/voiceover planning. Such internal-external identity drift is dangerous because it obscures the tool's actual behavior and may cause agents or users to invoke video generation and media upload capabilities they did not intend to authorize.
The placeholder value for api_key includes Chinese text (请替换为你的APIKey), which imposes a specific language in user-facing configuration content. The file does not offer an alternative language or indicate that the locale is intentionally region-specific.
The skill includes a dedicated user-info API call and CLI command to retrieve user information and wallet balance. For a skill framed around helping generate short-drama dialogue, narration, and content structure, exposing account-status retrieval is not an obvious functional requirement.
The code exposes generic model enumeration across TEXT, IMAGE, and VIDEO model types, enabling discovery of the provider's full model catalog. A purpose-specific drama-dialogue/voiceover skill would typically use fixed or curated models rather than exposing broad platform exploration features.