T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Bearer API Credential Can Be Sent to an Arbitrary Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill largely matches its Douyin e-commerce video purpose, but it needs review because its bearer API key can be sent to any configured API host.
Before installing, confirm you trust AI Hive with the product images, videos, prompts, generated outputs, and API key this skill will use. Do not set --base-url, AI_HIVE_BASE_URL, or ~/.ai-hive/config.json base_url to anything except the intended AI Hive host unless you are deliberately using a trusted compatible endpoint with separate credentials. Prefer installing dependencies in a virtual environment and avoid running pip or the skill as an administrator.
scripts/videogen.py:91Bearer API Credential Can Be Sent to an Arbitrary Endpoint
SKILL.md:69Unpinned Runtime Dependency Installation Creates Supply-Chain Risk
This markdown file contains user-facing natural-language content exclusively in Chinese across the substantive changelog entries. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.
The skill includes executable shell commands and a Python script workflow that imply access to environment variables, filesystem, network, and shell, but it declares no explicit tool restrictions. Without scoped permissions, an agent may invoke the skill in a broader execution context than intended, increasing the chance of unintended file access, network calls, or command execution if the script or its inputs are abused.
L03 says "Use this skill for" followed by a wide list of video-related scenarios, but it does not define explicit activation boundaries or exclusions. This broad invocation wording in a manifest file can cause unintended triggering for general requests about Douyin ecommerce videos.
The manifest describes a focused skill for generating and editing Douyin e-commerce product and livestream videos, but this file contains a reusable OpenAPI wrapper for unrelated capabilities including text chat, image generation, user-info lookup, model enumeration, and generic media upload. Those operations materially exceed the narrow product-video purpose rather than serving as unavoidable implementation details of it.
This Python skill includes user-facing description text entirely in Chinese, and later CLI help and status messages are also Chinese-only. Under the policy, forcing a specific language without offering a language choice or documenting a justified locale restriction is a natural-language policy violation.
The script's error/help text shown to users is in Chinese, and this pattern continues across prompts, status messages, and command help. Because the file does not offer any language/locale option or state that the skill is restricted to a Chinese-speaking context, it violates the language-choice policy.
A dedicated Douyin e-commerce video production skill would reasonably need video generation, editing, upload, task polling, and result download, but a general text chat endpoint is not justified by that purpose. The code also wires this into a CLI command, making it an exposed capability rather than dead helper code.
The manifest is centered on generating and editing product, SKU, livestream, and ad videos, not independent still-image generation. While image inputs for video generation are expected, a separate image-generation API and command add a distinct capability not clearly justified by the stated purpose.
The placeholder value for api_key includes Chinese text (请替换为你的APIKey), which imposes a specific language in user-facing configuration content. There is no indication that this skill is region-specific or that alternative language/localization options are supported.
The top-level docstring says this is a '通用 AI 能力调用工具' covering text chat, image generation, video generation, model query, media upload, and task polling. That directly conflicts with the specialized manifest and embedded SKILL_CONFIG identifying this file as a Douyin e-commerce video generation/editing skill.
No suspicious patterns detected.