T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Configurable API Endpoint Can Expose Credentials and Private Media
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real AI-HIVE hairstyle preview helper, but it needs review because its API client can send API keys and user-selected media to configurable or unvalidated endpoints.
Install only if you trust AI-HIVE and are comfortable uploading authorized portrait/media files to its service. Use the default official HTTPS endpoint, avoid custom --base-url or AI_HIVE_BASE_URL values, protect ~/.ai-hive/config.json, and confirm prompts, routing, and cost before generation.
scripts/imagegen.py:91Configurable API Endpoint Can Expose Credentials and Private Media
scripts/imagegen.py:7Unpinned Third-Party Dependency Installation
A specialized media-editing skill that also exposes generic chat, video generation, account information access, model enumeration, and local API-key setup has a materially expanded capability surface beyond its declared role. That discrepancy can mislead security review and cause the skill to be invoked in contexts where it can access sensitive account metadata or perform unrelated actions, raising the risk of abuse and unintended data exposure.
A specialized media-editing skill that also exposes generic chat, video generation, account information access, model enumeration, and local API-key setup has a materially expanded capability surface beyond its declared role. That discrepancy can mislead security review and cause the skill to be invoked in contexts where it can access sensitive account metadata or perform unrelated actions, raising the risk of abuse and unintended data exposure.
The skill advertises executable workflows that rely on environment variables, local files, shell commands, and outbound network access, but it does not declare any explicit tool scope or permission boundaries. That creates unnecessary ambient authority: if the runtime grants broad tools by default, the skill could read secrets, write files, or make external requests without a narrowly documented contract, increasing the blast radius of prompt injection or operator error.
Activation on a common, underspecified phrase like a generic hairstyle-related term can cause accidental invocation. While not inherently malicious, this raises the probability of misrouting user requests into a skill that may involve external services or more intrusive processing than the user intended.
The trigger condition includes broad marketing and content-production requests, not just hairstyle/hair-color preview intents. Overbroad activation increases the chance the skill is selected for unrelated user requests, which can expose users to unnecessary external API usage, file/network operations, or outputs outside the expected domain.
The default prompt hard-codes Chinese output regardless of user preference, which can cause consent and clarity issues if the user expects another language. While not directly enabling code execution or data exfiltration, it can degrade user understanding of generated workflows, API commands, and safety limitations, increasing the risk of misuse or mistaken approval.
The manifest enables implicit invocation, which allows the skill to be triggered without an explicit user request for this specific capability. In a skill that can generate runnable workflows and AI-HIVE commands for image-editing tasks, broad implicit activation increases the chance of unintended use, including processing sensitive portrait-editing requests or policy-sensitive transformations without sufficient user confirmation.
The natural-language strings in the module docstring and argument parser description specify the skill name entirely in Chinese, and the generated metadata continues that language choice. Because the file provides no user opt-in, language selection, or justification that this is a China-specific skill, it appears to impose a specific language/locale by default.
The file is presented as a hairstyle/color preview skill, but the module-level implementation is a broad AI Hive client supporting chat, image, video, model enumeration, uploads, and account queries. This scope mismatch increases the attack surface and can enable capability abuse if the skill is invoked in environments that assume it is limited to hairstyle-preview image editing.
This Python file contains natural-language docstrings, prompts, help text, and status messages entirely in Chinese, starting with the module description and continuing throughout the CLI. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless a justified locale restriction is documented, which is not present here.
Text chat capability is unrelated to the stated hairstyle-preview purpose and allows arbitrary prompt submission to a general text model. In a skill ecosystem, this can be repurposed as an unsanctioned generic LLM access path, bypassing policy assumptions that this skill only performs constrained image-preview tasks.
Full video-generation support materially exceeds the hairstyle/color preview image workflow and enables transformation of uploaded media into arbitrary videos. Because this skill handles user-supplied media and remote generation/download, the extra modality broadens misuse potential, cost exposure, and policy evasion risk under a misleading beauty-preview label.
The entire natural-language description and usage guidance are written as a Chinese-only skill experience, and there is no statement offering language selection or opt-in for another locale. Under the policy, forcing a specific language without user choice can be a locale-policy issue unless explicitly documented and justified.
User-info and model-enumeration operations expose account metadata, wallet information, and platform capabilities that are not required for end-user hairstyle preview generation. While not an exploit by themselves, they create unnecessary information disclosure and reconnaissance surface if the skill is accessible to broader callers.