T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:399- Finding
Server-Controlled Filename Allows Output Directory Traversal
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its video-generation purpose, but it has real safety gaps around API-key destination control and downloaded output paths that users should review before installing.
Install only if you are comfortable sending prompts and selected product media to AI Hive. Use the default official API URL, avoid custom base-url or AI_HIVE_BASE_URL values unless you fully trust the endpoint, consider a limited API key, and choose an output directory where accidental file writes would not damage important data.
scripts/videogen.py:399Server-Controlled Filename Allows Output Directory Traversal
scripts/videogen.py:91Bearer Credentials Can Be Sent to Arbitrary or Plaintext API Endpoints
scripts/videogen.py:278Unvalidated Remote Media Destinations Enable Data Disclosure and Arbitrary Network Requests
SKILL.md:68Unpinned Runtime Dependency Installation Creates Supply-Chain Risk
The skill exposes shell, network, environment, and file access through documented commands, but it does not declare any explicit permission boundary or allowed-tools scope. That creates an overprivileged execution surface where a caller or future modification could use those capabilities beyond the narrow video-generation workflow, increasing the risk of unintended file access, secret exposure, or arbitrary command execution.
The manifest description and title are written entirely in Chinese and explicitly position the skill for Chinese/JD e-commerce use, but there is no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.
The file is implemented as a generic AI Hive client exposing chat, image generation, model enumeration, upload, and task APIs, while the declared skill is narrowly framed as JD e-commerce video generation/editing. This scope mismatch increases the attack surface and allows callers to invoke capabilities outside the reviewed business purpose, undermining least-privilege and making policy bypass more likely.
The module docstring explicitly presents the file as a generic AI capability tool, contradicting the manifest's JD-specific video-editing intent. This is a strong indicator that the implementation was repurposed without properly constraining exposed behavior, which increases the risk of reviewers and users misunderstanding the real authority of the skill.
This code file contains user-facing natural-language descriptions entirely in Chinese and presents the tool as a general-purpose AI capability wrapper, but nowhere offers a language or locale choice. For a broadly applicable skill, forcing a specific language without opt-in can violate language/locale policy expectations.
The text chat command permits arbitrary prompt submission to a general text model, which is unrelated to the advertised JD video-editing workflow. In a skill ecosystem, that enables unreviewed general-purpose model access and can be abused for unintended content generation, prompt handling, or policy circumvention through a tool that appears domain-specific.
The standalone image generation path exposes a broader creative capability than the declared video-generation/editing purpose. That broadens what users can do through this skill beyond what reviewers and users would expect, creating a capability-confusion problem and unnecessary access to remote generation services.
The skill uploads local media files to remote services and later downloads results, but the main user-facing generate/upload entrypoints do not present an explicit privacy or data-transmission warning. For a JD e-commerce media workflow, users may supply product assets, internal creatives, or unpublished marketing material; silent remote transfer increases the risk of accidental disclosure or policy noncompliance.
This markdown file uses Chinese throughout the substantive changelog entries, which can impose a language constraint on users without any stated opt-in or justification. Under the policy rule, forcing a specific language without offering choice or documenting a justified regional scope is a natural-language policy concern.
The example API key placeholder uses Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing content. For a general configuration example, this is a natural-language locale choice without any opt-in or justification.
The skill implements get_user_info and list_models, exposed through CLI commands for wallet/account information and available model enumeration. These are general account and platform-inspection capabilities, not capabilities clearly justified by the manifest’s JD ecommerce video generation/editing purpose.