T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Unrestricted API Endpoint Override Can Disclose the Bearer Token
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for AI-HIVE video workflows, but its credential and download handling create real review-worthy security risks.
Install only if you are comfortable giving this skill an AI-HIVE API key and access to selected media files. Avoid custom base URLs unless you fully trust the endpoint, review generated commands before running them, prefer --no-download for untrusted tasks, and keep API keys out of logs and shared projects.
scripts/videogen.py:91Unrestricted API Endpoint Override Can Disclose the Bearer Token
scripts/videogen.py:327Server-Controlled Task Metadata Can Escape the Output Directory
scripts/videogen.py:279Unvalidated Remote URLs Permit Media Redirection and Internal Network Requests
scripts/videogen.py:7Unpinned Dependency Installation Produces Non-Reproducible Builds
The declared description promises a comprehensive Seedance 2.5 workflow skill with generation, reference, editing, extension, and AI-HIVE API-backed media task operations. The supplied code does not implement those capabilities. Its actual purpose is narrowly limited to generating a basic JSON brief from command-line arguments. While some fields loosely align with the domain (search aliases, required facts, artifacts), that is only metadata scaffolding and not the described operational behavior. Therefore the description materially overstates the implemented functionality.
This is a clear description-behavior mismatch. The declared purpose centers on Seedance 2.5 creative assistance and API-backed media-generation workflow support. The supplied code instead implements a narrow local video-editing CLI around ffmpeg/ffprobe. While 'video editing' is mentioned in the description, the code does not provide the described high-level Seedance expertise, prompt creation, reference-media workflow, or any network/API behavior. Its primary purpose is materially different: deterministic local media manipulation rather than Seedance prompt/workflow execution.
The skill advertises and demonstrates operations that imply access to environment variables, local files, network services, and shell-executed tooling, but it declares no explicit tool scope or permission boundary. That creates an authorization ambiguity where an agent or reviewer may permit broader capabilities than intended, increasing the risk of secret exposure, unsafe file access, or unintended command/network execution.
The default prompt hard-codes Chinese output regardless of the user's language preference, which can override user intent and reduce transparency about what the system is doing. In a security-sensitive workflow that may generate executable commands and operational guidance, forcing a language without opt-in increases the risk of user misunderstanding, accidental execution, or missed warnings.
The skill enables implicit invocation while the metadata describes a broad set of loosely bounded use cases, which can cause the agent to trigger this skill for requests the user did not clearly intend. Because the skill can produce runnable AI-HIVE commands and workflow steps, unintended activation could steer conversations into external-service actions, cost-incurring operations, or inappropriate content generation paths without clear user consent.
The script description and embedded content are presented in Chinese-only strings such as the tool name, aliases, and required facts, with no option to select another language or locale. This can violate language/locale policy where skills must not force a specific language without explicit user choice or documented regional scope.
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 top-level module docstring says this file is a '通用 AI 能力调用工具' that wraps text chat, image generation, video generation, model querying, media upload, and task polling. However, the skill manifest describes a specialized Seedance 2.5 prompt/video workflow skill; exposing broad generic AI-Hive capabilities in the same file is a semantic mismatch between claimed skill scope and actual implemented behavior.
This code file contains natural-language strings and documentation entirely in Chinese, including the module docstring and user-facing CLI guidance. The skill does not provide an explicit language/locale choice or justify a Chinese-only restriction, which can violate language/locale policy for generally applicable skills.
The file contains general-purpose text chat and image generation capabilities that exceed the declared Seedance 2.5 prompt/video scope. Even though the skill-specific entrypoint currently exposes only generate/task/upload, bundling broader API actions in the same skill increases the risk of capability confusion, accidental exposure in future changes, or repurposing of the skill to perform actions users and reviewers would not expect.
This code creates parent directories and writes a JSON file to a user-specified path, which is a file-modifying operation. Although expected for a blueprint generator, the file contains no docstring detail, comment, or user-facing message before the write explaining that it will create directories and overwrite/write the output path.
The manifest describes a creative workflow assistant for Seedance 2.5 prompting and media generation operations. The additional ability to fetch user info and wallet balance is an account-inspection capability that is not necessary to provide prompt-writing, editing, extension, or media-generation orchestration.
The comment says the browser is opened with a query parameter '为后端归因预留', implying a limited attribution purpose. In practice, the code includes the concrete skill name in the outbound URL, which discloses per-skill usage context to the remote service; that is more specific behavior than the comment suggests.