T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
API Credential Disclosure Through an Unrestricted Custom Base URL in imagegen.py
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for AI-HIVE media and content planning, but it handles API keys in a way that can send them to arbitrary configured endpoints and should be reviewed before install.
Review this skill before installing. Use it only with the official AI-HIVE endpoint unless you fully trust a custom endpoint, and do not set `AI_HIVE_BASE_URL` or `base_url` to an untrusted host because your API key will be sent there. Prefer a dedicated, revocable API key, rotate it if exposed, and avoid running downloads from untrusted task results.
scripts/imagegen.py:91API Credential Disclosure Through an Unrestricted Custom Base URL in imagegen.py
scripts/videogen.py:91API Credential Disclosure Through an Unrestricted Custom Base URL in videogen.py
scripts/imagegen.py:312Unvalidated Remote Download URLs and API-Controlled Output Paths in imagegen.py
scripts/videogen.py:312Unvalidated Remote Download URLs and API-Controlled Output Paths in videogen.py
SKILL.md:124Unpinned Third-Party Dependency Installation
If the skill supports general chat, wallet/account information retrieval, model enumeration, direct media upload, video generation, and local credential setup, that is materially broader than the stated optimization/planning role. Such mismatch can mislead users into exposing credentials or authorizing actions they did not anticipate, especially where local key storage and external API use are involved.
If the skill supports general chat, wallet/account information retrieval, model enumeration, direct media upload, video generation, and local credential setup, that is materially broader than the stated optimization/planning role. Such mismatch can mislead users into exposing credentials or authorizing actions they did not anticipate, especially where local key storage and external API use are involved.
If the skill supports general chat, wallet/account information retrieval, model enumeration, direct media upload, video generation, and local credential setup, that is materially broader than the stated optimization/planning role. Such mismatch can mislead users into exposing credentials or authorizing actions they did not anticipate, especially where local key storage and external API use are involved.
The file implements a broad AI-Hive CLI for account access, model enumeration, media upload, task polling, and image/video generation, while the declared skill purpose is GEO/content-planning assistance. This mismatch is dangerous because it expands the skill's effective capability far beyond user expectations, creating a deceptive trust boundary and enabling data transfer and external service operations unrelated to the advertised function.
The skill advertises executable scripts that use shell, network, file, and environment capabilities, but it does not declare any tool scope or permissions boundaries. This increases the chance that an agent or reviewer cannot accurately constrain what the skill may access, leading to overbroad execution and accidental exposure of local files, secrets, or network actions.
The description says users can invoke the skill by saying broad phrases like “电商GEO、商品AI搜索、品牌收录、商品知识库,” but it does not define whether these are exact triggers, examples, or merely topic areas. Because these are common business-topic phrases rather than narrowly scoped commands, the skill risks unintended activation in ordinary discussion about ecommerce or AI search.
The file's natural-language description and user-facing strings are entirely in Chinese, including the argparse description and skill metadata, with no indication that users may select another language or that the skill is limited to a Chinese-only region-specific workflow. This can violate a language/locale policy when a skill implicitly mandates a specific language without opt-in or documented justification.
The module docstring and all user-facing CLI messages are written only in Chinese, which imposes a language choice on users without offering an alternative or opt-in. Under the stated policy, forcing a specific language or locale without user choice is a natural-language policy violation.
The manifest describes a skill for helping teams decompose brand, e-commerce, GEO/AEO, storyboarding, and content-planning goals into executable plans and evidence fields, with AI-HIVE media support as an implementation aid. In this file, the exported skill entrypoint is a fixed image tool (gpt-image-2) that only exposes image generation, task query, upload, and API-key init behavior, with no code for planning, GEO optimization, brand knowledge structuring, or strategy decomposition.
This code embeds user-facing descriptions, help text, and operational guidance entirely in Chinese, beginning with the module docstring and continuing throughout the CLI UX. Because the skill does not offer an explicit language or locale choice, it imposes a specific language on users, which matches the natural-language policy violation criteria.
The code exposes infrastructure-style functions such as user/account info retrieval and model inventory access that are not justified by a GEO/content-optimization skill. Even if these are legitimate product APIs, bundling them into an unrelated skill increases the chance of unauthorized account probing, metadata leakage, and misuse of capabilities under false pretenses.
The interactive init flow opens a browser, guides the user through obtaining an API key, and stores the credential locally, despite the skill being described as business/content-planning assistance. This is dangerous because it normalizes credential collection and persistence in a context where users would not reasonably expect secret onboarding, increasing phishing-like risk and expanding compromise impact if the host is shared or the skill is repurposed.
The metadata sets the language to zh-CN, and the document consistently presents the skill as Chinese-only, without offering users a language or locale choice. This can violate language/locale policy when the skill is not clearly documented as region-specific or opt-in for Chinese output.
The placeholder value contains Chinese-only instructional text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration guidance. The file does not indicate that the skill is region-specific or provide an alternative language/locale option.
The codebase includes a user-info operation that retrieves user information and wallet balance from the AI Hive API. That capability is unrelated to the manifest’s stated purpose of GEO/content optimization for e-commerce brands and also unrelated to the concrete exported image-generation skill behavior in this file.