T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:88- Finding
API credentials may be transmitted to an arbitrary or plaintext endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears intended for AI-HIVE video repurposing, but it handles API keys, uploads media, can run billable external jobs, and accepts an unvalidated custom API endpoint that could expose credentials.
Review this skill before installing. Use it only with media you are authorized to upload, confirm any generation parameters before paid API calls, prefer environment or protected config credentials over `--api-key`, and do not set `AI_HIVE_BASE_URL` or `--base-url` away from the official AI-HIVE HTTPS endpoint unless you fully trust that server.
scripts/videogen.py:88API credentials may be transmitted to an arbitrary or plaintext endpoint
scripts/videogen.py:585Command-line API key option exposes credentials through process metadata and shell history
SKILL.md:67Unpinned third-party dependency installation is not reproducible
The declared description promises a substantial end-to-end content repurposing system with optional external API integration and rich output artifacts. The supplied code does not implement that behavior; it only creates a static/deterministic production-brief JSON scaffold from command-line inputs. This is a material description-behavior mismatch because the primary purpose is different: metadata blueprint creation versus actual long-video decomposition and AI-assisted content generation workflow.
The description promises a high-level long-video-to-30-shorts content repurposing skill with creative planning and optional external API-based asset generation. The supplied code only exposes basic ffmpeg editing commands. While trimming and aspect-ratio conversion could support a broader repurposing pipeline, the vast majority of the declared functionality is absent, and the primary purpose is materially different: a small local media-editing CLI rather than a content-strategy and AI-assisted short-video generation system. No undeclared risky capability is evident, but the description does not accurately represent what this code chunk actually does.
There is a substantial description/behavior mismatch. The declared purpose describes a specialized content-repurposing skill whose main job is to transform a long video plus business/context inputs into a structured package of 30 short-video candidates and related editorial assets. The supplied code does not implement that workflow. Instead, it implements a reusable AI Hive OpenAPI client and CLI for generic operations: chat/text calls, image generation, video generation, model lookup, media upload, task polling, downloading results, user-info retrieval, and API key initialization.
Although the code contains a skill-specific configuration named for 'long-video-to-thirty-shorts', that wrapper only selects among preset video-generation models and forwards a prompt plus optional media inputs into generic video generation. It does not perform long-video decomposition, transcript parsing, deduplication of independent viewpoints, platform-specific rewriting, or assembly of 30 discrete short-video deliverables.
The declared mention of AI-HIVE upload/query/pricing/routing/polling/download aligns with some implementation details, but those are only support mechanics. The primary business behavior promised in the description is missing, while several undeclared generic capabilities are present. Therefore this should be flagged as a mismatch.
The skill advertises executable commands that use environment variables, local files, networking, and shell-driven tooling, but it declares no explicit tool scope or permissions boundary. That creates ambient-authority risk: an agent may invoke file, network, or shell capabilities more broadly than intended, increasing the chance of unauthorized file access, exfiltration, or external API use.
The activation conditions include broad, common marketing phrases and generic requests like turning a reference case into original content with scripts or task lists. Overbroad triggers can cause unintended invocation in unrelated contexts, leading the agent to pull in networked/media-generation workflows, request unnecessary sensitive assets, or steer users into billable operations without strong relevance.
The skill is scoped to very broad marketing, ecommerce, advertising, and social-media scenarios, making accidental activation more likely. In this context, unintended invocation is more dangerous because the skill references uploads, external API calls, content generation, and paid routing choices, which could expose proprietary media or trigger unnecessary external actions.
The default prompt explicitly instructs the skill to produce a 'production-ready Chinese workflow,' which imposes a language choice on the user. The file does not mention any user opt-in, alternative language option, or justification for requiring Chinese.
The skill enables implicit invocation without any visible trigger constraints, exclusions, or safety gating in this file. That increases the chance the agent will auto-select this skill in loosely related contexts and produce operational AI-HIVE workflows or media-generation steps the user did not explicitly request, which is especially risky for a marketing/content-reuse skill that could be misapplied to deceptive or unauthorized content tasks.
The file’s natural-language description and CLI parser description are hard-coded in Chinese, and the generated skill metadata also uses Chinese-only naming. This can violate a language/locale policy when the skill does not offer any user opt-in or alternative language selection.
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 presents itself as a narrowly scoped long-video-to-thirty-shorts skill, but actually includes a broad-purpose AI client with chat, image generation, model enumeration, account inspection, upload, and generic video operations. This scope mismatch violates least privilege and increases the chance that callers can use the skill as a general API wrapper rather than the advertised workflow, enabling unreviewed or policy-bypassing actions.
This code file contains natural-language user-facing descriptions and help text that assume Chinese as the only operating language. The policy allows locale constraints only when they are documented and justified or when the user is given a choice, which is not present here.
The skill can query user/account information and wallet balance even though that is not necessary for transforming long videos into short clips. In a delegated-agent setting, this creates unnecessary data exposure and can leak account metadata or billing information to prompts, logs, or downstream users.
The generic chat command is unrelated to the stated purpose and turns the skill into a general text/multimodal AI access path. That expanded surface can be abused to send arbitrary prompts and uploaded media through the account, bypassing the narrower controls expected for a video-repurposing tool.
Standalone image generation is not justified by the claimed long-video-to-thirty-shorts purpose and broadens the skill beyond its declared function. In practice this lets an agent generate unrelated synthetic assets through the same credentials, increasing misuse risk and reducing transparency about what the skill can do.