T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:94- Finding
API Credential Disclosure Through an Unrestricted Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its AI-HIVE video-generation purpose, but it handles API credentials and network downloads with weaker scoping than users should accept without review.
Install only if you trust the AI-HIVE endpoint and understand that the skill can store an API key, upload selected media, submit potentially billable generation jobs, and download generated files. Avoid custom base URLs, keep AI_HIVE_BASE_URL unset unless you control the endpoint, and review prompts and media paths before generation.
scripts/videogen.py:94API Credential Disclosure Through an Unrestricted Base URL
scripts/videogen.py:280Unvalidated Server-Supplied Upload and Download URLs
scripts/videogen.py:8Unpinned Third-Party Dependency Installation
A second description-behavior mismatch reinforces that the skill is presented as a specialized unboxing-video generator while the actual material points to generic ffmpeg-style processing rather than the claimed business logic. In security terms, deceptive capability descriptions weaken operator judgment, can bypass expected review gates, and may cause downstream systems to grant trust or permissions based on functions the skill does not truly provide.
A second description-behavior mismatch reinforces that the skill is presented as a specialized unboxing-video generator while the actual material points to generic ffmpeg-style processing rather than the claimed business logic. In security terms, deceptive capability descriptions weaken operator judgment, can bypass expected review gates, and may cause downstream systems to grant trust or permissions based on functions the skill does not truly provide.
The skill includes executable workflows and sample commands that rely on environment variables, filesystem access, network access, and shell execution, but it does not declare any explicit tool scope or permissions boundary. In an agent setting, this creates an overbroad execution surface where the runtime may permit sensitive operations without clear least-privilege constraints, increasing the chance of unintended API use, data exfiltration, or destructive local actions.
The skill description, usage instructions, and expected outputs are consistently presented in Chinese, which can amount to a language-policy constraint if the skill effectively forces that language by default. The file does not explicitly offer a language choice or explain that the skill is intentionally limited to a Chinese-speaking or region-specific context.
The trigger phrases are broad and include common commercial terms like '新品发布' and '商品展示', which can cause the skill to activate in contexts far beyond its intended narrow use case. Over-broad triggering is risky because an agent may invoke this skill in unrelated conversations, exposing users to unnecessary file/network/tool workflows or causing the model to follow an ill-suited process on sensitive marketing, brand, or media tasks.
The default prompt hard-codes a Chinese-language response style ('production-ready Chinese workflow') without checking the user's language preference. This can override user intent or downstream agent expectations, creating prompt steering and usability issues; while not a direct code-execution risk, it is a real prompt-level policy weakness because it imposes behavior the user did not explicitly request.
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 manifest describes a narrowly scoped skill for AI unboxing/e-commerce video generation, packaging order design, and related video workflows. However, the file implements a generic AI Hive client with chat, image, models, and user-info commands, enabling broad text chat and image generation operations beyond the stated unboxing-video purpose.
The top-level docstring explicitly says this is a '通用 AI 能力调用工具' and lists broad capabilities including text chat, image generation, video generation, model queries, media upload, and task polling. That directly conflicts with the surrounding skill identity and manifest, which present a specialized AI unboxing video generator rather than a general-purpose multimodal API client.
This code file contains user-facing natural language entirely in Chinese, including the module description and CLI guidance, while presenting itself as a general-purpose tool. The skill does not indicate that Chinese is optional or that other languages/locales are supported, which can violate language/locale choice policy for broadly scoped skills.
The skill-specific parser and dispatcher allow users to select multiple generation modes and pass arbitrary media inputs and free-form model parameters, enabling broader model use than the narrow unboxing-video use case suggests. In an agent-skill context, this capability expansion weakens least-privilege boundaries and can let downstream users repurpose the skill for unrelated or policy-sensitive content generation using the same trusted integration.
This code embeds Chinese-language product/skill names and aliases in the docstring, argument parser description, and output metadata. Because the file provides no language choice, opt-in, or documented region-specific justification, it presents a natural-language locale constraint that may violate language/locale policy.