T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Bearer API Key Can Be Exfiltrated Through an Unrestricted Custom Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s video-generation purpose is mostly coherent, but its API-key routing and download handling create real account and file-safety risks that should be reviewed before installation.
Install only if you trust AI-HIVE and need this workflow. Avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the endpoint, keep the API key scoped and revocable, review commands before paid generation or media upload, and download outputs into a low-risk directory.
scripts/videogen.py:91Bearer API Key Can Be Exfiltrated Through an Unrestricted Custom Base URL
scripts/videogen.py:399API-Controlled Task Metadata Can Escape the Download Directory
The description promises a substantial workflow for producing virtual-host product broadcast videos, including content generation and external API-based media job orchestration. The actual code only parses command-line arguments and writes a local JSON file labeled as a draft production blueprint. While a blueprint could be a supporting component of such a system, this chunk’s actual behavior is materially narrower than the declared purpose and lacks the key advertised capabilities. Therefore, the description does not accurately represent what this code chunk actually does.
This is a clear mismatch. The declared description presents a specialized workflow for generating virtual-host product-promotion videos using external AI APIs and business inputs. The supplied code instead implements a narrow, generic media-editing CLI around ffmpeg/ffprobe. Its operations are limited to probe, trim, aspect conversion, mute, loudness normalization, and concatenation. These are generic support edits and do not realize the declared core functionality. There are no network calls, no AI generation, no content creation pipeline, no e-commerce semantics, and no API orchestration mentioned in the description.
The skill documents executable commands that use environment variables, local files, networking, and shell-based tooling, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization ambiguity where an agent or runtime may grant broader capabilities than reviewers or users expect, increasing the chance of unintended network calls, file access, or secret exposure during execution.
The skill instructions and invocation guidance are entirely written in Chinese and repeatedly frame usage around Chinese-language triggers, but do not explicitly state that the skill is Chinese-only or offer a language/locale choice. Under the policy, a skill that effectively forces a specific language without user opt-in is a natural-language policy violation.
The natural-language instruction in the default prompt requires a "production-ready Chinese workflow," which imposes a specific language choice by default. This is a locale/language policy concern because the file does not indicate user choice, opt-in, or a justified region-specific constraint.
Enabling implicit invocation without narrowly defined triggers increases the chance that the skill will activate on loosely related requests and steer the conversation into generating runnable AI-HIVE commands and production workflows. In a skill that can upload reference media, query pricing, poll async jobs, and download outputs, accidental activation can lead to unintended third-party API use, unexpected cost-incurring actions, or processing of sensitive media without clear user intent.
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 specialized virtual-host product-video skill, but the implementation is a general-purpose AI Hive client that exposes unrelated capabilities. This scope expansion increases the reachable attack surface and enables users or downstream agents to invoke unintended functions outside the reviewed skill contract, weakening policy and permission boundaries.
The module self-documents as a generic AI capability tool, contradicting the specialized identity of the skill. That mismatch is dangerous because reviewers and users may trust the manifest's narrow purpose while the code actually supports a much broader set of actions, undermining transparency and security review assumptions.
This code file contains user-facing natural-language descriptions entirely in Chinese, presenting the tool as a general-purpose skill rather than a region-specific one. Because there is no opt-in or alternative locale offered in the visible instructions and prompts, it creates a language/locale policy concern under the natural-language policy rule.
Standalone text-chat and image-generation commands materially exceed the declared purpose of a virtual-host product-video skill. In skill ecosystems, this kind of hidden multifunctionality can be abused to bypass capability scoping, invoke unreviewed model classes, or route sensitive prompts and media through APIs that users did not intend to authorize.
This Python file contains user-facing natural-language strings entirely in Chinese, including the module docstring, argument parser description, skill name, and search aliases. Under the policy rule for language or locale constraints, this is a violation because the skill does not provide any user opt-in or alternative language choice.
The skill exposes a user-info/account inspection endpoint that is not part of the declared video-generation purpose. While not directly an exploit by itself, it allows unnecessary access to account metadata and balances, expanding information exposure beyond least privilege for this skill.