T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:91- Finding
Unrestricted API Base URL Can Expose the Bearer Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for AI-HIVE video generation, but it has an under-scoped credential risk because the API bearer key can be sent to an arbitrary configured base URL.
Review this before installing. Use only the default AI-HIVE API endpoint unless you fully trust the custom endpoint, and check AI_HIVE_BASE_URL plus ~/.ai-hive/config.json before running commands with your API key. Treat generation as potentially billable, confirm uploads and parameters first, and do not provide media you are not authorized to use.
scripts/videogen.py:91Unrestricted API Base URL Can Expose the Bearer Credential
The finding indicates undeclared generic capabilities such as text chat, image generation, wallet/account querying, and model catalog access beyond the claimed motion-transfer specialization. Undeclared capabilities are security-relevant because they broaden what an agent may do with user data or external services without user awareness, including exposing billing/account context or invoking unrelated model actions.
The finding indicates undeclared generic capabilities such as text chat, image generation, wallet/account querying, and model catalog access beyond the claimed motion-transfer specialization. Undeclared capabilities are security-relevant because they broaden what an agent may do with user data or external services without user awareness, including exposing billing/account context or invoking unrelated model actions.
The finding indicates undeclared generic capabilities such as text chat, image generation, wallet/account querying, and model catalog access beyond the claimed motion-transfer specialization. Undeclared capabilities are security-relevant because they broaden what an agent may do with user data or external services without user awareness, including exposing billing/account context or invoking unrelated model actions.
The skill advertises executable workflows using shell commands, environment variables, local file handling, network calls, and ffmpeg/API interactions, but it declares no explicit tool scope or permission boundaries. In an agent environment, this creates an over-broad capability surface where the model may invoke sensitive operations without auditable least-privilege constraints, increasing the chance of unintended file access, secret exposure, or external requests.
The manifest description specifies invocation using Chinese phrases such as '动作迁移' and 'AI舞蹈' and frames the skill entirely in Chinese, but does not indicate that other languages are supported or that the language requirement is optional. This can violate language/locale policy when users have not opted into Chinese-language interaction.
The default prompt hard-codes Chinese output ('production-ready Chinese workflow') regardless of the user's language preference. This is a real prompt-safety and UX control issue because it can override user intent, reduce transparency, and increase the chance that users accept output they cannot fully review, especially in a workflow involving external media generation and uploads.
Enabling implicit invocation without narrow trigger constraints can cause the skill to activate in broader contexts than intended, including requests that only loosely resemble motion-transfer use cases. In this skill's context, that is more dangerous because the skill can produce runnable AI-HIVE commands and workflow steps for media generation, uploads, polling, and downloads, increasing the chance of unintended execution paths, unauthorized content processing, or policy-sensitive output.
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 file is packaged as a motion-transfer skill, but the code exposes a broader general-purpose AI Hive client with unrelated capabilities such as chat, model enumeration, uploads, and account queries. In a least-privilege skill ecosystem, this scope expansion increases attack surface and enables operators or downstream agents to invoke actions outside the declared user intent and review boundary.
This code file contains natural-language descriptions and CLI guidance entirely in Chinese, starting from the module docstring and continuing throughout the interface. Because the skill does not offer the user any language or locale choice, it effectively forces a specific language without opt-in.
The skill exposes a standalone text-chat API path even though the manifest describes a reference-motion-transfer video skill. This creates capability drift: an agent granted this skill could use it for arbitrary LLM interaction, potentially bypassing product controls, logging expectations, or approval boundaries associated with the narrower video workflow.
The standalone image-generation path is not necessary for a motion-transfer-only skill and expands the available actions beyond declared scope. That mismatch is dangerous in agent environments because policy and user trust are tied to the manifest; hidden extra generation capabilities can be misused to produce unrelated content under the guise of a narrower skill.
User account and wallet-balance lookup is unrelated to reference motion transfer and exposes unnecessary sensitive metadata. Even if limited to the current API key's account, this leaks billing or identity information and violates least privilege for a media-generation skill.