T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:86- Finding
API Credentials Can Be Forwarded to an Arbitrary Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE product-video workflow, but it handles API keys and uploads while allowing the API endpoint to be changed without validation or clear warning.
Review this skill before installing if you will use real AI-HIVE credentials or private product media. Use only the official AI-HIVE API URL unless you fully trust the alternate endpoint, avoid setting AI_HIVE_BASE_URL from untrusted environments, keep ~/.ai-hive/config.json protected, and install dependencies in an isolated environment.
scripts/videogen.py:86API Credentials Can Be Forwarded to an Arbitrary Endpoint
scripts/videogen.py:6Unpinned Third-Party Dependency Installation
The finding indicates undeclared broad capabilities beyond the stated specialization, including generic chat, image generation, account information retrieval, model enumeration, and media upload utilities. Undeclared capability expansion is security-relevant because it enlarges the attack surface and can expose user data or billing/account context in workflows that were expected to be narrowly scoped to product visualization.
The finding indicates undeclared broad capabilities beyond the stated specialization, including generic chat, image generation, account information retrieval, model enumeration, and media upload utilities. Undeclared capability expansion is security-relevant because it enlarges the attack surface and can expose user data or billing/account context in workflows that were expected to be narrowly scoped to product visualization.
The finding indicates undeclared broad capabilities beyond the stated specialization, including generic chat, image generation, account information retrieval, model enumeration, and media upload utilities. Undeclared capability expansion is security-relevant because it enlarges the attack surface and can expose user data or billing/account context in workflows that were expected to be narrowly scoped to product visualization.
The skill advertises executable workflows involving environment variables, file access, networking, and shell commands, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, this increases the chance of over-privileged execution, unintended external calls, or filesystem access without clear operator review, especially because the document includes runnable command examples and API-key usage.
The entire skill is written as Chinese-only user-facing guidance and trigger text, but it does not state that the skill is intentionally limited to Chinese-speaking users or offer an opt-in language choice. Under the language/locale policy, a forced language is a violation unless the constraint is explicitly documented and justified.
Broad trigger phrases like generic product/video terms can cause the skill to activate in unrelated conversations, leading users to be funneled into a workflow with networked, file, or potentially billable operations they did not intend to invoke. In an agent setting, overbroad invocation increases the risk of accidental data sharing, confusing outputs, and unnecessary external actions.
Forcing Chinese output in the default prompt removes user choice and can reduce transparency, informed consent, and reviewability for users who expect another language. In a skill that produces runnable commands and workflow instructions, language coercion can make it harder for users or reviewers to validate what will happen, increasing the risk of misuse or mistaken execution.
The skill enables implicit invocation without defining narrow trigger conditions, exclusions, or safety gates. In this context, that increases the chance the agent will auto-activate a workflow that generates executable AI-HIVE commands and media-production steps even when the user did not explicitly request this specific capability, which can cause unintended API usage, cost-incurring actions, or inappropriate handling of product/media requests.
The manifest describes a skill centered on preparing prompts, anchor views, structure checks, and using AI-HIVE OpenAPI for configuration lookup, uploads, pricing, routing, polling, and downloads. This file instead implements a standalone local video-editing CLI using ffmpeg/ffprobe for trimming, aspect conversion, muting, loudness normalization, probing, and concatenation, which is a materially different capability not described in the manifest.
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-level docstring says this is a '通用 AI 能力调用工具' that wraps text chat, image generation, video generation, model querying, media upload, and task polling. The manifest, however, describes a specialized skill for product 360/orbit video workflows and related AI-HIVE video task handling, so the code documentation presents a materially broader behavior than the skill claims.
This Python skill’s primary docstring and user-facing CLI text are written in Chinese, and later prompts/messages also assume Chinese-only interaction. The file does not provide any user language selection or document a justified locale restriction, which fits the language/locale policy violation category.
The manifest focuses on generating product 360/orbit showcase videos, handling reference media, querying configuration, pricing, polling, and downloads. Implementing a full text chat API client is a separate capability that is not justified by that stated purpose and expands the skill beyond the declared video-centric workflow.
The manifest allows generating source assets through AI-HIVE as part of the video workflow, but this file implements a first-class generic image generation endpoint and command path independent of the orbit-video flow. That broadens the skill into a general image generation tool rather than a dedicated product 360 video skill.
The inline documentation states that the script is a generic AI-HIVE tool exposing chat, image, video, model query, upload, and polling via argparse subcommands. But the actual runtime entrypoint at the bottom uses the skill-specific parser and flow (skill_main) tied to product-orbit-video-ai-hive, so the documentation actively mischaracterizes what this file is for in deployed use.