T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Unrestricted API Base URL Can Expose Bearer Credentials and Uploaded Media
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches an AI-HIVE ecommerce image workflow, but it handles API keys and uploads through a user-configurable endpoint that could expose credentials or selected media if misconfigured.
Review before installing. Use only the default AI-HIVE endpoint unless you fully trust a custom endpoint, keep the API key scoped and revocable, avoid setting AI_HIVE_BASE_URL from untrusted environments, and upload only media you are comfortable sending to AI-HIVE. Non-Chinese users should expect Chinese-first prompts and output.
scripts/imagegen.py:91Unrestricted API Base URL Can Expose Bearer Credentials and Uploaded Media
scripts/imagegen.py:7Unpinned Third-Party Dependency Installation
This finding indicates both over-claiming and undeclared capability expansion, including general chat, video generation, model/account inspection, and onboarding/browser flows that are not properly described. Undeclared capabilities are dangerous because they widen the attack surface and can surprise users or calling agents with data access, billing, or external interactions beyond the stated e-commerce image-planning purpose.
This finding indicates both over-claiming and undeclared capability expansion, including general chat, video generation, model/account inspection, and onboarding/browser flows that are not properly described. Undeclared capabilities are dangerous because they widen the attack surface and can surprise users or calling agents with data access, billing, or external interactions beyond the stated e-commerce image-planning purpose.
The skill advertises executable commands, environment-variable use, file access, network access, and shell usage, but declares no explicit tool scope or permissions boundary. In an agent environment, this can cause the skill to inherit broader ambient capabilities than intended, increasing the chance of secret exposure, unauthorized network calls, or filesystem modification if invoked automatically.
The description and usage section define activation and expected user requests entirely in Chinese terms such as '电商套图' and '上架图片', with no indication that other languages are supported or that users may opt into this locale. Under the policy, a skill should not impose a specific language or locale unless it is explicitly optional or clearly justified as region-specific.
The default prompt hard-codes Chinese output ('production-ready Chinese workflow') without any user opt-in or documented locale constraint. This can override user language preference, reduce clarity for non-Chinese users reviewing generated commerce content or code, and increase the chance that important safety, legal, or platform-compliance details are misunderstood.
The file is implemented as a general-purpose AI CLI covering chat, image, video, model enumeration, upload, and polling, while the declared skill is narrowly scoped to ecommerce listing image-set generation. This scope mismatch increases the reachable attack surface and enables users or downstream agents to invoke unrelated capabilities that bypass policy and business-intent constraints.
The module docstring explicitly frames the file as a general AI capability tool, contradicting the specialized ecommerce-listing-image skill description. This kind of capability/intent mismatch is dangerous because reviewers, orchestrators, and users may rely on manifest scoping that the code does not actually enforce.
This code file contains natural-language descriptions and CLI prompts entirely in Chinese, including the module docstring and many user-facing messages. Under the policy rule, forcing a specific language without user opt-in is a locale/language policy violation unless the regional constraint is explicitly documented and justified, which is not present here.
Arbitrary text chat support is unrelated to the stated ecommerce image-set purpose and effectively turns the skill into a broader general AI interface. In agentic environments, this can be abused to route requests outside the intended domain, weakening policy boundaries and enabling prompt-driven misuse using the skill's configured API access.
Full video-generation workflows materially exceed the declared image-focused purpose and permit use cases such as promotional or synthetic video generation that the manifest does not authorize. This discrepancy undermines least privilege and increases the chance of abuse, policy evasion, or accidental high-cost operations through the skill's credentials.
The file hard-codes the skill name and description in Chinese in both the module docstring and argument parser description, and repeats that label in generated output metadata. This can be a natural-language locale policy issue because the skill presents a fixed language choice with no documented opt-in or alternative for users in other locales.
Exposing user-info and wallet balance inspection is unnecessary for an image-listing skill and reveals account metadata outside the minimum required functionality. While not a direct compromise by itself, it broadens data exposure and can aid reconnaissance about account state, quotas, or billing.