T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer API Key Disclosure Through an Unrestricted Custom Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not clearly scoped to its advertised Gemini relay role and handles API credentials, uploads, and downloads in ways users should review before installing.
Review this skill before installing. Use it only with an AI-HIVE key you can revoke, avoid custom base URLs unless you fully trust the endpoint, do not upload private media unless the destination is acceptable, and consider disabling automatic result downloads or using a constrained output directory. The package does not show backdoor-style persistence, but its public description overstates Gemini relay management compared with what the scripts actually do.
scripts/imagegen.py:91Bearer API Key Disclosure Through an Unrestricted Custom Base URL
scripts/imagegen.py:274Unvalidated API-Controlled Upload and Download Destinations
SKILL.md:113Unpinned Third-Party Dependency Installation
The skill claims Gemini/Google relay and management capabilities, but the reported implementation lacks actual relay compatibility and platform-level controls while adding undeclared chat, upload, download, browser, and local config behaviors. In a security-sensitive context involving enterprise AI gateways and tokens, this kind of capability mismatch can cause users to overtrust the skill and handle regulated prompts, files, or credentials in an unsafe client-side workflow.
The skill claims Gemini/Google relay and management capabilities, but the reported implementation lacks actual relay compatibility and platform-level controls while adding undeclared chat, upload, download, browser, and local config behaviors. In a security-sensitive context involving enterprise AI gateways and tokens, this kind of capability mismatch can cause users to overtrust the skill and handle regulated prompts, files, or credentials in an unsafe client-side workflow.
The skill claims Gemini/Google relay and management capabilities, but the reported implementation lacks actual relay compatibility and platform-level controls while adding undeclared chat, upload, download, browser, and local config behaviors. In a security-sensitive context involving enterprise AI gateways and tokens, this kind of capability mismatch can cause users to overtrust the skill and handle regulated prompts, files, or credentials in an unsafe client-side workflow.
The skill advertises commands that use shell execution, local files, environment variables, and network access, but it does not declare any explicit tool scope or permission boundaries. This creates an overbroad capability surface where a host may grant more access than users expect, increasing the risk of credential exposure, unintended file writes, or arbitrary command execution through helper scripts.
The invocation guidance uses broad search-style phrases like generic Gemini relay terms, which can cause the skill to activate in unrelated discussions. Overbroad triggering is risky here because the skill has network, file, and credential-related workflows; accidental invocation could steer users into key setup, uploads, or external service use without clear intent.
The display name, short description, and default prompt are all written in Chinese, which implies a fixed language/locale for the skill's interface and invocation guidance. The file does not offer a user language choice or document a justified region-specific constraint, so this appears to violate the language/locale policy requirement.
The manifest describes a Gemini API relay and AI-HIVE integration skill for organizing model endpoints, managing keys/models/routing/quotas/auditing, and handling async tasks. This script instead generates a local JSON 'production brief' containing creative-planning fields like audience, format, storyboards, and acceptance checklists, with no API relay, key management, routing, quota, audit, or task-handling behavior.
The module docstring says it creates a deterministic production brief for 'Gemini API中转', implying a brief related to the relay product. However, the generated JSON focuses on media-production artifacts such as 人物板, 故事板, 场景板, and 逐镜提示词, which contradict the relay-oriented label and point to a different business function.
This code embeds Chinese-language descriptions and labels such as "Gemini API中转", "API聚合", and Chinese search aliases directly in user-facing strings. Because no language or locale choice is offered, the skill appears to enforce a specific language context without user opt-in, which matches the language/locale policy violation criteria.
The top-level docstring states this file wraps general AI Hive OpenAPI capabilities for text chat, image generation, video generation, model queries, media upload, and task polling. That behavior and framing are broader than, and partially different from, a manifest describing a Gemini API relay service, creating a semantic mismatch between declared purpose and implemented tool scope.
The module docstring presents the skill description exclusively in Chinese, and user-facing prompts/help strings throughout the file also enforce Chinese output/interaction by default. This can violate a language/locale policy when users are not given an explicit choice or opt-in for the locale.
The embedded skill configuration and CLI description frame this file as a GPT Image 2 picture generation/editing skill, but the implementation also allows task, upload, and init operations, including opening a browser and persisting API credentials locally. Those extra behaviors may be valid support functions, but they go beyond the narrow image-generation purpose claimed by the skill-specific metadata and interface text.
The file presents itself as a video-generation skill, but the implementation is a broad AI-HIVE client that includes account inspection, generic model enumeration, text chat, media upload, and arbitrary task handling. This capability mismatch can mislead users and calling agents into granting API keys and trust under narrower assumptions, increasing the risk of overbroad data exposure and unintended remote actions.
This code file includes natural-language descriptions, help text, and user-facing instructions almost entirely in Chinese, starting from the module docstring. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale restriction is a natural-language policy violation.
The wrapper exposes task, upload, and initialization flows backed by a generic client, not just narrowly constrained short-drama generation. In an agent skill context, extra operational surface area matters because it enables credential setup, file transfer, and broader API interaction than a user may expect from the advertised purpose.
The file declares language: zh-CN, which indicates a fixed language/locale setting. There is no accompanying statement that users may choose another language, nor a clear justification that this skill must be limited to Chinese for compliance or region-specific reasons.