T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
API Bearer Token Disclosure Through an Unrestricted Custom Base URL in the Image Client
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches a creative AI-HIVE image/video workflow, but it has enough under-scoped credential and endpoint behavior that users should review it before installing.
Install only if you intend to use AI-HIVE and are comfortable providing an AI-HIVE API key and uploading selected media. Do not set `AI_HIVE_BASE_URL` or `--base-url` to any untrusted endpoint, use a limited/revocable API key if possible, and prefer installing dependencies in an isolated environment with pinned versions.
scripts/imagegen.py:91API Bearer Token Disclosure Through an Unrestricted Custom Base URL in the Image Client
scripts/videogen.py:91API Bearer Token Disclosure Through an Unrestricted Custom Base URL in the Video Client
SKILL.md:119Unpinned Third-Party Dependency Installation
The English restatement of the same finding points to the same core issue: the skill presents itself as a specialized visual-design assistant while exposing general-purpose AI and platform operations beyond that stated role. A specialized wrapper around a general OpenAPI caller is dangerous when the broader capabilities are not transparent, because it can be used to perform actions users and reviewers did not expect.
The English restatement of the same finding points to the same core issue: the skill presents itself as a specialized visual-design assistant while exposing general-purpose AI and platform operations beyond that stated role. A specialized wrapper around a general OpenAPI caller is dangerous when the broader capabilities are not transparent, because it can be used to perform actions users and reviewers did not expect.
The embedded skill metadata materially conflicts with the published manifest, advertising GPT Image 2 product/ad image generation instead of drama costume styling. In a skill ecosystem, this kind of scope deception can mislead users into invoking unexpected external model endpoints and broader capabilities than intended, weakening trust boundaries and review assumptions.
The skill documentation advertises executable scripts that use shell, network, file, and environment access, but the manifest does not declare any tool scope or allowed-tools boundary. That creates an undeclared capability gap: a reviewer or platform may treat the skill as narrowly scoped content guidance while it can actually invoke privileged local and remote operations.
The skill says it applies when a user says phrases like “短剧服装、角色造型、造型设定、服化道、costume design,” which are broad topical terms rather than specific invocation conditions. The document does not provide negative examples or clear limits on when the skill should not activate, increasing the chance of unintended matching in ordinary creative discussions.
The default prompt is phrased broadly enough that the platform may invoke this skill for loosely related requests about short dramas, styling, or visual asset generation without strong user intent. That can cause over-triggering, unintended data sharing with the skill, and workflow confusion, especially because the skill is positioned as an end-to-end planning and generation assistant.
Implicit invocation is enabled with no scoping rules, exclusions, or context gating, so the skill may activate in conversations where the user did not clearly request this specialized tool. In a skill that can coordinate model usage, asset handling, and downstream generation workflows, this increases the chance of unintended invocation and unnecessary exposure of user content or task context.
This Python file contains multiple user-facing natural-language strings entirely in Chinese, including the module description, CLI description, skill name, category, and search aliases. Under the policy rule, forcing a specific language without user opt-in is a locale-policy issue unless the regional constraint is clearly documented and justified, which is not present here.
The manifest describes a domain-specific skill for turning short-drama character, scene, plot, and brand requirements into reusable visual assets for costume styling workflows. However, this file implements a broad CLI for generic AI Hive capabilities including text chat, model listing, user info, media upload, image generation, video generation, task polling, and API-key initialization, without any costume/drama-specific logic or constraints.
The module docstring presents the skill description only in Chinese, and the rest of the CLI help and prompts follow the same pattern. This imposes a specific language on users without any visible opt-in or alternative locale, matching the language/locale policy violation criteria.
The manifest emphasizes converting character, scene, plot, and brand requirements into reusable visual assets and subsequent video generation. This file additionally exposes a generic text chat endpoint with arbitrary prompts and optional images, which is a broad LLM capability not clearly justified by the skill's stated specialized styling purpose.
The file is presented as a specialized short-drama/costume/video skill, but the implementation and docstring expose a broad generic AI Hive client with chat, image, video, model discovery, upload, and polling capabilities. This violates least privilege and creates capability drift: a user or orchestrator expecting a narrowly scoped skill could invoke unrelated platform functions, increasing the attack surface and enabling unintended data access or cost-incurring actions.
The module docstring explicitly describes a generic AI Hive capability tool, contradicting the manifest’s specialized costume-styling/short-drama intent. This kind of scope mismatch is dangerous because security controls, review assumptions, and user consent may be based on the manifest, while the code silently offers much broader functionality.
The module docstring and all user-facing CLI guidance are written exclusively in Chinese, establishing a fixed language/locale for the skill. The file does not indicate any user opt-in or alternative language support, which conflicts with the policy against forcing a specific language without user choice.
The code includes a user-info endpoint that retrieves account information and wallet balance, which is unrelated to a costume-styling/video-generation skill. Exposing account inspection inside a creative skill can leak sensitive billing/account metadata to callers or downstream agents that should only have generation capability.
The metadata sets language: zh-CN, which can indicate a fixed language/locale expectation. The file does not state that users may choose another language or that this locale restriction is required for a region-specific compliance reason.
The code exposes a user-info capability, and the CLI help explicitly states it queries user information and wallet balance. Accessing account profile and billing data is not an obvious requirement for a skill whose stated purpose is generating short-drama costume styling assets.
Unrestricted model listing and discovery are broader than the advertised narrow creative workflow and can expose internal platform capabilities, routing modes, and available models to unauthorized or unintended callers. While not directly a code-execution flaw, it increases reconnaissance value and helps users pivot from the intended use case into other platform features.