T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
API credentials can be forwarded to an unrestricted endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its AI-HIVE ecommerce content purpose, but it needs review because its scripts can send an API key to a configurable API endpoint and perform media transfers without strong destination or size limits.
Install only if you are comfortable giving the scripts an AI-HIVE API key and uploading selected product media to AI-HIVE/object-storage services. Avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the endpoint, review ~/.ai-hive/config.json before use, prefer a limited API key, and monitor generated-task costs and downloaded file sizes.
scripts/imagegen.py:91API credentials can be forwarded to an unrestricted endpoint
scripts/imagegen.py:266Server-controlled upload and download URLs are used without destination or size validation
scripts/imagegen.py:17Runtime dependency guidance installs an unpinned package
The skill promises planning outputs based on product, budget, time, platform, and goals, but the behavior described by analysis is largely generic AI-HIVE API access with no actual implementation of the claimed planning logic. A misleading wrapper around generic API operations is dangerous because it can trick users into granting trust and potentially sensitive inputs while the real behavior performs unrelated networked actions and exposes broader account-linked functionality.
The skill promises planning outputs based on product, budget, time, platform, and goals, but the behavior described by analysis is largely generic AI-HIVE API access with no actual implementation of the claimed planning logic. A misleading wrapper around generic API operations is dangerous because it can trick users into granting trust and potentially sensitive inputs while the real behavior performs unrelated networked actions and exposes broader account-linked functionality.
The skill advertises executable scripts and networked API workflows but does not declare any tool scope or allowed-tools boundary. That makes the operational capability opaque to the host and reviewers, increasing the chance of over-privileged execution, unsafe file/network access, or accidental secret exposure when the skill is invoked.
Broad trigger phrases like personal seller, low-cost operations, or ecommerce assistant can cause the skill to activate in routine conversations that do not require its higher-risk media-generation and networked behavior. Over-triggering increases the likelihood of accidental invocation, unnecessary exposure of user business data, and unintended progression into billable or more privileged actions.
The natural-language instruction says to turn requests into a "production-ready Chinese workflow," which imposes a specific language on all outputs. This is a locale/language policy concern because the file does not offer the user any language choice or opt-in mechanism.
The file presents itself as a focused solo-ecommerce/image skill, but most of the implementation is a general-purpose AI Hive client supporting chat, model enumeration, uploads, and video generation. This capability mismatch increases the attack surface and can enable use beyond the user's expected consent boundary, especially in agent environments that rely on metadata to decide what a skill may do.
Natural-language strings throughout the skill, including the module description, CLI help, prompts, and status messages, are fixed to Chinese. Because the file does not offer locale selection or document a justified region-specific constraint, this can violate language/locale policy requiring user choice or explicit opt-in.
This file implements a full chat_text API path and CLI command for arbitrary text or multimodal conversations. The wrapped skill configuration and manifest focus on a solo-ecommerce operational assistant with AI-Hive used for asset generation, especially image-generation workflow details, so unrestricted generic chat is broader than the declared purpose of this specific skill file.
The concrete skill wrapper in this file is titled and wired as an image skill, with SKILL_CONFIG example text describing commercial image creation. Yet the module also contains a complete video-generation client and CLI path, which goes beyond the declared image-generation role of this skill and broadens capability into a separate media modality.
The skill uploads local media to remote services and downloads generated outputs from returned URLs without an explicit user-facing privacy notice or transmission confirmation. In an agent skill context handling business creatives and reference assets, this can cause unintended disclosure of sensitive images, product materials, or other proprietary content to third-party infrastructure.
The file advertises and implements a generic AI Hive OpenAPI client with chat, image, video, model listing, media upload, and task polling, which is materially broader than the manifest’s stated one-person ecommerce video assistant use case. In a skill ecosystem, this scope expansion increases the attack surface and enables capability abuse outside the user’s expected consent boundary, even if the code is not overtly malicious.
This code file contains natural-language strings that present the skill entirely in Chinese, including the top-level description and argument parser description. Under the policy criteria, forcing a specific language without user opt-in can be a locale/language policy violation unless the regional constraint is explicitly justified, which is not stated here.
The manifest emphasizes helping sellers generate low-cost operational and marketing assets through AI-Hive APIs. Exposing a dedicated user-info endpoint for querying account details and wallet balance is an account-management capability that is not necessary to fulfill that stated assistant purpose.
This code presents its top-level skill description entirely in Chinese, and the CLI throughout the file is also Chinese-only. That creates a language/locale constraint without any opt-in or documented justification, which matches the policy-violation category for forced language behavior.
The code exposes a user-info endpoint that can reveal account details and wallet/balance information not described in the skill manifest. While this is not a direct code-execution flaw, it violates least privilege and creates unnecessary access to potentially sensitive account metadata if the skill is invoked or repurposed unexpectedly.
The init flow opens a browser to an external site and guides the user through account login and API key creation. Although credential setup may be convenient for a CLI utility, it is not part of the manifest’s stated assistant behavior around ecommerce planning and AI-Hive generation tasks.