T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:94- Finding
API Credential Exfiltration Through an Unrestricted Custom Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE video workflow, but it handles API credentials in a way that can send them to an arbitrary configured endpoint.
Review before installing. Only use this with an AI-HIVE API key you are comfortable storing locally, do not set --base-url or AI_HIVE_BASE_URL to an untrusted endpoint, and check ~/.ai-hive/config.json before running credentialed commands. Expect uploads/downloads, local media file processing, and potentially billable generation jobs after confirmation.
scripts/videogen.py:94API Credential Exfiltration Through an Unrestricted Custom Base URL
The skill is presented as a specialized original-remake assistant, but its effective behavior appears to include broad generic API interactions such as chat, image generation, model enumeration, wallet/user info access, and video job submission. That capability expansion increases risk because a user invoking a narrowly described marketing-writing skill may unknowingly trigger broader account-level or billable operations against external services.
The skill is presented as a specialized original-remake assistant, but its effective behavior appears to include broad generic API interactions such as chat, image generation, model enumeration, wallet/user info access, and video job submission. That capability expansion increases risk because a user invoking a narrowly described marketing-writing skill may unknowingly trigger broader account-level or billable operations against external services.
The skill advertises executable workflows that use environment variables, local files, network access, and shell commands, but it does not declare any explicit tool scope or permissions boundaries. In an agent environment, that can cause over-privileged execution or unclear trust boundaries, making it easier for the skill to access sensitive files, invoke external services, or run local commands beyond what a user would reasonably expect.
Forcing the default prompt to always produce a Chinese workflow without user choice reduces transparency and can cause the agent to respond in a language the user did not request, undermining informed consent and reviewability. In a skill that produces runnable commands and production workflows, unexpected language coercion can make it harder for users or reviewers to spot problematic instructions, though the security impact is limited compared with direct code-execution issues.
Enabling implicit invocation without trigger constraints allows this skill to activate on loosely related user requests, increasing the chance it is invoked without clear user intent or adequate authorization checks. In this skill’s context, that is more concerning because it can steer users into workflows for 'viral remake' content generation, including API-driven asset handling, where misuse around unauthorized copying or policy-evading marketing content is already a stated risk.
The manifest describes a skill centered on generating original story structures and, when needed, using AI-HIVE OpenAPI for media-generation workflows such as config queries, uploads, routing, polling, and downloads. This file instead provides direct local video manipulation operations via ffmpeg/ffprobe (trim, aspect conversion, mute, loudness normalization, concat), which are production-editing capabilities not described as part of the skill's declared scope.
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 implements a broad AI-Hive media client with chat, image, video, upload, model enumeration, and polling features rather than a narrowly scoped story-structure-remake tool. This capability mismatch increases attack surface and enables uses outside the declared authorized-remake workflow, weakening policy and intent enforcement.
The file’s natural-language description and all user-facing prompts are written in Chinese, with no indication that users can choose another language. For a general-purpose skill described as a "通用 AI 能力调用工具," this creates a locale/language constraint that is not explicitly optional or justified.
Exposing user account information and wallet balance is unnecessary for the stated story-remake purpose and creates avoidable access to sensitive billing/account metadata. In an agent context, this can leak private operational details or be abused for reconnaissance about the user's account state.
The module docstring and CLI description hard-code Chinese-language text ('爆款视频故事结构原创复刻|AI-HIVE') with no indication that users can select another language or locale. This is a natural-language policy concern because the skill presents a fixed language experience rather than offering opt-in or documenting a justified locale constraint.
Listing all available models and searching by publicModelId gives the operator broad platform introspection rather than a purpose-built interface for this specific remake workflow. The manifest already implies specific generation paths and does not justify exposing full generic model discovery as a user-facing capability.
The manifest says media generation support should be used to complete the remake workflow, but the skill also exposes independent upload and task commands as a generic media-management interface. That broadens the behavior from a focused story-structure skill into a general AI-Hive job-control tool.