T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Bearer API credential can be disclosed 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 virtual try-on video purpose, but it can send a user's AI-HIVE API key to an unrestricted custom API endpoint.
Review before installing. Use only the default AI-HIVE endpoint, avoid setting --base-url or AI_HIVE_BASE_URL unless you fully trust the destination, and consider a spend-limited or revocable API key. Confirm all billable generation parameters before running commands, and install dependencies in an isolated environment with pinned packages where possible.
scripts/videogen.py:91Bearer API credential can be disclosed through an unrestricted custom Base URL
scripts/videogen.py:16Runtime dependency installation guidance lacks version and integrity pinning
This finding indicates the skill may expose broader undeclared functionality such as general chat, image generation, account/balance retrieval, model enumeration, or interactive API-key setup while presenting itself as a narrow try-on workflow. Undeclared capabilities are risky because they expand the attack surface, may encourage secret handling or account probing, and defeat policy decisions based on the declared narrow purpose.
This finding indicates the skill may expose broader undeclared functionality such as general chat, image generation, account/balance retrieval, model enumeration, or interactive API-key setup while presenting itself as a narrow try-on workflow. Undeclared capabilities are risky because they expand the attack surface, may encourage secret handling or account probing, and defeat policy decisions based on the declared narrow purpose.
This finding indicates the skill may expose broader undeclared functionality such as general chat, image generation, account/balance retrieval, model enumeration, or interactive API-key setup while presenting itself as a narrow try-on workflow. Undeclared capabilities are risky because they expand the attack surface, may encourage secret handling or account probing, and defeat policy decisions based on the declared narrow purpose.
The skill advertises runnable scripts that can read environment variables, access files, invoke shell tools, and make network requests, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this creates an over-privileged integration surface where the skill may be invoked without clear least-privilege constraints or user visibility into what resources it can access.
The activation list includes generic phrases such as “服装视频” and broad conditions like requests in advertising, marketing, social media, or wanting to turn a reference case into original content. These descriptions are expansive enough to overlap with many ordinary content-creation requests, making it unclear when this skill should activate instead of a more general video or marketing skill.
The default prompt requires a "production-ready Chinese workflow," which imposes a specific language choice regardless of user preference. This is a natural-language policy concern unless the skill explicitly offers language selection or clearly justifies a Chinese-only scope.
The skill enables implicit invocation with no trigger scope, guardrails, or user-confirmation constraints, which can cause the agent to auto-select this skill in loosely related contexts. Because this skill is designed to generate runnable AI-HIVE commands and production workflows for media generation, unintended invocation could trigger sensitive content handling, external API preparation, or policy-bypassing assistance without sufficiently explicit user intent.
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 module is presented and implemented as a broad, general-purpose AI Hive client with chat, image, video, upload, model enumeration, and account utilities, which exceeds the declared scope of an avatar try-on video skill. Scope expansion increases attack surface and enables unintended uses through this skill wrapper, weakening policy enforcement tied to the advertised purpose.
The top-level documentation advertises a generic AI capability tool, contradicting the specialized try-on video intent in the skill metadata. This mismatch is dangerous because reviewers, orchestrators, or downstream tooling may trust the manifest while the implementation exposes a much wider set of functions.
Exposing text chat in a skill intended for avatar try-on video creates an unnecessary capability channel that can be repurposed for unrelated or policy-bypassing tasks. Even if not directly invoked by the skill entrypoint, shipping this functionality in the same tool broadens reachable behavior and makes misuse easier if the script is reused or called differently.
Generic image generation is outside the declared try-on video purpose and permits the skill bundle to be used for unrelated content creation. This undermines least-privilege design and can bypass higher-level restrictions that assume the skill only produces controlled try-on video outputs.
The description specifies invocation using Chinese phrases only and does not indicate that other languages are accepted or that the language choice depends on user preference. This creates a locale-specific constraint in the natural-language guidance without opt-in or justification as a region-limited skill.
The natural-language strings in the file, including the module docstring, CLI description, skill name, and search aliases, are entirely Chinese and present the skill identity in that locale without any opt-in or language-selection mechanism. The policy specifically calls for flagging language or locale constraints when the skill forces a specific language without user choice.
The module docstring and all user-facing help text are written in Chinese, presenting the skill as a general-purpose tool rather than a region- or locale-specific one. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.
Commands for querying user wallet/account info and listing all available models are convenience capabilities for a generic platform client, not an obvious requirement of a focused try-on-video skill. While useful operationally, they are broader than the manifest’s end-user purpose and reveal platform capabilities outside the skill’s declared function.