T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
API Key Disclosure Through an Unrestricted Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a plausible AI Hive video generator, but it needs review because it handles API keys, local media uploads, and downloads with under-scoped URL and file-write protections.
Install only if you trust AI Hive and the publisher, use a dedicated API key with limited balance or permissions if possible, avoid setting AI_HIVE_BASE_URL or --base-url to non-official hosts, run it in a constrained environment for sensitive media, and choose an output directory where accidental overwrites would not be damaging.
scripts/videogen.py:91API Key Disclosure Through an Unrestricted Base URL
scripts/videogen.py:278Unvalidated Server-Controlled Upload and Download URLs
scripts/videogen.py:394Path Traversal Through Server-Controlled Download Filenames
SKILL.md:87Unpinned Runtime Dependency Installation
This markdown file uses Chinese-language release notes throughout the substantive content, but does not indicate that the skill is region-specific or provide an opt-in language/locale choice. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation.
The skill invokes a local Python script with shell commands, supports reading local media inputs, writing outputs, and likely making network requests to external video-generation endpoints, but it does not declare any explicit tool scope or permissions. This creates a trust and containment gap: an agent may grant broader file, shell, environment, or network access than users expect, increasing the risk of unintended data exposure or command execution through this skill.
The module docstring and implemented CLI expose generic AI Hive capabilities including text chat, image generation, model listing, user info retrieval, media upload, and task polling, not just TikTok Shop sales video creation/editing. While some helper operations are expected for video generation, full chat and standalone image-generation workflows materially broaden behavior beyond the manifest’s stated video-focused scope.
The skill implements a generic chat/text API and exposes it via the chat subcommand, including multimodal image input. A TikTok Shop viral sales video generation skill may reasonably use prompts internally, but offering a general-purpose chat interface is a separate capability not justified by the manifest’s video-creation scope.
The code exposes a full image-generation workflow independent of video generation. Although reference images can be relevant to video creation, a separate image generator is not clearly justified by a skill whose manifest is specifically about creating and editing TikTok Shop sales videos.
The embedded SKILL_CONFIG hard-codes the skill as a 'TikTok Shop 爆款带货视频生成' tool for overseas social commerce and TikTok Shop marketing use. This constrains the skill to a specific market/platform context in natural-language metadata without offering the user a choice of locale/market framing or documenting why that policy is required.
The example API key placeholder uses Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing natural language content. This can violate language/locale policy when no user opt-in or documented regional justification is provided.
The code provides a user-info endpoint and CLI command that retrieves account information and wallet balance. That capability is not an obvious requirement for creating or editing TikTok Shop UGC sales videos, and the manifest does not mention account inspection or billing visibility as part of the skill’s scope.