T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer API Key Disclosure Through an Unvalidated Custom Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is broadly aligned with AI-HIVE image/video asset creation, but it needs review because its scripts handle API keys and downloaded files in ways that can expose credentials or overwrite unintended local paths.
Install only if you trust the publisher and AI-HIVE account workflow. Use a scoped, revocable API key, do not set --base-url or AI_HIVE_BASE_URL to any untrusted host, prefer a dedicated output directory, consider using --no-download until path handling is fixed, and review/confirm any automatic invocation that could upload media or incur generation costs.
scripts/imagegen.py:91Bearer API Key Disclosure Through an Unvalidated Custom Base URL
scripts/imagegen.py:398Path Traversal Through Server-Controlled Download Filenames
SKILL.md:115Unpinned Third-Party Dependency Installation
The declared description promises a full AI-assisted creative production capability for short-drama posters, cover art, title logos, and downstream video generation using AI-HIVE infrastructure. However, the supplied code only builds a static JSON blueprint from CLI arguments. Its actual purpose is pre-production brief creation, not asset generation or platform orchestration. This is a material mismatch in primary functionality and claimed capabilities, even though the blueprint content is related to the same domain.
The description presents a domain-specific creative skill focused on short-drama cover posters, logos, storyboards, and related visual assets. However, the supplied code implements a broad command-line client for AI-HIVE OpenAPI with multiple general-purpose capabilities: querying account/user info, listing available models, text chat, image generation, video generation, uploading media, polling tasks, and downloading results. The generated skill wrapper at the bottom is also not short-drama-specific; it is fixed to a generic GPT Image 2 image generation/editing model and accepts arbitrary prompts. While some declared functionality overlaps with image/video generation, the code’s actual primary purpose is materially broader and more generic than the declared specialized creative workflow.
The description centers on short-drama cover/poster/title-logo visual asset creation for writers, studios, brands, and ad teams. While it mentions AI-HIVE can also generate video, the supplied code chunk's skill-specific behavior is mainly for video generation (short-drama-video) using predefined video models, plus upload and task management. The file also contains a broader generic AI-HIVE client exposing unrelated capabilities such as text chat, model listing, and user info retrieval. Therefore the actual primary purpose and exposed capabilities do not accurately match the declared focus on poster/logo/cover asset generation.
The file is presented as a specialized short-drama cover/poster/logo image skill, but it embeds a broad general-purpose API client with user-info, model enumeration, chat, upload, image, and video capabilities. This scope mismatch increases attack surface and can let a caller perform actions unrelated to the declared skill, undermining least privilege and user trust.
Without declared permissions the skill's intent is opaque and cannot be validated.
The skill enables allow_implicit_invocation without any visible trigger constraints, scope limits, or exclusion conditions, which means the agent may invoke this skill automatically in situations the user did not explicitly request. Because this skill can drive asset-generation workflows and route requests through external model infrastructure, unintended invocation could cause unauthorized actions, prompt/context leakage to external services, unnecessary cost, or confusing execution in unrelated conversations.
The module docstring advertises a general-purpose AI capability tool, which conflicts with the specialized wrapper/manifest identity. This discrepancy is dangerous because reviewers and users may approve or invoke the skill based on a narrow description while the implementation supports materially broader operations.
This code file contains user-facing natural-language descriptions and prompts in Chinese, including the module docstring and later CLI help/output strings, but does not provide users a language or locale choice. That can violate language/locale policy when the skill is not explicitly documented as Chinese-only or region-specific.
Including text-chat capability in an image/poster/logo skill creates unauthorized functional expansion beyond the declared purpose. In a skill ecosystem, hidden extra capabilities can be abused by downstream tooling or prompts to exfiltrate data to unrelated endpoints or invoke billable operations the user did not intend.
The code contains generic video-generation support despite the skill being framed as a poster/logo image tool. This broadens the operational surface to a more expensive and unrelated modality, enabling misuse, unexpected content processing, and policy bypass through capabilities not obvious from the skill identity.
The file presents itself as a specialized short-drama cover/poster/logo skill, but the implementation exposes broader capabilities including generic chat, model enumeration, user-info retrieval, and arbitrary media upload. This capability mismatch increases the attack surface and can mislead users or calling platforms into granting trust, credentials, or permissions that are unnecessary for the advertised purpose.
The module docstring explicitly describes a generic AI capability tool, which conflicts with the narrower manifest and branding of a specialized creative skill. This inconsistency is dangerous because it obscures the true operational scope of the code, making overbroad behavior harder for users, reviewers, and policy systems to detect or constrain.
The module docstring presents the skill description entirely in Chinese, and user-facing prompts/messages throughout the file are also Chinese-only. This creates a language policy concern because the skill appears to assume a fixed locale rather than offering users a choice or documenting that it is intentionally region-specific.
The manifest sets metadata.language: zh-CN, which indicates a fixed language/locale preference. The file does not mention any user choice, opt-in, or multilingual alternative, so this may violate the policy against forcing a specific language without user consent.
The file’s user-facing description and generated metadata are entirely in Chinese (for example the docstring, argparse description, and skill name), which imposes a language choice without any opt-in or alternative. Under the policy rule, a fixed language requirement can be a natural-language policy violation unless the locale constraint is explicitly documented and justified.
The skill can query user account and wallet/balance information even though the advertised purpose is creative asset generation. While this is not code execution, it exposes sensitive account metadata beyond user expectations and creates unnecessary privacy and financial-information access in a narrowly scoped skill.