T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:89- Finding
Credentials and user media can be transmitted to unrestricted network destinations
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This image-generation skill mostly matches its stated purpose, but it needs review because it can send API keys and uploaded media to configurable endpoints and can write downloaded results without safe path containment.
Review carefully before installing. Use only the official AI Hive endpoint, avoid setting AI_HIVE_BASE_URL or custom base_url values unless you fully trust them, do not upload sensitive media, and prefer a version that validates upload/download destinations and sanitizes downloaded filenames.
scripts/imagegen.py:89Credentials and user media can be transmitted to unrestricted network destinations
scripts/imagegen.py:399API-controlled filename components permit output-directory traversal
The declared purpose is a narrow image-generation skill, but the detected behavior reportedly includes broader chat/text, video generation, model enumeration, and account or wallet-related queries. That mismatch is dangerous because it obscures the real trust boundary: users and orchestrators may route requests to this skill believing it is limited to image tasks while it can access unrelated and potentially sensitive functions.
The skill invokes shell commands, performs package installation, reads local files, and accesses the network, but it declares no explicit tool scope or permissions boundary. This creates an avoidable least-privilege failure: an agent may grant broader capabilities than users expect, increasing the blast radius if the skill is misused or later modified.
The trigger phrases are broad and generic enough to overlap with many ordinary image-editing or design requests, which can cause the skill to be selected more often than intended. Over-broad routing increases security risk because it exposes users to shell/network/file-capable behavior in contexts where a narrower or safer skill might have sufficed.
The file implements a full generic AI Hive client with text chat, video generation, model enumeration, task polling, upload, and init flows, while the skill is presented as a Nano Banana 2 image-only skill. This capability mismatch can bypass policy or reviewer expectations, enabling operators or downstream tooling to invoke broader networked AI functions than the manifest suggests.
The module docstring and CLI descriptions describe a universal AI capability tool rather than a narrowly scoped Nano Banana 2 image generator. Mislabeling security scope is dangerous because reviewers, users, or automated permission systems may trust the declared identity and overlook the broader reachable behavior embedded in the file.
The module docstring and nearly all user-facing prompts, help text, and status messages are written only in Chinese, which imposes a specific language on users without any opt-in or alternative locale. This matches the policy category for language or locale constraints that are not optional or explicitly justified.
This markdown file uses Chinese throughout the substantive entries, which can amount to a language-policy issue when the skill documentation forces a specific language without user opt-in. There is no indication that the skill is region-specific or that alternative language support is available.
The skill metadata and body are primarily written in Chinese, with no statement that users may choose their preferred language or locale. This can create a language-policy issue if the skill consistently responds in Chinese by default without user opt-in.
The example API key value uses Chinese text ('请替换为你的APIKey') as the only user-facing instruction. This imposes a specific language in a user-visible config artifact without any opt-in, alternative locale, or documented regional constraint.