T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer Credential Disclosure Through an Unrestricted API Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly aligned with AI-HIVE marketing content creation, but it needs review because it can store API keys locally and may send them to an arbitrary configured API endpoint.
Review this skill before installing. Use a dedicated low-privilege AI-HIVE API key, prefer passing it through AI_HIVE_API_KEY instead of running init, do not set --base-url or AI_HIVE_BASE_URL unless you fully trust the destination, and avoid uploading client or confidential materials unless you have authorization. Use --no-download or a controlled output directory if generated assets should not persist in Downloads.
scripts/imagegen.py:91Bearer Credential Disclosure Through an Unrestricted API Base URL
scripts/imagegen.py:593Plaintext API Key Persistence Conflicts With the Documented Secret-Handling Boundary
scripts/imagegen.py:7Unpinned Third-Party Dependency Installation Guidance
The skill presents itself as an industry-specific marketing assistant but appears to function as a more general AI/API tool with undeclared account queries and local configuration behavior. This is dangerous because a domain-specific wrapper can reduce scrutiny while still exposing unrelated capabilities that touch credentials, local state, or external services.
The skill presents itself as an industry-specific marketing assistant but appears to function as a more general AI/API tool with undeclared account queries and local configuration behavior. This is dangerous because a domain-specific wrapper can reduce scrutiny while still exposing unrelated capabilities that touch credentials, local state, or external services.
The skill presents itself as an industry-specific marketing assistant but appears to function as a more general AI/API tool with undeclared account queries and local configuration behavior. This is dangerous because a domain-specific wrapper can reduce scrutiny while still exposing unrelated capabilities that touch credentials, local state, or external services.
The skill presents itself as an industry-specific marketing assistant but appears to function as a more general AI/API tool with undeclared account queries and local configuration behavior. This is dangerous because a domain-specific wrapper can reduce scrutiny while still exposing unrelated capabilities that touch credentials, local state, or external services.
The skill advertises executable commands that use shell, network, environment variables, and local file paths, but it does not declare any explicit tool scope or permission boundaries. This makes the runtime trust model unclear and can allow broader-than-expected access to local files, API secrets, and outbound network actions if the skill is invoked in an agent environment.
The manifest description and title are entirely in Chinese and describe when the skill should be used, but there is no indication that users may choose another language or that the skill is intentionally restricted to Chinese-speaking users for compliance or regional reasons. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.
The natural-language prompt explicitly instructs the skill to create a Chinese marketing plan, which imposes a language/locale choice. There is no indication in this file that users can opt into another language or that the Chinese-only behavior is a documented, justified regional constraint.
The manifest enables implicit invocation without any visible trigger constraints, which can cause the skill to activate in broader contexts than the user intended. In a skill that generates marketing plans and AI-HIVE code, ambiguous activation increases the chance of unintended execution, accidental tool use, or user confusion about when the skill is operating.
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:
文件顶层 docstring、CLI 提示和帮助文本整体仅以中文呈现,体现出固定语言/locale 的使用,但没有提供用户选择语言的机制,也没有说明该技能仅面向中文用户或特定区域。按组织语言/locale 政策,这类默认强制单一语言且无 opt-in 的设计应予以标记。
Successful image/video tasks are automatically downloaded to a local directory by default, without a strong upfront warning or explicit opt-in. In a skill that handles uploaded user media and generated business content, this can cause unexpected local persistence of potentially sensitive files, increasing the risk of data exposure on shared or monitored systems.
The wrapper is presented as a narrowly scoped accounting-firm marketing skill, but it exposes broader AI-Hive operations such as arbitrary media upload, task inspection, and generic model-backed generation. This scope mismatch can mislead users and higher-level agents about what capabilities are actually available, weakening least-privilege assumptions and making unintended data handling or service use more likely.
The file embeds its industry, mode, focus, channels, and boundary text entirely in Chinese, which effectively fixes the generated brief content to a specific language/locale. The policy requires avoiding forced language constraints unless the skill offers a user choice or clearly documents a justified region-specific limitation, which this code does not.
The file embeds a broad-purpose AI Hive client and generic chat capability even though the declared skill is narrowly scoped to accounting-firm image/video marketing. This expands the skill's effective permissions and use cases beyond user expectations, increasing the risk of policy bypass, unintended data handling, or repurposing the skill for unrelated prompt-based operations.
This code file contains natural-language descriptions and user-facing instructions entirely in Chinese, including the module docstring and subsequent CLI guidance. The skill does not indicate that Chinese is optional or that users may choose another language, which can violate a language/locale policy requiring user choice.
The top-level docstring states this is a general-purpose AI Hive tool for chat, image generation, video generation, model querying, media upload, and task polling. That directly conflicts with the packaged skill identity at the bottom of the file, which presents a specialized accounting-firm marketing image/video skill.
The init flow opens a browser, guides login, and stores an API key locally, which is an account onboarding capability rather than a direct marketing-content generation function. While useful operationally, this capability is not part of the manifest's user-facing purpose around accounting-firm marketing planning and media generation outputs.
The client includes a user-info endpoint that reveals account and wallet data not needed for the stated marketing-video workflow. Even if not exposed by the final skill entrypoint, retaining unnecessary account-query code increases attack surface and creates a risk of future accidental exposure or misuse in environments where the generic CLI is invoked.