T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:346- Finding
Path Traversal Through API-Controlled Output Filenames
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its image-generation purpose, but it needs Review because a compromised API response could make it save downloaded files outside the intended output folder.
Install only if you are comfortable sending prompts and chosen reference images to AI Hive. Use a virtual environment, avoid confidential images or unreleased brand assets unless AI Hive's terms allow it, and set a dedicated output directory. The publisher should fix output path sanitization and restrict downloads to validated HTTPS media URLs before this is treated as routine-risk.
scripts/imagegen.py:346Path Traversal Through API-Controlled Output Filenames
scripts/imagegen.py:262Unrestricted Download of Remote URLs and Unvalidated Content
SKILL.md:53Unpinned Third-Party Dependency Installation
The skill invokes a local Python script that can use shell, filesystem, environment, and network capabilities, but the manifest does not declare any tool restrictions or allowed-tools scope. This increases the chance the agent can run with broader privileges than users expect, making misuse or accidental overreach harder to constrain or audit.
The description says to use the skill when users search for terms like "Midjourney alternative", "文生图", "图生图", "海报", or "广告图片", which are broad topics that can arise in many ordinary image-generation requests. It does not provide exclusion conditions or negative examples to clarify when the skill should not activate, increasing the risk of unintended invocation.
The documentation states that authenticated traffic, including uploaded images and prompts, is sent to a remote API, but it does not prominently require informed user consent before data leaves the local environment. Users may unknowingly transmit sensitive images, branding assets, or confidential prompts to a third party, creating privacy, confidentiality, and compliance risk.
The manifest description and markdown content are primarily written in Chinese with embedded English terms, but there is no statement that the skill can respond in the user's preferred language. If organizational policy requires language choice or opt-in, this may be a locale/language policy issue.
The module docstring and subsequent user-facing CLI text are written exclusively in Chinese, and the skill does not indicate that Chinese is optional or that the tool is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy issue.
The initialization flow and related prompts require the user to interact in Chinese, but the file provides no mechanism to select another language and no justification that this is a China-only compliance tool. This is a natural-language locale policy violation rather than a code-security flaw.
No suspicious patterns detected.