T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:82- Finding
AI-HIVE bearer credential can be redirected to an arbitrary endpoint in the image-generation client
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed AI-HIVE media/AEO workflow, but its API-key handling can send credentials to an unvalidated endpoint and should be reviewed before installation.
Install only if you intend to use AI-HIVE and are comfortable storing an AI-HIVE API key locally. Avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the endpoint, because the scripts will send the bearer token there. Use a dedicated low-privilege API key if possible, rotate it if exposed, and review generated upload/download commands before running them.
scripts/imagegen.py:82AI-HIVE bearer credential can be redirected to an arbitrary endpoint in the image-generation client
scripts/videogen.py:82AI-HIVE bearer credential can be redirected to an arbitrary endpoint in the video-generation client
SKILL.md:133Unpinned third-party dependency installation produces non-reproducible and supply-chain-sensitive environments
The implementation scope described by analysis centers on generic AI-HIVE chat/image/video API invocation rather than the specialized planning, evidence-field generation, and optimization expertise claimed by the skill. Such description-behavior mismatch can bypass user expectations and policy gating, causing the skill to be invoked in sensitive contexts where external calls, media processing, or local configuration changes were not anticipated.
The implementation scope described by analysis centers on generic AI-HIVE chat/image/video API invocation rather than the specialized planning, evidence-field generation, and optimization expertise claimed by the skill. Such description-behavior mismatch can bypass user expectations and policy gating, causing the skill to be invoked in sensitive contexts where external calls, media processing, or local configuration changes were not anticipated.
The skill advertises executable workflows that use shell commands, local files, environment variables, and networked API access, but it does not declare any explicit tool scope or permission boundaries. This creates an over-privileged and opaque execution model where a host agent may expose capabilities the user did not clearly consent to, increasing the chance of unintended file access, credential handling, or external requests.
Broad invocation wording increases the likelihood that the skill is auto-selected for loosely related queries, including commercial, media, AI-search, and platform-specific requests. In a skill that also references executable scripts and external API workflows, accidental activation can lead to unnecessary data exposure, unintended external requests, or user confusion about what actions will be taken.
The skill enables allow_implicit_invocation without any visible activation boundaries, user-consent gating, or contextual constraints. That increases the chance the agent is auto-selected in situations where the user did not explicitly request this skill, causing unintended execution of its domain-specific workflow and possible over-collection of project, audience, and material data from surrounding context.
The script description and generated content are fixed in Chinese terms such as 'AEO 答案引擎优化' and related Chinese metadata, with no indication that users may select another language or locale. This can violate language-choice policy because the skill appears to impose a locale-specific output format by default.
This code file contains user-facing natural-language strings and documentation entirely in Chinese, including setup and runtime guidance, but does not indicate that the skill is intended only for Chinese-speaking users or provide any language/locale opt-in. That can violate language/locale policy for general-purpose skills because users are implicitly forced into one language.
The manifest describes a domain-focused skill for AEO planning and, secondarily, use of image/video models through AI-HIVE for asset handling and generation workflows. This file includes generic user-info and models capabilities that query wallet/account details and enumerate all available models, which go beyond that stated expert/planning purpose and are not necessary to fulfill an AEO-answer-optimization skill's core function.
The embedded skill configuration and parser present this as a specific image-generation/editing skill, but the wrapper additionally exposes an upload command that can upload arbitrary files and return reusable media IDs independently of image generation. That is a broader general-purpose media-management capability than the narrower image-skill description suggests.
The manifest describes an AEO/Answer Engine Optimization expert for planning, content structure, evidence fields, and generation-task decomposition. In contrast, this file provides broad operational capabilities for model listing, chat, media upload, image generation, video generation, polling, and downloading, and is further specialized as a short-drama video skill via SKILL_CONFIG. That behavior materially exceeds and differs from the stated AEO-focused purpose.
This Python file contains user-facing natural-language text entirely in Chinese, including the module description and all CLI guidance, and does not provide any opt-in or alternative locale selection. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly justified.
The metadata sets language: zh-CN, which indicates a fixed locale preference. The file does not state that users may choose another language or that the locale restriction is required for a region-specific purpose, so this appears to impose a language setting without opt-in.
The script writes JSON output to a user-specified path via output.write_text(), which can overwrite an existing file. There is no confirmation prompt, warning message, or explanatory comment/docstring near the operation disclosing this behavior to the user.
The manifest frames the skill primarily as an expert/planning assistant for AEO and content strategy. This implementation includes credential resolution from environment variables and a local config file to operate a remote API, which is a broader operational capability not disclosed in the manifest text.
The init flow opens a browser, guides the user through login/API key creation, and stores credentials locally. For an AEO expert skill, this account-onboarding UX is not justified by the manifest's semantic purpose; it is platform bootstrap functionality rather than AEO assistance.