T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:92- Finding
Bearer API Key Can Be Transmitted to an Arbitrary Configured Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its AI-HIVE video-production purpose, but its API client can send a bearer API key to any configured base URL, which users should review before installing.
Install only if you trust AI-HIVE and can protect the API key. Avoid using --base-url, AI_HIVE_BASE_URL, or edited ~/.ai-hive/config.json values unless you fully trust the endpoint, because the bearer key will be sent there. Expect local media reads/uploads only for files you explicitly pass, downloads to the configured output directory, and ffmpeg execution for local video edits.
scripts/videogen.py:92Bearer API Key Can Be Transmitted to an Arbitrary Configured Endpoint
scripts/videogen.py:615Initialization Opens a Vendor URL with Undisclosed Skill Attribution
The skill description promises a structured AI-HIVE advertising-production workflow, but the detected behavior appears to center on generic local ffmpeg media processing and lacks the declared orchestration, intake, and API-integration features. This mismatch is dangerous because users and agents may grant trust or permissions based on the stated purpose while the actual behavior operates differently, weakening reviewability and increasing the chance of unintended command execution or misuse.
The skill advertises and demonstrates code paths that can use environment variables, filesystem access, network calls, and shell execution, but it declares no explicit tool scope or permission boundaries. In an agent environment, this can lead to overbroad capability exposure, making it easier for downstream prompts or modified scripts to access secrets, invoke external services, or run local commands without clear policy enforcement.
The default prompt hardcodes Chinese output ('production-ready Chinese workflow') regardless of the user's preferred language. This can override user intent, reduce transparency, and increase the chance that users approve or execute generated workflow/code they do not fully understand, especially in a skill that emits runnable commands and production deliverables.
Implicit invocation is enabled without narrow trigger constraints, so the skill may activate automatically on broad ad/video-related requests and begin producing executable AI-HIVE commands or workflow outputs without clear user consent. In this skill's context, that is more dangerous because it interfaces with external APIs, uploads reference assets, performs pricing/routing decisions, and generates runnable operational steps that could lead to unintended actions, cost exposure, or misuse.
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 general-purpose commands for text chat, image generation, model listing, user-info retrieval, and generic media upload (for example L170-L219, L221-L232, L421-L499, L665-L727), while the manifest describes a specialized ecommerce TVC ad studio focused on concepting, storyboards, AI previsualization, video generation workflow, and related delivery steps. Those extra generic AI operations are not obviously required by the stated skill purpose and make the implementation materially broader than the manifest suggests.
This code file contains natural-language instructions, help text, and descriptions that are presented only in Chinese, including the module docstring and later CLI help strings. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified, which it is not here.
The file embeds the skill description and name entirely in Chinese in user-facing natural-language strings. Under the policy rule for language/locale constraints, this can be a violation because the skill presents a fixed language without any opt-in or alternative locale handling.
The manifest centers on producing ecommerce TVC advertising outputs via AI-HIVE model configuration, upload, pricing, routing, polling, and download. Exposing a dedicated user-info endpoint and CLI command for querying user information and wallet balance (L170-L171, L421-L423, L665-L667) adds an account-inspection capability unrelated to creative video production itself.