T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer Credential Disclosure Through an Unrestricted API Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent with AI-HIVE media generation, but its shipped clients handle API keys and media transfers without enough destination and file-safety controls.
Review this skill before installing if you will use real AI-HIVE credentials or sensitive media. Use only the official HTTPS AI-HIVE API endpoint, avoid custom base URLs unless you control them, upload only files you are willing to send to the provider, and prefer --no-download or a dedicated output directory until URL and filename validation are tightened.
scripts/imagegen.py:91Bearer Credential Disclosure Through an Unrestricted API Base URL
scripts/imagegen.py:280Unvalidated Server-Provided URLs Enable Arbitrary Outbound Requests and Unintended Media Transfer
scripts/imagegen.py:318Server-Controlled Output Names Permit Directory Traversal and Unbounded File Downloads
scripts/imagegen.py:7Unpinned Third-Party Dependency Installation
The manifest frames the skill as ingesting prior episodes, comments, and story constraints to produce creative planning outputs, but the observed capabilities include unrelated generic chat, image/video generation, account queries, browser/API-key setup, and other undeclared actions. Such under-disclosure breaks the trust boundary: an apparently safe planning skill may actually trigger external tooling, handle credentials, or interact with account resources beyond what the user reasonably authorized.
The manifest frames the skill as ingesting prior episodes, comments, and story constraints to produce creative planning outputs, but the observed capabilities include unrelated generic chat, image/video generation, account queries, browser/API-key setup, and other undeclared actions. Such under-disclosure breaks the trust boundary: an apparently safe planning skill may actually trigger external tooling, handle credentials, or interact with account resources beyond what the user reasonably authorized.
The manifest frames the skill as ingesting prior episodes, comments, and story constraints to produce creative planning outputs, but the observed capabilities include unrelated generic chat, image/video generation, account queries, browser/API-key setup, and other undeclared actions. Such under-disclosure breaks the trust boundary: an apparently safe planning skill may actually trigger external tooling, handle credentials, or interact with account resources beyond what the user reasonably authorized.
The skill advertises executable workflows that use environment variables, local file access, network calls, and shell commands, but it declares no explicit tool scope or permissions boundary. In agent environments, that omission can cause overbroad tool access, making it easier for prompts or downstream code paths to read secrets, modify files, or perform unintended external actions without a clearly constrained authorization model.
The activation list includes generic phrases such as “观众共创”, “互动剧情”, “连载短剧”, and broader intent descriptions like converting a reference case into original content or supporting multiple marketing/social scenarios. These triggers are not tightly constrained to this specific skill and may cause unintended invocation for users asking about general storytelling, co-creation, or marketing help.
The natural-language instruction in the manifest says to produce a "production-ready Chinese workflow," which imposes a specific language choice by default. The policy allows flagging locale or language constraints when the skill does not offer an explicit user choice or opt-in.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run(args: list[str]) -> None:
print(" ".join(args))
subprocess.run(args, check=True)
def main() -> None:
The file presents itself as a skill-specific image tool, but actually includes broad OpenAPI capabilities such as user-info lookup, generic chat, model enumeration, media upload, and video generation. This scope mismatch increases the chance that a caller or orchestrator grants the skill more authority than intended, enabling unintended data access or off-purpose actions through a supposedly constrained skill interface.
This Python skill uses Chinese-only natural-language descriptions and user-facing instructions, beginning with the module docstring and continuing throughout the CLI help text. Because the file does not offer any user language selection or document that it is intentionally limited to a Chinese-speaking context, it violates the language/locale policy requirement.
Providing unrestricted text chat in a skill advertised as a constrained short-drama/image workflow allows the skill to be repurposed beyond its declared boundaries. In an agent environment, that can bypass policy assumptions, leak uploaded media into unrelated prompts, or let users invoke a general-purpose model through a narrowly approved tool.
The file presents itself as a specialized short-drama/video skill, but the implementation is a broad AI Hive wrapper exposing chat, image generation, model listing, uploads, and task polling. This scope expansion defeats user and platform expectations, increasing the chance the skill is repurposed for unrelated or policy-violating tasks without additional review.
This Python file embeds its user-facing description, help text, prompts, and status messages almost entirely in Chinese, beginning with the module docstring and continuing throughout the CLI UX. The policy allows locale constraints only when users are given a choice or the restriction is clearly justified as region-specific; here, the skill does not offer a language option or state that Chinese-only operation is required.
The unrestricted text chat command allows arbitrary prompting against the provider, which is materially broader than the manifest's narrow short-drama continuation use case. In a skill ecosystem, this kind of hidden general-purpose capability can be abused to bypass intended task scoping, policy controls, or user expectations about what the skill is allowed to do.
The manifest description and title define usage entirely in Chinese and frame invocation around Chinese-language requests, but do not explicitly state whether other languages are supported or that Chinese is required by user choice. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy concern unless clearly justified.
The script hard-codes Chinese-language skill metadata and descriptions in user-facing strings, including the module docstring, argparse description, skill name, and search aliases. This imposes a specific language/locale without any opt-in or alternative, which matches the natural-language locale policy concern.
Exposing account/profile and wallet balance retrieval is unnecessary for a comment-driven short-drama image skill and expands the accessible data surface. Even if the data is limited to the authenticated user, it can reveal billing or account metadata that an invoking agent or downstream logs should not access under least-privilege principles.
The skill can call the user-info endpoint and the CLI advertises querying wallet balance, which is not part of generating comment-driven short-drama proposals, storyboards, or video assets. This capability is not justified by the manifest's stated purpose and looks like leftover generic API tooling.
Generic image generation is outside the declared video-centric, comment-driven short-drama workflow and creates unnecessary capability expansion. While not inherently dangerous, it increases misuse potential and weakens trust boundaries by allowing unrelated content generation through a specialized skill wrapper.
The code automatically creates the output directory and downloads generated files into it when task polling completes. Although an --output-dir argument exists, there is no confirmation prompt or explicit warning near the automatic write behavior to disclose that running generate will persist files locally unless --no-download is used.