T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
API Key Can Be Redirected to an Arbitrary Server
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its advertised AI-HIVE ad-video workflow, but it handles API keys, uploads media, and can start billable generation with weaker safeguards than its documentation implies.
Review this skill before installing. Only use it with an AI-HIVE API key you are willing to use from this machine, keep the base URL at the official endpoint, check generated commands before running them, use separate output paths for edits, and confirm cost/model parameters before any generation task is submitted.
scripts/videogen.py:91API Key Can Be Redirected to an Arbitrary Server
scripts/edit_video.py:63FFmpeg Operations Unconditionally Overwrite Existing Files
scripts/videogen.py:503Potentially Billable Generation Tasks Are Submitted Without Confirmation
This finding expands the mismatch to include undeclared generic capabilities such as text/image generation, account or wallet access, model enumeration, and interactive API-key setup. Undeclared capabilities increase security risk because operators may approve the skill for a narrow remix use case while it can access broader functions with privacy, billing, or data-handling consequences.
This finding expands the mismatch to include undeclared generic capabilities such as text/image generation, account or wallet access, model enumeration, and interactive API-key setup. Undeclared capabilities increase security risk because operators may approve the skill for a narrow remix use case while it can access broader functions with privacy, billing, or data-handling consequences.
This finding expands the mismatch to include undeclared generic capabilities such as text/image generation, account or wallet access, model enumeration, and interactive API-key setup. Undeclared capabilities increase security risk because operators may approve the skill for a narrow remix use case while it can access broader functions with privacy, billing, or data-handling consequences.
The skill advertises and demonstrates code execution patterns involving environment variables, local file operations, networking, and shell commands, but it does not declare any explicit tool scope or allowed-tools boundary. In an agent environment, missing permission declarations can lead to overbroad runtime access, making accidental or unauthorized network calls, file modification, or secret exposure more likely.
The skill description and operating instructions are entirely framed in Chinese and position the skill for Chinese-language use, but do not state that language is optional or user-selectable. This can amount to a locale/language policy issue because the skill appears to impose a specific language without explicit user opt-in.
The trigger phrases include broad everyday terms like UGC素材、客户视频、电商广告 that can match many benign requests outside the intended high-friction workflow. Overbroad invocation can cause the wrong skill to activate, leading to unintended file/network actions, user confusion, or accidental routing into a potentially billable external service.
The default prompt and implicit invocation setting make the skill easy to trigger for loosely related requests, which can cause the agent to inject this workflow when the user did not explicitly ask for it. In a skill that produces runnable AI-HIVE commands and ad-production workflows, over-broad activation increases the risk of unwanted tool use, scope creep, and accidental generation of marketing or media-processing actions from ambiguous input.
Forcing Chinese output in the default prompt overrides user preference and can cause misunderstanding of generated workflow steps, safety guidance, or runnable commands. While this is not directly a code-execution flaw, it can degrade informed user review and increase the chance that users run commands or approve deliverables they do not fully understand.
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 is presented as a narrowly scoped skill for turning authorized customer-post/UGC materials into ad videos, but it actually exposes a broad general-purpose AI client with text chat, image generation, generic video generation, model enumeration, arbitrary media upload, and task polling. This scope expansion weakens least-privilege boundaries and makes it easier for downstream agents or users to invoke capabilities outside the declared business purpose, increasing the chance of policy bypass, misuse, or unintended data handling.
This code file contains user-facing natural-language descriptions and prompts entirely in Chinese, presenting the tool as a general-purpose skill rather than a clearly region-specific one. Because it does not offer a language/locale option or document a justified locale restriction, it may violate the policy against forcing a specific language without user opt-in.
The skill includes a user-info capability that retrieves account information and wallet balance even though that functionality is unrelated to ad-production. While not an exploit by itself, exposing account metadata unnecessarily increases information disclosure and broadens what an invoking agent can inspect beyond the declared task.