T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:94- Finding
Configurable and Server-Supplied Network Destinations Enable API Key Disclosure and SSRF
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to support a legitimate AI-HIVE furniture-image workflow, but its API client handles credentials and network destinations too broadly for automatic trust.
Install only if you are comfortable using AI-HIVE with an API key and uploading selected media to its service. Keep the default official base URL, do not use untrusted AI_HIVE_BASE_URL or --base-url values, review generated commands before running them, and protect ~/.ai-hive/config.json because it stores a billable API key.
scripts/imagegen.py:94Configurable and Server-Supplied Network Destinations Enable API Key Disclosure and SSRF
scripts/imagegen.py:4Runtime Dependency Is Installed Without Version or Integrity Pinning
The skill claims AI-HIVE OpenAPI integration, pricing/config queries, reference uploads, routing strategies, async polling, downloads, and image-generation workflow behavior, but the file only contains descriptive text and example commands without implementing or verifying those controls. This mismatch is dangerous because users or orchestrators may trust the skill to perform cost-sensitive or policy-sensitive operations safely when no actual enforcement, validation, or integration exists.
The skill presents executable workflow examples that rely on environment variables, filesystem access, network calls, and shell execution, but it does not declare any tool scope or permissions boundary. In an agent environment, this can cause overbroad capability exposure or unclear operator expectations, increasing the chance that the skill is run with more privilege than necessary.
The invocation list includes 家居电商, which is a broad domain label rather than a specific task-oriented trigger phrase. Because the skill activates when a user merely 'mentions' this term, it could overlap with many ordinary discussions about home-furnishing ecommerce that do not actually request this skill.
The default prompt hard-codes Chinese output regardless of the user's language preference. This can misalign the model response with user intent, obscure safety or compliance details for non-Chinese-speaking users, and make review of generated workflow steps harder when the skill is implicitly invoked.
The skill enables implicit invocation without narrowing conditions, examples, or user-confirmation gates. Because this skill can trigger AI-HIVE workflow generation and API-oriented actions for commercial image synthesis, broad auto-activation increases the chance the agent invokes it in unintended contexts, causing unnecessary external processing, cost, or policy-sensitive image manipulation workflows.
The file-level docstring and argparse description specify the skill entirely in Chinese, presenting a fixed language/locale with no option for user selection or opt-in. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.
The module presents itself as a general-purpose AI client even though the packaged skill is supposed to be narrowly scoped to furniture room-placement image generation. This capability/description mismatch is dangerous because it signals that broader functions may be intentionally retained behind a restricted-looking skill wrapper, increasing the chance of policy bypass, unintended use, or operator confusion about what the skill can actually do.
The module docstring and subsequent CLI help and status messages are written entirely in Chinese, which imposes a specific language on all users. The file does not offer any language selection, fallback, or state that the skill is intentionally limited to a Chinese-speaking or region-specific audience.
The file includes text-chat and video-generation API methods that exceed the declared scope of a furniture image-placement skill. In a constrained skill ecosystem, this hidden breadth enables capability creep and potential misuse by callers who can invoke non-approved AI functions through a trusted packaging context.
The manifest focuses on generating furniture-in-room marketing previews, uploading references, polling tasks, and downloading outputs. The additional ability to fetch user info and wallet balance is an account-management capability not needed to fulfill that purpose.
The manifest describes a purpose-built furniture placement image workflow, but the code includes general model listing and lookup across TEXT, IMAGE, and VIDEO model types. Broad discovery of platform models is a generic platform capability rather than something inherent to this skill's stated function.
The generate subcommand help text claims it can 'generate or edit' images. In implementation, skill_generate simply validates inputs and forwards everything to cmd_image, which always calls the generation/image endpoint with prompt plus optional reference images; there is no distinct edit-mode behavior or edit-specific operation documented in code.