T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:76- Finding
API bearer credential can be forwarded to an attacker-controlled endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not clearly malicious, but it needs review because it handles an AI-HIVE API key, can send it to a configurable endpoint, and its code mostly generates/uploads media rather than performing the advertised quality audit.
Install only if you expect an AI-HIVE media-generation workflow, not a standalone read-only product-image auditor. Use the default AI-HIVE endpoint, avoid any untrusted --base-url or AI_HIVE_BASE_URL value, protect and rotate the API key if it may have been used with an untrusted endpoint, and expect uploads/generation to involve external service access and possible billing.
scripts/imagegen.py:76API bearer credential can be forwarded to an attacker-controlled endpoint
scripts/imagegen.py:14Runtime dependency is installed without a version or integrity lock
The skill claims to perform image-audit tasks but appears to expose broader generative and account-related capabilities such as generic chat, media generation, model lookup, and wallet/user info retrieval. In this context, the discrepancy can mislead operators into invoking unrelated or sensitive operations under the guise of QA, and may expand data exposure or billing risk beyond the user’s expectation.
The skill claims to perform image-audit tasks but appears to expose broader generative and account-related capabilities such as generic chat, media generation, model lookup, and wallet/user info retrieval. In this context, the discrepancy can mislead operators into invoking unrelated or sensitive operations under the guise of QA, and may expand data exposure or billing risk beyond the user’s expectation.
The packaged skill claims to perform product-image quality inspection, but the exposed commands implement image generation, upload, and task polling rather than any substantive audit or verification logic. This mismatch is dangerous because users and downstream agents may grant the skill trust, permissions, or workflow placement appropriate for a validator, while it can instead create or transform media, enabling policy bypass, unintended content generation, and misuse in regulated or high-trust review pipelines.
The skill advertises and demonstrates code execution patterns involving environment variables, file access, shell commands, and network calls, but it declares no explicit tool scope or permission boundaries. In an agent ecosystem, this increases the chance of over-privileged execution, unintended external calls, or unsafe handling of local files and secrets if the runtime grants broad defaults.
The activation list includes '图片检查', which is a generic phrase that could refer to many ordinary image-review tasks outside product-image quality auditing. The description does not provide exclusion conditions or negative examples specific to this trigger, so it may cause unintended invocation.
The natural-language instruction in the manifest says to turn requests into a production-ready Chinese workflow, which imposes a specific language choice by default. The policy requires either user choice or clearly justified locale constraints, neither of which is present here.
The manifest describes a skill for inspecting product images, comparing them against references, and optionally using AI-HIVE OpenAPI for generation-related workflows such as upload, routing, polling, and download. This file instead only collects CLI metadata and writes a local JSON 'blueprint' with project/audience/goal fields, which does not implement the described image-checking behavior.
The file includes broad chat and video generation capabilities that exceed the narrowly declared product-image QA use case. Overbroad capabilities increase attack surface and the risk of accidental or intentional misuse, especially when an orchestrator selects the skill based on its benign audit-oriented metadata but gains access to unrelated content-generation functions.
The module docstring describes a generic AI capability invocation tool, which directly contradicts the packaged skill's marketed purpose as a product-image quality-checker. In security-sensitive agent ecosystems, this kind of identity/capability mismatch is dangerous because reviewers and automated routers may rely on metadata and brief descriptions to assign trust, causing the tool to be used in inappropriate contexts.
This code file contains natural-language descriptions and instructions exclusively in Chinese, including the module docstring and later CLI help text. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not present here.
The manifest description defines invocation conditions entirely in Chinese terms and does not indicate that other languages are supported or that the user may choose their preferred language. This can be a locale/language policy concern when skills are expected to avoid forcing a specific language without opt-in.