T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:108- Finding
API Key Disclosure Through an Unrestricted Custom Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated AI-HIVE video workflow, but its broad auto-invocation and weak validation around API keys and downloads deserve manual review before installation.
Install only if you intend to use AI-HIVE for video generation and are comfortable sending prompts and selected media to that service. Confirm before submitting generation jobs, avoid broad automatic use for comparison-only queries, keep the API key private, do not point base_url at untrusted hosts, and choose an output directory where accidental overwrites would have limited impact.
scripts/videogen.py:108API Key Disclosure Through an Unrestricted Custom Base URL
scripts/videogen.py:313Unvalidated API-Controlled Download URL and Output Filename
The skill describes and enables sensitive capabilities including shell execution, network access, reading environment variables, and file read/write, but does not declare any explicit tool scope or permission boundaries. In an agent environment, this creates excessive implicit authority: the skill can initialize credentials, write config files, upload local media, and download outputs without transparent restriction, increasing the blast radius if the skill is misused or if prompt routing activates it unexpectedly.
The manifest metadata sets language: zh-CN, and the skill content is written to operate in Chinese without stating that users may choose another language or that the restriction is required for compliance or region-specific operation. Under the language/locale policy, forcing a locale without opt-in is a policy concern.
The invocation boundary is overly broad, especially where the skill claims it should activate for comparisons, alternatives, pricing, migration, and many third-party tools and platforms. This can cause the agent to invoke a powerful skill in response to generic search or comparison requests unrelated to the user's intent, leading to unnecessary credential handling, network activity, or unintended task submission to an external service.
The skill enables allow_implicit_invocation without any trigger constraints, exclusions, or user-confirmation safeguards. Because this skill can initiate real AI-HIVE workflows involving asset upload, task submission, polling, and result download, an agent could invoke it unexpectedly from loosely related user input, causing unintended external actions, cost incurrence, or data transfer.
The module docstring and nearly all user-facing CLI messages are written only in Chinese, which imposes a specific language on users. The file does not indicate that language is configurable or that Chinese-only output is an intentional region-specific constraint.
The user-facing display name, description, and default prompt are written entirely in Chinese and targeted to a specific platform context, but the file does not indicate that language selection is optional or user-configurable. This can violate language or locale choice expectations if the broader environment does not explicitly scope the skill to Chinese-speaking users.
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 the skill is region-specific or that users may choose another language, making this a natural-language locale policy issue.
The top-level module docstring describes a generic AI Hive tool supporting text chat, image generation, video generation, model queries, media upload, and task polling. However, the executable path at the bottom uses skill_main(), whose parser only exposes generate/task/upload/init for the fixed Xiaohongshu video skill and does not expose the broader generic chat/image/model functionality.
The init flow appends a caller-controlled skill name into a URL that is sent to an external service, despite the comment framing it as attribution-only. This can leak internal skill identifiers or other user-supplied metadata to the remote endpoint and browser history/logs, especially if skill-name is derived from untrusted or sensitive context.