T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:92- Finding
API Key Disclosure Through a Configurable Authentication Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches a video-generation workflow, but it handles API keys and media transfers through insufficiently constrained network endpoints.
Install only if you are comfortable giving this skill an AI-HIVE API key and letting it upload selected media and download generated results. Avoid custom base URLs unless you fully control them, review environment variables and ~/.ai-hive/config.json before use, prefer --no-download for dry runs, and confirm any paid generation parameters before execution.
scripts/videogen.py:92API Key Disclosure Through a Configurable Authentication Endpoint
scripts/videogen.py:278Unvalidated Server-Controlled Media Upload and Download Destinations
scripts/videogen.py:17Unpinned Third-Party Dependency Installation Guidance
A specialized analysis skill is presented, but the actual capability set reportedly includes generic chat, image/video generation, model querying, account/balance retrieval, and API-key initialization flows without any concrete logic for the promised breakdown outputs. This kind of scope deception can lead to privilege misuse, unexpected charges, and unsafe trust decisions because operators may treat it as a harmless analysis tool rather than a general-purpose API client.
A specialized analysis skill is presented, but the actual capability set reportedly includes generic chat, image/video generation, model querying, account/balance retrieval, and API-key initialization flows without any concrete logic for the promised breakdown outputs. This kind of scope deception can lead to privilege misuse, unexpected charges, and unsafe trust decisions because operators may treat it as a harmless analysis tool rather than a general-purpose API client.
The skill advertises and demonstrates capabilities that require shell, filesystem, environment-variable, and network access, but it does not declare an explicit tool scope or permission boundary. That creates an overbroad and ambiguous execution surface where an orchestrator may grant more access than users expect, increasing the risk of unintended file access, secret exposure, or external requests.
The trigger list includes a very generic phrase, "带货视频", which can appear in many ordinary e-commerce or marketing conversations unrelated to this specific decomposition skill. Because the skill activates on mere mention of the phrase, the boundary between relevant and irrelevant requests is not specific enough.
"微信视频号" is a broad platform name rather than a task-specific trigger, so many benign conversations about the platform could match it. The file does not clearly constrain invocation to decomposition, scripting, or authorized reference-video analysis when this phrase appears alone.
The default prompt hard-codes Chinese output ('production-ready Chinese workflow') without reflecting user preference or asking for consent. This can cause unintended language coercion, reduce usability for non-Chinese-speaking users, and increase the chance that users approve or execute generated workflows they do not fully understand.
Implicit invocation is enabled with no visible trigger constraints, so the skill may activate on broad or ambiguous requests related to video marketing or short-video workflows. In this skill's context, that can route users into a workflow that handles reference-video decomposition and runnable AI-HIVE commands even when authorization, platform-policy compliance, or user intent has not been clearly established.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run(args: list[str]) -> None:
print(" ".join(args))
subprocess.run(args, check=True)
def main() -> None:
The file presents itself as a narrow 视频号爆款短视频拆解 skill, but the implementation is a reusable general-purpose AI Hive client supporting text chat, image generation, video generation, model enumeration, media upload, and task polling. This capability expansion violates least-privilege expectations: a caller or wrapper that trusts the manifest could unknowingly grant broader AI and account operations than the declared purpose requires.
The module docstring and the entire CLI/user-facing guidance are written only in Chinese, including setup and operational instructions. For a general-purpose skill described as a '通用 AI 能力调用工具', this effectively imposes a language/locale constraint without documenting an opt-in choice or region-specific justification.
The generic text-chat endpoint allows arbitrary model interaction unrelated to the stated decomposition/remake workflow. In a skill ecosystem, this creates a scope mismatch where downstream agents may route untrusted prompts through a capability users did not authorize, enabling unintended data processing or policy bypass via an overly broad backend client.
The image-generation capability is broader than the declared short-video decomposition scope and enables unrelated content creation from the same trusted skill surface. This increases misuse potential, especially because the skill metadata emphasizes analysis/rewriting of authorized reference videos rather than general media synthesis.
The script description and embedded skill metadata are entirely Chinese and target a specific Chinese platform context, but the file does not indicate that this locale/language scope is optional or user-selected. Under the policy, language constraints should be offered as a choice or clearly justified as region-specific.
This code creates parent directories and writes JSON to the path supplied by --output, but there is no confirmation prompt, warning comment, or docstring explaining that it will modify the filesystem. Although the operation is simple and expected for a generator script, it still performs a file write and directory creation without explicit disclosure in the file itself.
Exposing user/account info and wallet balance is out of scope for a video-decomposition skill and unnecessarily broadens access to sensitive account metadata. While not code execution, it increases privacy and reconnaissance risk if the skill is invoked in environments where users do not expect account inspection.
The skill automatically downloads generated results to a default local directory after task completion, which can write files to disk without an explicit confirmation at the skill interface. In a hosted agent or shared workstation context, this can surprise users, consume storage, or persist sensitive/generated media locally when they expected a dry-run or metadata-only operation.