T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:399- Finding
Path Traversal Through an Untrusted API-Supplied Output Filename
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly an AI Hive image-generation helper, but it needs review because its packaged script has broader unused capabilities and under-scoped credential, network, and file-download handling.
Install only if you trust AI Hive and the skill publisher, keep the default HTTPS base URL unless you intentionally operate a trusted endpoint, avoid running it with elevated privileges, and be aware that selected media files and prompts are sent to the configured service while downloaded results are written locally.
scripts/imagegen.py:399Path Traversal Through an Untrusted API-Supplied Output Filename
scripts/imagegen.py:91Bearer API Key Can Be Transmitted to an Arbitrary Configured Endpoint
scripts/imagegen.py:281Unvalidated Remote Upload and Download URLs Enable Data Exfiltration and SSRF
SKILL.md:72Unpinned Third-Party Dependency Installation
The skill is presented as a narrowly scoped GPT Image 2 image-generation helper, but the detected behavior extends to generic chat, video generation, account and wallet queries, media upload, browser-based API-key setup, and local config storage. This mismatch is dangerous because users may grant trust and permissions based on the benign description while the underlying implementation can access unrelated sensitive functionality and potentially expose credentials or account data.
This markdown file contains user-facing natural-language content exclusively in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the policy rule, forcing a specific language without user choice is a natural-language policy violation.
The skill invokes local Python scripts and installation commands but does not declare any explicit tool or permission scope, leaving shell, filesystem, environment, and network access implicit. That increases the chance that an agent or reviewer will authorize broader capabilities than the skill’s stated purpose requires, enabling unintended command execution, file access, or outbound requests.
The description and instructions are written as direct Chinese-language requirements for generating content, with no indication that users may choose another language or locale. This can violate language/locale policy when a skill implicitly mandates a specific language without user opt-in.
The file is presented as a narrowly scoped GPT Image 2 seeding-image skill, but the implementation and module docstring describe and retain a general-purpose AI Hive client. This creates a capability mismatch that can mislead reviewers and users, increasing the risk that broader functions are invoked or repurposed outside the declared skill boundary.
The top-level documentation explicitly describes a generic AI capability tool, which contradicts the declared identity of a GPT Image 2 seeding-image skill. This kind of scope ambiguity is dangerous because trust, approval, and deployment decisions may be made based on the metadata while the codebase actually contains broader capabilities.
This code embeds the skill’s primary description and user-facing CLI guidance in Chinese only, which imposes a specific language on users without opt-in. The policy for natural-language violations applies to code files when string literals or comments enforce a locale choice.
Embedding video-generation capability in a skill advertised only for GPT Image 2 seeding images violates least functionality and expands the attack surface unnecessarily. Even if not exposed through the final skill entrypoint, keeping unrelated media-generation code in the artifact raises the chance of accidental exposure, misuse, or future wiring into the skill without proper review.
The skill-specific CLI exposed to users uses Chinese-only descriptions and help strings for commands and arguments, with no alternative locale or opt-in. That constitutes a language policy violation because the skill fixes the interaction language rather than letting the user choose.
The example API key placeholder uses Chinese text ("请替换为你的APIKey"), which imposes a specific language in user-facing configuration content. There is no indication that the skill is region-specific or that other language/localization options are supported.
Text chat, model enumeration, and user-info inspection are broader account and platform capabilities than required for a fixed-purpose image skill. While not inherently dangerous on their own, they increase privilege and information exposure beyond the stated use case, enabling unnecessary discovery of available models and account metadata.