T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer credential disclosure through an unvalidated API base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly an AI-HIVE media-generation helper, but it handles API credentials and includes broader, under-scoped behavior that users should review before installing.
Install only if you intend to use AI-HIVE for Chinese-language short-drama/media generation. Use a dedicated, revocable AI-HIVE API key, avoid setting custom base URLs unless you fully trust the endpoint, review any media before upload, and disable or constrain implicit invocation if your agent may handle unrelated private content.
scripts/imagegen.py:91Bearer credential disclosure through an unvalidated API base URL
The skill is branded as a domain-specific apocalypse short-drama tool, yet the underlying behavior appears to be a generic AI-HIVE/API client centered on image tooling and additional undeclared functions such as user-info retrieval, model enumeration, chat, upload, and API-key initialization. Such repackaging obscures the true attack surface and may trick users into exposing sensitive media, credentials, or permissions to a tool whose real capabilities exceed its stated niche purpose.
The skill is branded as a domain-specific apocalypse short-drama tool, yet the underlying behavior appears to be a generic AI-HIVE/API client centered on image tooling and additional undeclared functions such as user-info retrieval, model enumeration, chat, upload, and API-key initialization. Such repackaging obscures the true attack surface and may trick users into exposing sensitive media, credentials, or permissions to a tool whose real capabilities exceed its stated niche purpose.
The embedded SKILL_CONFIG and skill_main entrypoint implement a GPT Image 2 image-generation skill, which materially conflicts with the declared apocalypse short-drama/video-oriented metadata. This is a strong integrity and trust-boundary issue: users, reviewers, or policy layers may approve the skill based on one purpose while the shipped code routes prompts and files to a different model and service behavior.
The skill advertises executable scripts and operational workflows but does not declare any explicit tool scope or permissions boundaries, even though the referenced behavior implies environment access, file operations, networking, and shell execution. This creates an unnecessary trust gap: users or hosting platforms cannot easily determine what the skill may access, increasing the risk of over-privileged execution or unsafe invocation in an agent environment.
The skill’s display name, summary, description, and metadata explicitly fix the language to zh-CN, and the document is written entirely in Chinese without indicating any optional language selection. Under the stated policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified.
The display name, short description, and default prompt are written entirely in Chinese, which implies a fixed language experience for the skill. The file does not indicate that users may choose another language or that the locale restriction is intentional and justified for a region-specific use case.
The skill enables implicit invocation without any visible narrowing conditions, trigger constraints, or exclusions. That increases the chance the agent will auto-select this skill in unrelated contexts, causing unintended prompt/data flow into a third-party workflow and expanding the attack surface for misuse or overbroad activation.
The user-facing description and skill-identifying strings are entirely in Chinese (for example, the module docstring and argparse description), with no indication that users may choose another language. This can violate a language/locale policy when the skill imposes a single language by default without documented opt-in or justification.
The file contains a full generic AI Hive client with capabilities beyond the advertised short-drama/image-video use case, including text chat, user-info, and model enumeration. This capability mismatch can violate least-privilege expectations and enable unintended access to account metadata or broader API functions when a user believes they are invoking a narrowly scoped media-generation skill.
This code file contains user-facing natural-language descriptions, help text, and runtime messages in Chinese only. That imposes a specific language/locale on users without offering a language choice or documenting the constraint as region-specific, which matches the language-policy violation criteria.
The manifest describes a specialized skill for apocalypse/drama short-video creation and editing, but the file implements a broad '通用 AI 能力调用工具' including text chat, model listing, user info, image generation, and generic media upload. Those capabilities materially exceed the manifest's focused purpose rather than being necessary implementation details of a short-drama video skill.
This code file contains user-facing natural-language descriptions and prompts entirely in Chinese, including the module docstring and later CLI interaction strings, with no indication that the user can choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.
The example API key placeholder uses Chinese text ("请替换为你的APIKey"), which imposes a specific language in user-facing configuration content. The file provides no alternative language option or justification for a locale-specific constraint.
The skill-specific CLI exposes task and standalone upload subcommands, which let a caller inspect arbitrary generation tasks and upload media independently of creating the advertised short-drama output. While upload can support video generation, exposing it as an independent capability broadens the behavior beyond the manifest's stated end-user purpose.