T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Custom API Endpoint Can Expose Bearer Credentials and Uploaded Media
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent Douyin e-commerce image-generation skill, but it needs review because its configurable API endpoint can receive API keys and uploaded media without clear host scoping or warning.
Install only if you trust AI Hive and understand that prompts, selected product images, and the API key are sent to the configured service. Avoid custom base URLs unless you fully trust the host, protect ~/.ai-hive/config.json and AI_HIVE_API_KEY as credentials, and prefer installing dependencies in an isolated environment.
scripts/imagegen.py:91Custom API Endpoint Can Expose Bearer Credentials and Uploaded Media
SKILL.md:72Unpinned Dependency Installation Creates Supply-Chain Risk
This markdown file contains user-facing natural-language content exclusively in Chinese across the substantive changelog entries. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the restriction is explicitly documented and justified, which is not present here.
The skill invokes shell commands, installs a Python package, and runs a script that can use network, filesystem, environment, and shell capabilities, yet the manifest declares no explicit tool restrictions. That creates an overly broad execution surface where a caller or downstream runtime may grant more access than the skill actually needs, increasing the chance of unintended file access, network egress, or command execution abuse.
The description is broad enough to match many generic image-generation or editing requests, which can cause the agent to invoke this skill outside its intended e-commerce context. Overbroad routing is risky because the skill contains code execution paths and external dependencies, so unnecessary invocation expands exposure to its operational privileges.
The file is presented as a Douyin e-commerce image generation/editing skill, but its implementation exposes a broad generic AI Hive client with text chat, video generation, model enumeration, upload, and user-info functionality. This scope mismatch violates least-privilege expectations for a narrowly declared skill and increases the attack surface by giving downstream users capabilities they would not reasonably expect from the skill metadata.
The file’s user-facing description and operational prompts are written exclusively in Chinese, and the skill does not provide any opt-in or alternative locale handling. Under the policy rule for natural-language constraints, this is a language/locale restriction that is not justified as a region-specific tool in the file itself.
Retrieving user account and wallet information is unrelated to generating or editing e-commerce images and unnecessarily expands access to potentially sensitive billing data. In a skill context, this can enable unexpected data exposure or reconnaissance about the connected account without a business need tied to the advertised function.
The text chat capability is outside the declared purpose of e-commerce image generation/editing and creates an unnecessary general-purpose model interaction channel. That broader capability can be abused for unintended prompting, policy bypass attempts, or hidden data handling that users would not expect from an image-only skill.
Video generation is materially broader than the skill's stated image-generation/editing scope, especially in an e-commerce context where users may trust the skill to handle only still-image assets. Including video support enlarges the operational and abuse surface, including extra media ingestion paths and long-running generation workflows unrelated to the declared purpose.
The natural-language description is primarily in Chinese but includes an English imperative ("Use this skill for ...") and does not state any language preference or opt-in behavior. This can create a language-policy issue if the skill implicitly assumes or enforces a language presentation without user choice.
The placeholder string 请替换为你的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 appears to violate the language/locale policy criteria.
No suspicious patterns detected.