T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
API Credential Disclosure Through Arbitrary Base URL Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its advertised ad-creative purpose, but its network and credential handling are too broad and could leak an AI-HIVE API key or selected media if redirected or misconfigured.
Install only after reviewing the network risks. Use the default AI-HIVE URL, avoid untrusted AI_HIVE_BASE_URL or --base-url values, use a limited/rotatable API key, and assume any reference media you pass may be uploaded to the AI-HIVE workflow. The publisher should restrict trusted hosts, validate upload/download URLs, and add download size limits before this is treated as low-risk.
scripts/imagegen.py:91API Credential Disclosure Through Arbitrary Base URL Configuration
scripts/imagegen.py:266Unvalidated Server-Supplied URLs Control Media Uploads and Result Downloads
A skill presented as a specialized e-commerce ad-planning tool but implementing broader media/AI operations creates a privilege and expectation gap. In practice, such a gap can allow misuse for generic generation, external service consumption, or access to account/model data under the cover of a narrowly approved business function.
A skill presented as a specialized e-commerce ad-planning tool but implementing broader media/AI operations creates a privilege and expectation gap. In practice, such a gap can allow misuse for generic generation, external service consumption, or access to account/model data under the cover of a narrowly approved business function.
A skill presented as a specialized e-commerce ad-planning tool but implementing broader media/AI operations creates a privilege and expectation gap. In practice, such a gap can allow misuse for generic generation, external service consumption, or access to account/model data under the cover of a narrowly approved business function.
The skill advertises and includes runnable examples that rely on environment variables, local file access, shell execution, and network calls, but it does not declare any explicit tool scope or permissions boundary. This creates a confused-deputy risk where a host may grant broader capabilities than users expect, making it easier for the skill to read/write files, use secrets, or invoke external services without clear policy constraints.
Overly broad trigger conditions increase the chance that this skill activates for generic marketing or content requests that do not require its networked/media-generation capabilities. That can route unrelated user prompts into a more privileged workflow, increasing exposure of user data, chance of unintended external API use, and accidental billing or policy bypass.
The natural-language prompt explicitly requires a "production-ready Chinese workflow," which forces a specific language regardless of user preference. This is a locale/language policy issue because the file does not offer any opt-in choice or alternative language handling.
The file's user-facing natural language is entirely Chinese, including the module description, CLI description, skill name, search aliases, and required/artifact labels, but it does not state that the skill is China-region-specific or offer any language/locale choice. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.
The file presents itself as a narrowly scoped ecommerce ad-creative image skill, but actually embeds a much broader API client with chat, video generation, model listing, upload, and account-related operations. This scope mismatch violates least privilege and increases the chance that a caller or orchestrator will expose unintended capabilities, enabling misuse outside the advertised skill boundary.
This code file contains natural-language descriptions entirely in Chinese for the module docstring and later CLI help/output strings, with no indication that users can choose another language or locale. The policy explicitly disallows forcing a specific language without opt-in, and this file presents the skill as a general-purpose tool rather than a clearly region-specific one.
Including user-info retrieval and generic text-chat in an image-creative skill exposes unnecessary account and model interaction surfaces that are unrelated to the advertised task. In a skill ecosystem, these hidden extra capabilities can be abused to enumerate account details, consume credits, or route arbitrary prompts through a broader backend than users or reviewers expect.
The file presents itself as a narrowly scoped ecommerce ad-creative video skill, but the implementation exposes a generic AI utility covering chat, model enumeration, account lookup, upload, image generation, and video generation. This scope mismatch violates least privilege and increases the blast radius: any caller with access to the skill can invoke capabilities unrelated to the advertised purpose, including introspecting account data and using arbitrary models.
This code file contains prominent natural-language descriptions and CLI output in Chinese, beginning with the module docstring and continuing through user prompts. Because the skill does not offer a language/locale option or justify a China-specific locale constraint, it conflicts with the policy against forcing a specific language without user opt-in.
The skill includes a user-info endpoint that retrieves account information and wallet balance, which is unrelated to generating ecommerce ad creatives. Even if the data is only printed locally, exposing billing/account metadata through an over-broad skill can leak sensitive operational information to unauthorized users or downstream tooling.
The skill exposes a generic text chat method that accepts arbitrary prompts, optional system prompts, images, and model IDs, which is materially broader than a fixed ad-creative video studio workflow. In context, this turns the skill into a general-purpose LLM gateway, enabling prompt injection, policy bypass attempts, and unintended use of the account's API quota outside the declared purpose.
The description defines usage entirely through Chinese trigger phrases and Chinese-language task framing, with no indication that other languages are supported or that the user can choose a locale. This can amount to an implicit language constraint without user opt-in.
The ability to enumerate all available models is broader than necessary for a skill that already has fixed configured model mappings in SKILL_CONFIG. While model listing is not as sensitive as account data, it reveals platform capabilities and can facilitate misuse of other exposed generic operations by helping users select unintended models.
No suspicious patterns detected.