T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Arbitrary API Endpoint Configuration Can Expose Credentials and User Media
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches a short-drama AI-HIVE workflow, but it ships broad API-client code and unsafe network/download handling that users should review before installing.
Install only if you trust the AI-HIVE endpoint and are comfortable giving the skill an API key, uploading selected media, and writing generated files locally. Use a dedicated API key with limited balance, avoid custom base URLs unless you control them, run it in a virtual environment, and choose an output directory where accidental overwrites would not damage important files.
scripts/imagegen.py:91Arbitrary API Endpoint Configuration Can Expose Credentials and User Media
scripts/imagegen.py:395Server-Controlled Task Fields Can Cause Output Path Traversal
scripts/imagegen.py:312Unvalidated Result URLs Permit Unrestricted Downloads and Disk Exhaustion
SKILL.md:117Dependency Installation Instructions Use an Unpinned Package Version
This is effectively the same underlying issue as the other TP4 finding: the skill presents itself as a domain-specific writing/planning assistant but appears to implement broad OpenAPI-style client behavior and video-generation workflows. Such under-disclosure is dangerous because reviewers or users may underestimate the extent of remote actions, data transfer, and potential billing/account effects enabled by the skill.
This is effectively the same underlying issue as the other TP4 finding: the skill presents itself as a domain-specific writing/planning assistant but appears to implement broad OpenAPI-style client behavior and video-generation workflows. Such under-disclosure is dangerous because reviewers or users may underestimate the extent of remote actions, data transfer, and potential billing/account effects enabled by the skill.
The embedded SKILL_CONFIG repurposes the skill into GPT Image 2 product image generation/editing, which directly conflicts with the metadata describing a drama character-bible tool. This is dangerous because trust and authorization decisions may be made from the manifest, while the shipped code silently performs a different function, enabling capability smuggling and misleading users into providing prompts, files, or credentials to an unrelated service flow.
The file implements a broad AI Hive client with capabilities far beyond the declared skill purpose, including text chat, image generation, video generation, model discovery, task inspection, account queries, and arbitrary media upload. In a skill advertised as a short-drama character-bible tool, this scope mismatch creates a dangerous capability expansion: a caller expecting constrained functionality may unknowingly gain access to unrelated data access and content-generation operations.
The embedded SKILL_CONFIG explicitly rebrands the artifact as a short-drama video generation skill, which directly conflicts with the manifest describing a character-bible/人物设定 skill. This indicates the file is mispackaged or intentionally repurposed, making security review, policy enforcement, and user consent unreliable because the real behavior does not match the declared function.
The skill advertises executable scripts that use shell, network access, filesystem operations, and environment variables, but the manifest does not declare any tool scope or permission boundaries. This creates an opaque trust boundary where a user or hosting platform cannot easily determine what capabilities the skill will exercise, increasing the risk of unintended command execution, network access, or secret handling.
The manifest explicitly sets language: zh-CN, and the skill title, summary, description, and instructions are entirely in Chinese without any indication that users may choose another language. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.
The display name, short description, and default prompt are all written exclusively in Chinese, which imposes a language choice in the skill's natural-language interface. The file does not offer a language option or explain that the skill is intentionally limited to a Chinese-speaking or region-specific context.
The file implements a broad AI-Hive client with account info lookup, model enumeration, chat, media upload, image/video generation, and task polling, which materially exceeds the declared drama character-bible skill purpose. This over-broad capability creates a scope mismatch that can expose unrelated account operations and turn a narrowly trusted skill into a general API wrapper, increasing the chance of unauthorized or surprising actions if invoked by an agent or user expecting only character-bible functionality.
The module documentation advertises a generic AI capability tool, contradicting the skill's claimed specialized character-bible intent. While this is partly a transparency/integrity issue, in a security context it matters because operators and orchestration layers may trust the declared narrow scope while the code signals and implements broader behavior, undermining least privilege and increasing the risk of misuse.
This code file contains natural-language descriptions, prompts, and CLI help text in Chinese throughout, starting from the module docstring. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.
User-info retrieval exposes account-level metadata and wallet/balance information that is not necessary for a character-bible skill. Even if only the authenticated user can call it, bundling this endpoint into an unrelated skill increases the chance of unnecessary data exposure, misuse by downstream agents, and privilege creep under a misleading skill label.
Model enumeration provides a generic inventory of platform capabilities that is unrelated to the advertised character-bible purpose. In context, this makes the skill more dangerous because it acts as a discovery primitive for other powerful models and routes, enabling capability probing and repurposing of the skill beyond user expectations.
The example value 请替换为你的APIKey forces Chinese in a user-facing configuration string. This can violate language/locale policy when no user opt-in or documented locale-specific scope is provided.
The skill description and CLI metadata are entirely in Chinese, including the parser description and core labels, which effectively imposes a specific language context on users. The file does not offer a language choice or document that this is intentionally limited to a Chinese-language or region-specific workflow.
This code writes a JSON file to a user-specified path, which is a file-system modifying operation covered by the warning requirement for code files. Although the filename is configurable, there is no confirmation prompt and no nearby user-facing disclosure beyond printing the resulting path after the write; the module docstring also does not mention that it creates or overwrites a local file.