T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
AI-HIVE API Credential Can Be Forwarded to an Arbitrary Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for AI-HIVE ecommerce content generation, but it can send the user's AI-HIVE API key to an arbitrary configured endpoint.
Review this skill before installing. Use it only with AI-HIVE credentials you can rotate, avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the endpoint, and confirm prompts, media uploads, routing, and costs before running generation commands.
scripts/imagegen.py:91AI-HIVE API Credential Can Be Forwarded to an Arbitrary Endpoint
scripts/videogen.py:91AI-HIVE API Credential Can Be Forwarded to an Arbitrary Endpoint
The skill claims to be a '电商爆款文案生成器' but the observed behavior is primarily video/multimedia generation with broader OpenAPI functions such as media handling and account/model queries. In this context, the mismatch is especially risky because ecommerce workflows often involve brand assets, user-provided media, and paid generation tasks, so hidden or under-disclosed capabilities can cause privacy, cost, and compliance issues.
The skill claims to be a '电商爆款文案生成器' but the observed behavior is primarily video/multimedia generation with broader OpenAPI functions such as media handling and account/model queries. In this context, the mismatch is especially risky because ecommerce workflows often involve brand assets, user-provided media, and paid generation tasks, so hidden or under-disclosed capabilities can cause privacy, cost, and compliance issues.
The skill claims to be a '电商爆款文案生成器' but the observed behavior is primarily video/multimedia generation with broader OpenAPI functions such as media handling and account/model queries. In this context, the mismatch is especially risky because ecommerce workflows often involve brand assets, user-provided media, and paid generation tasks, so hidden or under-disclosed capabilities can cause privacy, cost, and compliance issues.
The file is presented as an ecommerce copywriting skill, but the implementation is a generic AI-Hive media client with chat, image, upload, and video-generation capabilities. This capability mismatch is dangerous because it expands what the skill can do beyond what operators and users would reasonably authorize, increasing the risk of hidden functionality, policy bypass, and misuse of API-backed media generation under a misleading label.
The embedded SKILL_CONFIG brands the tool as a copywriting generator, but the actual entrypoint routes to video generation and media upload workflows. In a plugin/agent ecosystem, this kind of deceptive packaging can cause unsafe tool invocation, accidental granting of broader permissions, and operator misunderstanding about what data is uploaded or what content is produced.
The skill advertises executable workflows and includes shell commands, environment-variable usage, file I/O, and networked API interactions, but declares no explicit tool scope or permissions boundary. That creates an authorization ambiguity where a host agent may over-grant capabilities or invoke the skill without clear least-privilege constraints, increasing the chance of unintended network calls, local file access, or secret exposure.
The activation criteria include broad phrases like transforming a reference case into original content and serving many marketing/media scenarios, which can cause the skill to trigger in contexts far beyond narrowly defined ecommerce copywriting. Over-broad triggering increases the chance of accidental invocation on sensitive or non-compliant requests, including copyright-adjacent imitation, disallowed marketing claims, or unnecessary exposure of media-generation capabilities.
The default prompt explicitly requires a "production-ready Chinese workflow," which imposes a specific language on users. This is a natural-language policy concern because the file does not indicate any user choice, opt-in, or documented justification for restricting output to Chinese.
Enabling implicit invocation without narrowly defined trigger constraints can cause the skill to activate in response to loosely related requests, exposing users to unrequested workflow generation, code suggestions, or external API-oriented actions. In this skill’s context, that risk is elevated because it can produce runnable AI-HIVE commands and operational marketing outputs, increasing the chance of accidental execution paths or inappropriate use in sensitive commercial contexts.
The file embeds Chinese-only natural-language identifiers in the module docstring, argument parser description, and skill name. This appears to impose a specific language/locale on users without any opt-in or justification that the tool is intended only for a Chinese-language or region-specific context.
This code file contains user-facing descriptions, help text, and operational instructions entirely in Chinese, beginning with the module docstring and continuing throughout the CLI. Under the policy for natural-language violations, forcing a specific language without opt-in is reportable when no alternative locale or language choice is offered.
The packaged skill claims to be a focused ecommerce copywriter/image-generation tool, but the code exposes broader account, model enumeration, chat, upload, and generic generation operations. That scope expansion violates least privilege and increases the attack surface: a caller expecting a narrow skill could leverage it to access wallet/user metadata, enumerate available models, and perform unintended API actions under the user's API key.
The file contains full video-generation support even though the skill metadata describes an ecommerce copywriting/image-generation use case. Hidden or undocumented media-generation capabilities can be abused to spend credits, process additional user media, and bypass policy or product-level restrictions that rely on the skill being narrowly scoped.
The module and CLI explicitly describe a general-purpose AI capability tool, which conflicts with the declared identity of a narrowly scoped ecommerce copywriter skill. This inconsistency is dangerous because it undermines user consent and security review assumptions, making it easier for broad capabilities to hide behind a seemingly limited business purpose.
This code file contains natural-language descriptions and CLI guidance entirely in Chinese, starting with the module docstring and continuing through user-facing help text. Under the policy, forcing a specific language without offering a user choice is a natural-language policy violation unless the locale constraint is clearly documented and justified, which it is not here.
The top-level docstring explicitly presents this file as a '通用 AI 能力调用工具' wrapping chat, image, video, model query, upload, and polling. That documented intent conflicts with the manifest for a specialized ecommerce viral copywriter skill, indicating the file is repurposed generic tooling rather than purpose-aligned implementation.