T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:501- Finding
API Key File Is Created Before Restrictive Permissions Are Applied
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent AI Hive image-generation wrapper with disclosed API-key setup, uploads, task polling, and downloads, but users should treat its text-accuracy checks as manual and note a few implementation hardening gaps.
Install only if you are comfortable giving this skill an AI Hive API key and letting it upload selected reference images and download generated outputs. Do not rely on it to automatically verify exact text; manually compare any generated text before publishing, especially for prices, dates, product claims, legal terms, or regulated content.
scripts/imagegen.py:501API Key File Is Created Before Restrictive Permissions Are Applied
scripts/imagegen.py:263Remote Generation Results Are Downloaded Without Destination or Size Restrictions
The skill description claims exact-text verification, character budgeting, and fallback controls, but the described implementation does not actually perform OCR, text comparison, or automated validation and also includes extra operational abilities not clearly disclosed. This is dangerous because users may rely on non-existent safety and accuracy guarantees for commercial text images, leading to publication of incorrect regulated content, while the hidden management capabilities broaden the attack surface beyond the declared purpose.
The skill exposes capabilities implying environment access, file read/write, network, and shell execution, but does not declare an explicit tool scope or permission boundary. This is dangerous because consumers of the skill cannot clearly understand or constrain what the skill may access, increasing the risk of unintended file modification, secret exposure, or outbound network use if the underlying scripts are invoked in a broader agent environment.
The module docstring and subsequent user-facing CLI messages are written entirely in Chinese, and the file does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-only region/compliance context. Under the stated policy, a forced language/locale without user opt-in is a natural-language policy violation.
The description claims capabilities such as literal proofreading, character-budget control, and failure fallback to improve text accuracy. In practice, the code only fixes the model ID, forwards prompt/images/params to the backend, and polls/downloads results; it does not inspect text, enforce budgets, validate OCR output, or implement retry/fallback logic for text fidelity.
The example API key value uses Chinese-only instructional text ('请替换为你的APIKey'), which imposes a specific language in user-facing content. For a general configuration example, this can violate language/locale policy when no alternative locale or opt-in is provided.
The manifest frames this skill as generating or editing Seedream 5 Lite commercial images with text-accuracy controls. While API authentication is expected, actively launching a browser and guiding interactive account/API-key setup is an auxiliary account-management capability not justified by the stated image-generation purpose.