T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer API Key Can Be Transmitted over Plaintext HTTP Through an Unvalidated Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its image-generation purpose, but it handles an API key and can send it to an unvalidated custom API URL, so it needs review before installation.
Install only if you are comfortable giving this skill an AI Hive API key and uploading selected reference images to AI Hive. Keep the default HTTPS API endpoint, do not set AI_HIVE_BASE_URL or --base-url to an untrusted or http:// address, and avoid using the upload command on sensitive local files. Use a virtual environment and pinned dependencies where possible.
scripts/imagegen.py:91Bearer API Key Can Be Transmitted over Plaintext HTTP Through an Unvalidated Base URL
SKILL.md:82Runtime Dependency Is Installed Without Version or Integrity Pinning
The declared purpose is limited to GPT Image 2 image generation/editing, but the detected behavior includes chat, video generation, model enumeration, user-info/wallet queries, and browser/API initialization flows. This mismatch is dangerous because users and policy systems may authorize the skill for a narrow purpose while the implementation has access to broader and more sensitive functionality, enabling data exposure, unexpected charges, or capability abuse.
The skill invokes shell commands, performs network activity, and reads/writes files, but it does not declare any explicit tool scope or permissions. This creates an authority gap where reviewers and orchestrators cannot easily constrain what the skill is allowed to do, increasing the risk of unintended filesystem or network access if the underlying scripts are broader than the markdown suggests.
The description says to use this skill when users search terms such as "OpenAI image generation", "图片生成编辑", "AI修图", and "营销海报", which are broad, common request categories rather than narrowly scoped trigger phrases. It does not provide exclusion conditions or negative examples, increasing the chance of unintended invocation for generic image-editing conversations.
The natural-language instructions and examples are written entirely in Chinese, and the description does not indicate that users may choose another language or locale. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation unless the locale restriction is documented and justified.
The module docstring states that this tool wraps text chat, image generation, video generation, model queries, media upload, and task polling as a general AI capability caller. However, the manifested skill is specifically scoped to GPT Image 2 image generation and editing, so embedding broader text/video operations in the shipped skill code exceeds the described behavior at the semantic level.
This code embeds the primary skill description and many CLI prompts in Chinese, which effectively forces a specific language experience for all users. The file does not provide any user choice, locale negotiation, or justification that the skill is intentionally region-specific.
The skill manifest describes a tool for GPT Image 2 image generation and editing workflows, but the code implements a full text chat endpoint and command flow. Text chat is a distinct capability and is not necessary to perform the stated image-generation/editing purpose of this skill.
The manifest scopes the skill to GPT Image 2 and image-centric tasks such as generation, editing, compositing, background replacement, and posters. The presence of video generation support is a separate modality and is not justified by the stated purpose of an image-only GPT Image 2 skill.
This markdown file contains substantive user-facing natural language in Chinese across the changelog entries, but it does not indicate that the skill is Chinese-only or provide any user opt-in or language alternative. Under the language/locale policy rule, forcing a specific language without documented justification can be a policy violation.
The example API key value includes Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration content. For a general example config, this can violate language/locale neutrality when no opt-in or justification is provided.
The skill-specific parser describes itself as a GPT Image 2 image skill, yet it exposes generic operational subcommands such as raw media upload and task querying inherited from the broader utility. While these may support implementation, the inline CLI description presents a narrower intent than the available command surface.