T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer API Key Can Be Transmitted to an Arbitrary Configured Server
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly transparent about using AI-HIVE media generation, but it handles API keys, uploads, downloads, and custom API endpoints in ways users should review before installing.
Install only if you understand that this is not just a synopsis helper: it can upload local media to AI-HIVE, submit potentially billable image/video generation tasks, store an API key locally, and download generated files. Do not set AI_HIVE_BASE_URL or --base-url to any untrusted server, avoid uploading private files, and prefer --no-download unless you trust the task source and output directory.
scripts/imagegen.py:91Bearer API Key Can Be Transmitted to an Arbitrary Configured Server
scripts/imagegen.py:312Untrusted Task Metadata Controls Download Paths and Unbounded File Downloads
The documentation indicates broad AI-HIVE API capabilities such as models, chat, image, video, tasks, and upload, which go well beyond the declared synopsis-generation purpose. In context, the undeclared ability to upload local media and download generated files materially raises the risk of data exfiltration, accidental secret handling, and user deception about the skill's true operational scope.
The documentation indicates broad AI-HIVE API capabilities such as models, chat, image, video, tasks, and upload, which go well beyond the declared synopsis-generation purpose. In context, the undeclared ability to upload local media and download generated files materially raises the risk of data exfiltration, accidental secret handling, and user deception about the skill's true operational scope.
The implemented skill behavior materially conflicts with the declared skill purpose: instead of producing short-drama episode synopses, it exposes a generic AI Hive image-generation/editing wrapper with upload, task polling, and file download capabilities. This mismatch is dangerous because it can mislead users and reviewers about the real functionality, expanding the skill’s effective privileges and attack surface beyond what the skill metadata justifies.
The file presents itself as a generic AI Hive media-generation and file-transfer client, while the declared skill is for short-drama episode synopsis/planning. This capability mismatch is dangerous because it can mislead users and reviewers into granting a planning-oriented skill access to upload local files, call arbitrary remote models, and download generated media beyond the stated business purpose.
The code implements end-to-end video generation, including media uploads, remote task submission, polling, and result retrieval, despite the skill being described as an episode synopsis creator. In a planning-only skill context, this unjustified remote execution workflow materially increases risk by enabling expensive external operations, broader data sharing, and capability smuggling under an unrelated description.
The embedded SKILL_CONFIG explicitly brands the tool as a short-drama video generator, contradicting the published metadata that describes an episode-synopsis/planning assistant. Hidden or inconsistent capability labeling increases the risk of deceptive deployment, where a user invokes what appears to be a writing/planning skill but actually triggers multimedia generation and data transfer workflows.
The skill advertises and demonstrates shell execution, environment-variable use, local file access, and network/API interactions, but it does not declare any tool scope such as permissions or allowed-tools. This creates an authorization-transparency gap: users and the hosting platform cannot easily reason about what the skill may access, increasing the chance of unintended file, secret, or network exposure.
The manifest sets language: zh-CN, which indicates a fixed locale, but the file does not state that this is optional, user-selectable, or required for a region-specific compliance reason. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.
The markdown says the skill applies when a user says phrases like “分集梗概、分集大纲、单集剧情、episode outline、追更点,” but it does not define whether these are exact triggers, examples, or merely related search terms. Several of these terms are generic creative-writing requests and could overlap with ordinary conversation, increasing the chance of unintended invocation.
The skill enables implicit invocation without any narrowly scoped trigger conditions, which can cause the agent to auto-select this skill in situations the user did not clearly intend. Because this skill is broad, marketing-oriented, and capable of steering planning and generation workflows, unintended invocation could lead to prompt hijacking of user context, unnecessary data exposure to the skill, or execution of actions based on ambiguous requests.
The module docstring and user-facing help/messages are written in Chinese, and the script consistently presents prompts and operational guidance in Chinese throughout the file. There is no indication that the skill is region-specific or that users can opt into another language, which creates a natural-language locale policy issue.
Media upload, image generation, and arbitrary result downloading are not justified by a short-drama synopsis skill and introduce unnecessary external data transfer and file-write behavior. In this context, the extra capabilities increase the risk of unintended data exposure, misuse of user-supplied local files, and unreviewed retrieval of remote content to disk.
The skill can upload arbitrary local media to remote storage and download remote-generated assets, which is not justified by an episode-synopsis use case. In this context, that expands the data-exfiltration and unreviewed file-transfer surface: users may provide local files expecting planning help, while the tool actually transmits them to third-party infrastructure.
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 options are supported.