T09 · Insecure Skill Coding Practices
- Location
scripts/videogen.py:92- Finding
Bearer API Credential Disclosure Through Unrestricted Base URL Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This looks like a legitimate AI-HIVE meme-video helper, but it has under-scoped credential and file-write risks users should review before installing.
Install only if you trust the publisher and are willing to review the helper script before use. Keep the API host at the official AI-HIVE URL, do not use untrusted --base-url or AI_HIVE_BASE_URL values, and rotate the API key if it may have been used with a custom endpoint. Treat generated downloads as untrusted files and confirm all paid generation parameters before running commands.
scripts/videogen.py:92Bearer API Credential Disclosure Through Unrestricted Base URL Configuration
scripts/videogen.py:373Arbitrary File Write Through Unsanitized API Task Metadata
The declared description presents a full meme short-video generator and AI-HIVE-integrated workflow for producing rewritten branded meme content and managing media-generation jobs. The supplied code does not perform any of those core functions. It only parses command-line arguments and writes a static JSON brief with metadata and checklist-style fields. While this could be a small supporting component of the broader skill, the chunk’s actual primary behavior is much narrower and materially different from the declared end-to-end generation and API orchestration capabilities.
The declared description presents a higher-level meme/brand-content generation skill with external API-driven media generation and workflow orchestration. The supplied code instead implements a simple local CLI wrapper around ffmpeg/ffprobe for basic editing tasks. While short-video editing could be a supporting detail for such a skill, the code lacks the central described behaviors and integrations, and its actual primary purpose is materially different from the declared purpose.
The declared description presents a domain-specific creative skill centered on meme remixing for brands and social media operations, including higher-level editorial outputs like explaining meme structure, rewriting it into an original branded expression, and producing subtitles/publishing variants. The code, however, mostly implements a reusable AI Hive command-line SDK: it can initialize API keys, open a browser, query user info and wallet balance, list/find models, upload media, invoke generic text/image/video endpoints, poll tasks, and download assets. While the wrapper at the bottom configures preset video models and supports the AI-HIVE operational details described (pricing snapshot, routing modes, upload, polling, download), it does not encode the specialized meme-analysis or brand-content transformation workflow described as the main purpose. It also exposes extra capabilities not declared, notably generic chat, image generation, model enumeration, and user-info access. Therefore the description does not accurately represent the actual code's behavior.
The skill embeds executable command examples and describes capabilities involving environment variables, file access, network access, and shell usage, but it declares no explicit tool scope or allowed-tools boundary. In an agent setting, that omission can cause overbroad tool access, making it easier for the skill to trigger network calls, read/write local files, or expose secrets without clear authorization constraints.
The entire skill description, triggers, outputs, and examples are written as Chinese-only instructions, with no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-language or region-specific context. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.
The trigger phrases include broad, common terms such as social media content and brand rejuvenation concepts, which can cause the skill to activate in unrelated conversations. In an agent environment, unintended invocation can route user data into the wrong workflow, increase exposure to networked or billable actions, and produce actions the user did not intend.
Line L4 instructs the skill to produce a "production-ready Chinese workflow," which imposes a language choice in the default behavior. The file does not indicate that the user can choose another language or opt into Chinese, so this appears to violate language/locale choice expectations.
The manifest sets allow_implicit_invocation to true without any visible trigger constraints or narrowing conditions, so the skill may be auto-selected for loosely related requests. Because this skill can generate runnable workflows and AI-HIVE commands for media generation, ambiguous activation increases the chance of unintended execution paths, misuse for policy-sensitive content, or user confusion about what tool is acting.
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 generic AI Hive OpenAPI client with chat, image, video, model enumeration, upload, and polling features, which materially exceeds the manifest’s stated purpose of meme short-video generation. Over-broad capabilities increase attack surface and enable callers to use the skill for unrelated actions, undermining least privilege and creating scope-creep risk if this skill is trusted as narrowly scoped.
The general-purpose text chat function allows arbitrary model interaction beyond the advertised meme video generator behavior. In skill ecosystems, such hidden or unnecessary capabilities can be abused to bypass policy/scoping controls, process unrelated data, or repurpose the skill as a broad AI proxy instead of a narrow media-generation tool.
Standalone image generation is broader than the manifest’s specific meme short-video generator purpose and creates an unnecessary extra content-generation surface. This mismatch makes the skill more dangerous because users or downstream agents may trust it as narrowly scoped while it can actually perform unrelated media generation tasks.
The skill includes a user-info endpoint that retrieves account and wallet balance data, which is unrelated to generating meme short videos. While not directly destructive, it expands the skill’s access to potentially sensitive billing/account metadata and violates least-privilege expectations for a content-generation skill.