T08 · Insecure Dependencies
- Location
scripts/imagegen.py:20- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches an AI-HIVE image-generation workflow, but it needs review because it can persist and forward an API key to an unrestricted custom endpoint.
Review this before installing. Use only the official AI-HIVE endpoint, avoid setting --base-url or AI_HIVE_BASE_URL unless you fully trust the endpoint, keep the API key scoped and revocable, run dependencies in an isolated environment, and only upload media you are authorized to share with AI-HIVE.
scripts/imagegen.py:20Unpinned Runtime Dependency Installation
scripts/imagegen.py:91API Credentials Can Be Sent to an Unrestricted Custom Endpoint
The declared description promises an operational image-production skill centered on creating 抖音商品卡 assets and managing an AI-HIVE generation pipeline. The supplied code instead only creates a production brief/blueprint JSON file from command-line inputs. While this blueprint could be a supporting preproduction step, it is far narrower than the declared primary purpose and lacks the core advertised behaviors and external interactions. Therefore the description does not accurately represent what this code chunk actually does.
The skill documents executable workflows involving environment variables, local files, shell commands, and outbound network access, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this creates ambiguity about what the skill is allowed to do and increases the risk of over-privileged execution, unintended external calls, or secret exposure during file/network/shell operations.
The default prompt specifies a "production-ready Chinese workflow," which imposes a language choice in the skill's natural-language behavior. Because the file does not indicate that Chinese is optional, user-selected, or justified as a region-specific constraint, this is a language policy violation.
The skill enables implicit invocation with no stated trigger boundaries, exclusions, or user confirmation, which can cause the agent to auto-apply this commerce-image workflow in contexts the user did not explicitly request. Because the skill can transform requests into runnable AI-HIVE commands and production workflows, unintended invocation could lead to unauthorized asset processing, accidental third-party API use, or assistance with deceptive advertising-style content beyond the user's intent.
This Python file contains user-facing natural-language strings that present the skill exclusively in Chinese, including the module docstring and argparse description. Because no opt-in, fallback language, or justification for a China-specific locale is provided, this may violate the language/locale policy for skills that should not force a specific language by default.
The file exposes a broad, general-purpose AI Hive client with chat, image, video, model enumeration, upload, and task polling capabilities, while the advertised skill is narrowly scoped to Douyin product-card image generation. This scope mismatch increases the attack surface and makes it easier for users or downstream agents to invoke unintended capabilities that bypass the skill’s declared safety and business constraints.
The module docstring and user-facing CLI text are written entirely in Chinese, and the script provides no option for users to select another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the restriction is clearly justified, which is not documented here.
Video-generation support is outside the declared image-studio scope and materially broadens what the skill can do with user-supplied media, prompts, and account credits. In practice, this enables repurposing the skill for unrelated or policy-sensitive media generation workflows that the skill description does not authorize.
The module docstring describes the file as a '通用 AI 能力调用工具' that wraps text chat, image generation, video generation, model querying, media upload, and task polling. In this skill context, the code is supposed to represent a specialized Douyin product-card image studio, so the inline documentation actively frames the file as broader than the skill’s declared intent.
User-info and wallet-balance retrieval are not necessary to fulfill the image-studio skill’s stated purpose, yet they expose account metadata through the same tool. In a delegated agent context, this can become unnecessary data access and enable privacy leakage or account reconnaissance beyond the user’s intended task.