T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
Configurable API endpoint can receive the bearer credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to support AI-HIVE media generation, but it needs review because it stores and uses an API key and can send that key to an unrestricted custom API endpoint.
Install only if you are comfortable giving this skill an AI-HIVE API key and uploading selected media to AI-HIVE. Keep the base URL on the official AI-HIVE endpoint, do not set `AI_HIVE_BASE_URL` or config `base_url` to an untrusted host, and prefer running it in an isolated environment with a revocable API key.
scripts/imagegen.py:92Configurable API endpoint can receive the bearer credential
scripts/videogen.py:92Configurable video API endpoint can receive the bearer credential
SKILL.md:116Unpinned third-party dependency installation
If the actual implementation exposes materially different capabilities than the declared short-drama/previs workflow—such as generic chat, model enumeration, user-info queries, or image-only operations—users and hosts may authorize the skill under false assumptions. Capability misrepresentation is dangerous because it undermines informed consent and can mask broader data access or unintended API usage under a narrow business-facing description.
If the actual implementation exposes materially different capabilities than the declared short-drama/previs workflow—such as generic chat, model enumeration, user-info queries, or image-only operations—users and hosts may authorize the skill under false assumptions. Capability misrepresentation is dangerous because it undermines informed consent and can mask broader data access or unintended API usage under a narrow business-facing description.
The skill advertises executable workflows using shell, network, environment variables, and local file paths, but does not declare any explicit tool scope or permission boundaries. This creates an avoidable trust gap: a host may grant broader capabilities than users expect, enabling file access, outbound requests, or command execution without transparent least-privilege constraints.
The skill sets Chinese-only display names and descriptive content, and explicitly declares language: zh-CN in metadata. There is no indication that users may select another language or that the locale restriction is a documented, justified regional constraint, which can violate language/locale choice policy.
The skill enables implicit invocation with no visible trigger narrowing, so the assistant may auto-activate this skill in loosely related conversations. That can cause unintended routing of user requests, unnecessary exposure of user context to the skill, and unexpected execution of workflow guidance in situations where the user did not clearly opt in.
The file is packaged as a specific short-drama/animatic image-generation skill, but it embeds a broad generic API client with unrelated capabilities such as text chat, model enumeration, user-info lookup, media upload, and video generation. This expands the skill’s effective privilege and attack surface beyond the declared purpose, increasing the risk of misuse, unexpected data access, or policy bypass by callers who trust the manifest-scoped functionality.
The module docstring and all user-facing prompts/messages in this skill are written exclusively in Chinese, which imposes a language choice on users. The file does not offer an opt-in language selection or explain that the skill is intended only for a Chinese-speaking or region-specific context.
The skill exposes a user-info endpoint that can retrieve account information and wallet balance despite that capability not being necessary for animatic/previs generation. In a skill ecosystem, this violates least privilege and can leak sensitive billing/account metadata to callers or downstream agents that only expected media-generation behavior.
The generic text chat capability is unrelated to the manifest’s stated narrow purpose and allows arbitrary prompt forwarding to backend models. That creates a hidden general-purpose AI channel inside a specialized skill, which can be abused for unintended content generation, prompt/data handling outside expected workflows, or circumvention of product-level restrictions based on skill identity.
This code file contains user-facing natural-language descriptions and prompts entirely in Chinese, starting from the module docstring and continuing throughout CLI help and status text. That imposes a specific language on users without opt-in or an alternative locale, which matches the language/locale policy violation criteria.
The display name, description, and default prompt are all written in Chinese, which can impose a language expectation without any visible opt-in or explanation in the file. Under the language/locale policy, skills should offer a language choice or clearly justify a locale-specific constraint.
This code hardcodes the skill description and generated skill name in Chinese (for example, the module docstring, argparse description, and output metadata), with no option for the user to choose language or locale. The policy for this audit flags language-forcing behavior when a specific language is imposed without an explicit user choice or documented regional justification.
The top-level docstring and main parser description describe a '通用 AI 能力调用工具' that supports chat, image generation, video generation, model queries, uploads, and polling. Later, the file is packaged as a fixed-config image skill with title 'GPT Image 2 图片生成与编辑', so the embedded documentation describes a much broader tool than the behavior exposed by the skill entrypoint and branding.