T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:62- Finding
Bearer API Key Can Be Transmitted to an Arbitrary Configured Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This image-generation skill is mostly coherent, but it handles API keys and downloaded files in ways that could expose credentials or write outside the intended output folder.
Review this skill carefully before installing. Use it only with the official AI Hive endpoint, avoid custom --base-url or AI_HIVE_BASE_URL values unless you fully trust that endpoint, run it in a limited working account or container, and inspect output paths before opening downloaded files. A pinned dependency file and filename sanitization would materially reduce the risk.
scripts/imagegen.py:62Bearer API Key Can Be Transmitted to an Arbitrary Configured Endpoint
scripts/imagegen.py:399Server-Controlled Task Metadata Can Escape the Output Directory
SKILL.md:72Third-Party Dependency Is Installed Without Version or Integrity Pinning
The declared purpose says this is a Seedream 5.0 Lite image-generation skill, but the detected behavior reportedly includes broader AI Hive operations such as chat, video generation, user-info/wallet queries, model enumeration, and generic provider access. That mismatch is dangerous because operators may grant or invoke the skill under narrow expectations while the implementation can reach unrelated data and actions, expanding blast radius and enabling covert misuse.
The skill declares no explicit tool scope or permissions while instructing execution of a Python script that can use shell, filesystem, environment variables, and network access. This creates an unnecessary trust gap: users and the orchestrator cannot tell from the manifest what capabilities will be exercised, increasing the chance of over-privileged execution or unintended data exposure.
The manifest description says to use this skill when users search broad terms like '图片生成编辑' and '海报', which are generic image-generation and poster-related phrases rather than narrowly scoped invocations. Because no exclusion conditions or trigger constraints are provided, the skill may activate for ordinary image-editing requests that do not specifically call for Seedream 5.0 Lite or AI Hive.
The natural-language content of the skill is entirely in Chinese, including the operative description and usage guidance, while the file does not state that the skill is region-specific or that users may choose another language. This can violate language or locale policy when users have not opted into Chinese output or instructions.
The file embeds a broad AI Hive client with text chat, video generation, model listing, upload, and task features even though the declared skill is an image-only Seedream 5.0 Lite skill. This capability mismatch expands the attack surface and enables use of unintended models or modalities if the script is invoked outside the narrow wrapper, undermining least-privilege and user expectations.
The module docstring presents the artifact as a general-purpose AI capability tool rather than a narrowly scoped Seedream 5.0 Lite image skill. In context, that is a security-relevant integrity issue because it signals and normalizes broader behavior than the skill metadata promises, making misuse and hidden capability exposure more likely.
This code file contains natural-language descriptions and CLI help text exclusively in Chinese, beginning with the module docstring and continuing throughout the script. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is documented and justified, which is not present here.
This markdown file contains substantive skill-related documentation entirely in Chinese, including capability descriptions and operational notes. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation when no locale justification or language alternative is provided.
The placeholder value 请替换为你的APIKey is written only in Chinese, which imposes a specific language in user-facing configuration content. There is no indication that the skill is region-specific or that users may choose another language, so this conflicts with the language/locale policy criteria.