T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
API Bearer Credential Can Be Transmitted to an Arbitrary Configurable Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not clearly malicious, but it needs review because it can store an AI-HIVE API key and send that credential to a configurable server while uploading selected media.
Review this before installing if you will use a real AI-HIVE key. Use only the official AI-HIVE base URL, check AI_HIVE_BASE_URL and ~/.ai-hive/config.json before running, prefer a limited or low-balance API key, and upload only media you are allowed to share. Install dependencies in a dedicated environment and be aware the workflow is primarily Chinese-language.
scripts/videogen.py:91API Bearer Credential Can Be Transmitted to an Arbitrary Configurable Endpoint
scripts/videogen.py:17Runtime Dependency Is Installed Without Version or Integrity Pinning
The declared description presents a full faceless shoppable-video generator workflow, including media generation and external API orchestration through AI-HIVE OpenAPI. The supplied code instead implements a local command-line utility that writes a draft JSON brief with project metadata. While the JSON includes labels and aliases consistent with the declared domain, the primary behavior is materially narrower and different: blueprint creation only. There are no external network calls, no media processing, no asynchronous job handling, and no output resembling generated video deliverables. Therefore the description substantially overstates the implemented functionality.
The declared description promises an end-to-end faceless product-video generator with AI-assisted creation and API-based orchestration. The supplied code does not implement any of that. It only wraps ffmpeg/ffprobe to perform basic deterministic edit operations on existing local media files. While such editing could be a supporting component of a video workflow, this chunk’s primary behavior is materially narrower and different from the declared purpose, and the specifically claimed external API capabilities are entirely absent. Therefore this is a clear description-behavior mismatch.
The skill advertises and includes commands that use environment variables, local file access, network access, and shell execution, but it declares no explicit tool scope or permission boundaries. In an agent environment, that increases the chance the skill is invoked with broader capabilities than intended, enabling unintended filesystem access, outbound requests, or execution of user-influenced commands.
The default prompt hardcodes 'production-ready Chinese workflow' regardless of the user's language preference, which can override user intent and cause the agent to respond in an unexpected language. This is primarily a prompt-quality and UX control issue, but it can also reduce clarity for safety-critical instructions if the user cannot adequately review or validate the generated output.
The script description and multiple user-facing string literals are fixed in Chinese, with no option to select language or locale. This can violate language/locale policy when users are not given a choice or informed that the tool is limited to a specific language context.
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 module docstring and the code expose a general-purpose AI Hive toolchain including text chat, image generation, model listing, user-info lookup, arbitrary media upload, and generic task polling, not just faceless commerce video generation. While some of these are supporting primitives, the file clearly contains reusable capabilities unrelated to the manifest’s narrower purpose of generating faceless commerce/demo videos.
The module docstring is entirely in Chinese and presents the skill as a general-purpose tool, while later user-facing prompts and help text are also Chinese-only. For a general skill, forcing a specific language without opt-in or justification is a natural-language policy violation under the locale-policy rule.
The client implements get_user_info, and the generic CLI exposes user-info for querying user information and wallet balance. Accessing account metadata and balances is not justified by the manifest’s purpose of generating faceless commerce/product-demo videos for marketing content.
This code creates parent directories and writes a JSON file to a user-specified path, but provides no prior confirmation, warning comment, or explanatory docstring about modifying the filesystem. Although the write is central to the script's purpose, the file path is user-controlled and the code gives no explicit disclosure before performing the write.
The skill-specific CLI advertises and exposes task, upload, and init commands in addition to generate. The manifest focuses on accepting product inputs and delivering generated faceless commerce videos via the AI-HIVE workflow; standalone upload and generic task-inspection capabilities expand behavior beyond that user-facing description.