T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
Unvalidated API Base URL Can Disclose the Bearer Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This AI-HIVE ad-generation skill is mostly coherent, but it needs Review because its scripts can send an API key to a configurable API endpoint without validating the destination.
Review before installing. Use this only with an AI-HIVE key you are comfortable using for paid generation, keep the default official API endpoint, and avoid setting AI_HIVE_BASE_URL, --base-url, or config base_url to any untrusted host. Confirm prompts, uploaded media, routing mode, and costs before running generation commands.
scripts/imagegen.py:92Unvalidated API Base URL Can Disclose the Bearer Credential
scripts/videogen.py:92Video Client Forwards the API Key to an Unvalidated Configurable Endpoint
A skill that claims to do specialized ad-variation generation but also contains undeclared generic text, account, model, and image-generation functions creates a trust boundary failure. Users may expose proprietary campaign assets or approve paid actions under false assumptions about scope, while the implementation can access broader functions than the documentation suggests.
A skill that claims to do specialized ad-variation generation but also contains undeclared generic text, account, model, and image-generation functions creates a trust boundary failure. Users may expose proprietary campaign assets or approve paid actions under false assumptions about scope, while the implementation can access broader functions than the documentation suggests.
A skill that claims to do specialized ad-variation generation but also contains undeclared generic text, account, model, and image-generation functions creates a trust boundary failure. Users may expose proprietary campaign assets or approve paid actions under false assumptions about scope, while the implementation can access broader functions than the documentation suggests.
A skill that claims to do specialized ad-variation generation but also contains undeclared generic text, account, model, and image-generation functions creates a trust boundary failure. Users may expose proprietary campaign assets or approve paid actions under false assumptions about scope, while the implementation can access broader functions than the documentation suggests.
Referenced artifact was not completely inspected
python3 scripts/imagegen.py init --skill-name one-product-image-ten-ads-ai-hive
Referenced artifact was not completely inspected
python3 scripts/imagegen.py init --skill-name one-product-image-ten-ads-ai-hive
The skill advertises executable commands that use environment variables, local files, network access, and shell execution, but it does not declare any explicit tool scope or permissions boundary. This creates an authorization gap where an agent or reviewer cannot easily determine what capabilities are intended, increasing the risk of overbroad execution, unintended data access, or unsafe invocation of external services.
An overly broad trigger phrase like '10条广告' can cause accidental activation for ordinary requests that are not intended for this skill. In a skill that may invoke file, network, and potentially billable generation workflows, misrouting increases the chance of unintended data handling, user confusion, or unnecessary paid operations.
The trigger phrase '批量广告' is ambiguous and may match many unrelated user intents, making routing unreliable. Because this skill discusses external API usage, uploads, and asynchronous generation, false activations could expose users to unintended workflow steps, broader data collection, or possible charges.
The natural-language instruction explicitly requires a 'production-ready Chinese workflow', which imposes a language choice regardless of user preference. The file does not offer a language option or explain why Chinese is mandatory for a region-specific or compliance reason.
The manifest allows implicit invocation with no documented trigger constraints, exclusions, or scope limits. In a skill that can transform user requests into runnable AI-HIVE commands and external API workflows, this increases the chance the skill is auto-selected in unintended contexts, causing unreviewed execution planning, external uploads, or content-generation guidance without clear user intent.
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 subsequent CLI help/messages are written exclusively in Chinese, which imposes a specific language on users. The file does not offer any language/locale selection or explain that the skill is intentionally limited to a Chinese-speaking context.
The manifest describes a specialized workflow that accepts one product image plus selling points, audience, platform, budget, and brand constraints, then delivers 10 non-duplicate ad angles, scripts, first frames, video tasks, dedupe reports, and test tables. In contrast, the skill wrapper here only hardcodes an image model and forwards a free-form prompt to generic image generation, with optional task lookup and upload; there is no code for collecting those structured inputs or producing the promised 10-ad planning artifacts.
The file is implemented as a generic AI Hive client with chat, model listing, upload, image, video, task polling, and account-related capabilities, while the manifest advertises a narrowly scoped workflow for generating ads from one product image. This scope expansion increases the available attack surface and enables users or upstream agents to invoke unrelated capabilities not justified by the skill’s declared purpose, undermining least-privilege expectations.
The CLI exposes unrelated operations such as user-info, models, chat, generic image generation, generic video generation, and arbitrary upload, which exceed the stated ad-generation purpose of the skill. In a skill ecosystem where users and orchestrators rely on manifest scope, these extra operations can be abused to access account metadata, perform unintended AI tasks, or bypass product-level restrictions through a more capable hidden interface.
The natural-language description and invocation examples are exclusively in Chinese and define usage via Chinese trigger phrases, with no indication that other languages are supported or that the Chinese-only scope is intentional. This can constitute a locale policy issue when a skill implicitly requires one language without user opt-in.
The top-level docstring describes a universal CLI supporting text chat, image generation, video generation, model queries, media upload, and task polling via argparse subcommands. However, the active __main__ path calls skill_main() rather than main(), and build_skill_parser() only exposes generate, task, upload, and init, so the documented user-facing behavior of this file contradicts what actually runs.
The module docstring explicitly describes the file as a '通用 AI 能力调用工具' wrapping text chat, image generation, video generation, model queries, media upload, and polling. That directly conflicts with the surrounding skill’s intended narrow purpose of one-product-image ad/video generation, signaling intent-code divergence at the documentation level.
This code file contains natural-language user-facing documentation entirely in Chinese, and the CLI help text throughout the file also assumes Chinese-language interaction. Under the policy rule, forcing a specific language without user opt-in can be a locale-policy issue when no alternative or explicit language choice is offered.
No suspicious patterns detected.