T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:94- Finding
API Key Disclosure Through an Unrestricted Custom API Endpoint in Image Generation Client
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real AI-HIVE media workflow skill, but it needs Review because its scripts can store an API key locally and send it to a user-configured API endpoint.
Install only if you trust this publisher and the AI-HIVE account boundary. Avoid using --base-url or AI_HIVE_BASE_URL unless you control and trust the endpoint, prefer a limited-scope API key, review ~/.ai-hive/config.json, and confirm parameters before any paid generation task.
scripts/imagegen.py:94API Key Disclosure Through an Unrestricted Custom API Endpoint in Image Generation Client
scripts/videogen.py:94API Key Disclosure Through an Unrestricted Custom API Endpoint in Video Generation Client
A second, distinct mismatch is that the advertised workflow emphasizes structured continuity artifacts, while the exposed wrapper appears to center on general chat/media generation and local credential storage. When a skill presents itself as domain-specific but actually acts as a broader API client and content tool, users may unknowingly grant access to account data, keys, or generation functions outside the expected continuity task.
A second, distinct mismatch is that the advertised workflow emphasizes structured continuity artifacts, while the exposed wrapper appears to center on general chat/media generation and local credential storage. When a skill presents itself as domain-specific but actually acts as a broader API client and content tool, users may unknowingly grant access to account data, keys, or generation functions outside the expected continuity task.
Referenced artifact was not completely inspected
python3 scripts/videogen.py init --skill-name short-drama-scene-continuity-ai-hive
Referenced artifact was not completely inspected
python3 scripts/videogen.py init --skill-name short-drama-scene-continuity-ai-hive
The skill includes executable examples and implies capabilities involving environment variables, filesystem access, network calls, and shell execution, yet it does not declare any explicit tool scope or permissions. This creates an authorization boundary problem: an agent may expose or invoke broader capabilities than reviewers and users expect, increasing the chance of unintended file, network, or command execution.
The description defines activation entirely through Chinese phrases and presents the skill as operating in a Chinese-language workflow, but it does not say this is optional or limited to a region-specific deployment. Under the language/locale policy, a skill should not impose a specific language without user opt-in or a clearly documented justification.
The invocation list includes a single generic term, '连续性', without narrowing context such as filmmaking, shot continuity, or scene management. Because this word is commonly used in many unrelated conversations, it could cause unintended activation of the skill.
The phrase '场景设定' can refer broadly to worldbuilding, creative writing, game design, or general scene setup, not specifically short-drama continuity work. The file does not provide negative examples or tighter constraints to distinguish intended use from other scene-design tasks.
The default prompt hard-codes Chinese output regardless of the user's language preference, which can override user intent and reduce transparency about what the skill is doing. While not a direct code-execution flaw, it can contribute to misleading behavior, review difficulty, and unsafe downstream use if users cannot easily verify generated workflows or commands.
The skill enables implicit invocation without any visible trigger constraints, so the platform may activate it in contexts the user did not clearly request. Because this skill is designed to generate production-ready workflows and runnable AI-HIVE commands, unintended invocation could cause unauthorized task execution paths, unexpected API usage, or user confusion about consent and 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 module docstring and all user-facing help and runtime messages in this code are written in Chinese, which imposes a specific language on users. The file does not offer an opt-in language selection or explain that the skill is intentionally region-specific, so this is a natural-language locale policy concern.
The skill is presented as a narrowly scoped short-drama scene continuity tool, but its wrapper forwards arbitrary prompts, images, batch size, routing mode, and free-form model parameters into a generic image generation backend. This scope mismatch weakens policy enforcement and enables use outside the declared purpose, including disallowed or higher-risk image generation workflows that downstream callers may wrongly assume are constrained.
The file is presented as a narrowly scoped short-drama scene continuity skill, but it actually ships a broad AI Hive client with unrelated capabilities including chat, image generation, account info retrieval, model enumeration, and generic media handling. This scope mismatch is dangerous because it increases the accessible attack surface and enables operators or downstream agents to invoke capabilities outside the declared purpose, undermining user consent and policy expectations.
This Python skill uses Chinese in its top-level description and throughout user-facing prompts, errors, and help text, which effectively forces a specific language on users. The file does not provide an opt-in language selection or explain that the skill is intentionally restricted to a Chinese-speaking or region-specific audience.
The generic text chat command is unrelated to a scene-continuity video tool and allows arbitrary prompts plus optional system prompts and image uploads. In a skill ecosystem, this creates covert capability expansion: a caller expecting constrained video functionality can instead use the skill as a general LLM interface, bypassing intended restrictions, auditing assumptions, or approval boundaries.
The script hard-codes Chinese-language descriptions and search aliases in user-facing strings, including the module docstring, CLI description, skill name, and alias list. Because there is no opt-in or alternative locale handling, this can violate language/locale policy requirements for user choice.
Within the skill-specific CLI, the 'task' and 'upload' subcommands expose general-purpose AI-HIVE operational capabilities rather than continuity-focused scene-consistency logic. While media upload can support reference images, exposing standalone upload and raw task querying is infrastructure functionality not clearly justified by the manifest's end-user purpose as a short-drama scene continuity studio.
The manifest focuses on receiving scripts and references and delivering continuity artifacts or AI-HIVE-backed generation support. Fetching user profile and wallet balance is an account-management capability, not an obvious requirement for scene continuity work.
While internal model lookup can be an implementation detail for generation routing, the public CLI command for listing all available models turns the skill into a general OpenAPI exploration tool. That capability is broader than the manifest's specialized continuity-studio framing.