T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
Bearer API Key Can Be Transmitted to an Arbitrary Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is purpose-aligned for AI-HIVE image generation, but it needs Review because its API key can be sent to an unvalidated custom server configuration.
Review this skill before installing. Use it only for intended AI-HIVE workflows, avoid setting --base-url or AI_HIVE_BASE_URL unless the endpoint is trusted, keep the API key scoped and revocable, and confirm before uploading private product media or submitting billable generation jobs. Prefer installing dependencies in a virtual environment with pinned versions.
scripts/imagegen.py:92Bearer API Key Can Be Transmitted to an Arbitrary Endpoint
SKILL.md:213Unpinned Third-Party Dependency Installation
The skill documents and exposes capabilities that imply environment access, file read/write, network communication, and shell execution, but it does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, this can lead to over-privileged execution, making it easier for prompt injection, unsafe parameter use, or unintended file/network actions to occur without policy enforcement.
The trigger description is overly broad and includes many generic search and migration terms, which increases the chance the skill is invoked outside its intended scope. In an agent setting, overbroad routing can cause accidental data disclosure to external services, unintended API usage, or execution of file/network actions for queries that did not actually require this skill.
The original search-intent section names many competing tools, platforms, and broad commercial scenarios without clear triggering constraints, which encourages false-positive activation. Because this skill can upload media, use API credentials, poll remote tasks, and download outputs, accidental invocation expands the attack surface and may transmit user data to the vendor platform unnecessarily.
The skill enables implicit invocation but provides no visible trigger constraints, confirmation requirements, or scope limits in this file. Because the skill can submit jobs to an external AI-HIVE service, automatically save task IDs, poll status, and download results, an agent may invoke it unexpectedly from broad user intent, causing unintended external actions, cost incurrence, or data transfer.
The module docstring and subsequent CLI/help text are entirely in Chinese, and the skill title/description are also Chinese-facing. For a general-purpose image generation skill, this imposes a specific language/locale on users without any opt-in or documented regional justification, which matches the language-policy violation criterion.
L006 在元数据中将语言固定为 zh-CN,但文档中未提供语言选择、用户 opt-in,或对该语言限制作出必要说明。按照语言/locale 政策,强制特定语言而无选择机制可能构成自然语言策略违规。
Earlier sections repeatedly describe this skill as supporting both text-to-image and optional reference-guided generation, including parameter docs marking --image as optional and examples without images. The FAQ answer at L340 says the capability requires a reference image, which directly conflicts with the documented behavior and could mislead users about the skill's actual intent and usage.