T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer API Key Disclosure Through an Unrestricted Base URL Override
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE footwear image workflow, but it has review-worthy security issues around API-key handling and downloaded file writes.
Review before installing. Use only with a dedicated AI-HIVE key, do not set `--base-url` or `AI_HIVE_BASE_URL` unless you fully trust the endpoint, keep generated downloads in a disposable output directory, and confirm all billable generation parameters before running. Consider rotating any API key previously used with an untrusted base URL.
scripts/imagegen.py:91Bearer API Key Disclosure Through an Unrestricted Base URL Override
scripts/imagegen.py:399Path Traversal and Arbitrary File Overwrite Through Server-Controlled Download Names
SKILL.md:67Unpinned Third-Party Dependency Installation
The declared description promises a full AI鞋履试穿 capability and explicitly mentions operational API behaviors for generating assets. The supplied code does not perform any of those core functions. It only creates a static production brief in JSON from command-line arguments. While the brief may be a supporting preproduction artifact related to the domain, the primary behavior is materially narrower and different from the declared skill purpose, so this is a mismatch.
The skill includes executable code examples that use environment variables, local files, shell commands, and network access, but it does not declare any tool scope or permissions boundaries. This creates an authorization gap where an agent or reviewer may not clearly understand what capabilities the skill expects, increasing the risk of over-privileged execution, accidental secret exposure, or unintended external calls.
The default prompt hard-codes Chinese output without checking the user's language preference or obtaining opt-in. While not a direct code-execution issue, this can degrade user understanding of generated workflow steps and runnable commands, increasing the risk of user error, mistaken approval, or unsafe execution of API-related actions in a language they did not request.
The manifest enables implicit invocation without any visible trigger scoping, narrowing conditions, or safety constraints. In a skill that can generate runnable AI-HIVE commands and initiate media-generation workflows, broad auto-invocation increases the chance the agent activates in unintended contexts, potentially causing unauthorized API actions, unnecessary cost, or processing of sensitive/unauthorized images.
The file header and implementation clearly indicate this script is a general-purpose AI Hive OpenAPI client supporting chat, image, video, model enumeration, upload, and task polling, while the manifest presents it as a narrow footwear try-on preview skill. This capability overreach violates least privilege for skills and can let a caller use the skill as a broader AI gateway than intended, expanding abuse surface and policy bypass opportunities.
The file’s natural-language interface, descriptions, prompts, and user-facing messages are written entirely in Chinese, including the module docstring and command help text. There is no indication that the skill is region-specific or that users may opt into another language, which can violate language/locale policy for general-purpose skills.
Text chat is a broad, open-ended capability unrelated to a constrained footwear try-on preview skill. It can be repurposed for arbitrary model interaction, prompt handling, and multimodal input processing outside the declared business scope, making the skill a covert general AI access path.
Generic video generation falls outside the stated purpose of a footwear try-on image-preview skill and materially broadens what users can do through the integration. This increases operational risk, content-policy evasion opportunities, and cost exposure by enabling a different media modality than the manifest promises.
The docstring, argparse description, and embedded skill name are all presented only in Chinese, with no indication that users can select another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.
The skill exposes a user-info endpoint that returns account and wallet-related information not described in the footwear try-on manifest. Even if low impact, this unnecessarily grants access to account metadata and billing context unrelated to the skill's stated purpose, increasing information exposure and reconnaissance value.