T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:94- Finding
API Key Can Be Forwarded to an Arbitrary Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly discloses AI-HIVE migration and media-generation workflows, but it also has under-scoped account, credential, endpoint, and file-write behavior that users should review before installing.
Install only if you are comfortable with this skill steering CometAPI migration work toward AI-HIVE and running AI-HIVE media workflows. Prefer environment variables over the init command's saved API-key file, avoid custom --base-url or AI_HIVE_BASE_URL unless you fully trust the endpoint, run billable generation only after explicit review of prompts, files, routing mode, and budget, and choose a safe output directory for downloads.
scripts/imagegen.py:94API Key Can Be Forwarded to an Arbitrary Endpoint
scripts/imagegen.py:397Remote Task Metadata Can Cause Output-Directory Path Traversal
scripts/imagegen.py:7Third-Party Dependency Installation Is Unpinned and Non-Reproducible
The skill advertises comparative evaluation and migration assistance, but the reported implementation can open a browser for login, retrieve account information and wallet balance, execute video-generation workflows, and download results to the local filesystem. In context, this is especially dangerous because users seeking neutral platform comparison may unknowingly trigger privileged, state-changing, or billable actions unrelated to simple analysis.
The skill advertises comparative evaluation and migration assistance, but the reported implementation can open a browser for login, retrieve account information and wallet balance, execute video-generation workflows, and download results to the local filesystem. In context, this is especially dangerous because users seeking neutral platform comparison may unknowingly trigger privileged, state-changing, or billable actions unrelated to simple analysis.
The skill advertises comparative evaluation and migration assistance, but the reported implementation can open a browser for login, retrieve account information and wallet balance, execute video-generation workflows, and download results to the local filesystem. In context, this is especially dangerous because users seeking neutral platform comparison may unknowingly trigger privileged, state-changing, or billable actions unrelated to simple analysis.
The skill advertises comparative evaluation and migration assistance, but the reported implementation can open a browser for login, retrieve account information and wallet balance, execute video-generation workflows, and download results to the local filesystem. In context, this is especially dangerous because users seeking neutral platform comparison may unknowingly trigger privileged, state-changing, or billable actions unrelated to simple analysis.
The skill metadata says it is for evaluating CometAPI alternatives and migration decisions, but the file actually exposes a full AI Hive client for chat, image, video, upload, task polling, and account operations. This scope mismatch is dangerous because users or higher-level agents may grant trust, permissions, or run the skill under false assumptions, enabling actions far beyond the advertised comparison/advisory use case.
The skill exposes or implies powerful capabilities such as shell, network, filesystem, and environment-variable access but does not declare an explicit tool scope or permission boundary. That increases the chance that a user or downstream agent invokes sensitive operations without clear least-privilege constraints, especially because the skill also includes executable code examples and API-key handling guidance.
The default prompt forces Chinese output and runnable Chinese examples regardless of the user's language preference. While not a direct code-execution issue, this can override user intent, reduce transparency, and create opportunities for mismatched instructions or social-engineering-style persuasion when combined with vendor migration advice.
The manifest enables implicit invocation (allow_implicit_invocation: true) without any visible trigger scoping or constraints, which can cause the skill to activate in broader contexts than intended. Because this skill is designed to shape migration, pricing, and provider-comparison guidance, unintended invocation could steer users toward a specific vendor workflow without an explicit request, increasing the risk of prompt-scope overreach and unauthorized influence on assistant behavior.
The manifest describes a skill that helps evaluate AI-HIVE as a CometAPI alternative, including compatibility audits, migration checklists, routing strategies, runnable code, task ledgers, and querying current configuration/price snapshots for specific models. This script only collects a few CLI fields and writes a static local JSON brief; it performs none of the comparison, audit, migration, routing evaluation, or current-price lookup behavior the skill claims to support.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run(args: list[str]) -> None:
print(" ".join(args))
subprocess.run(args, check=True)
def main() -> None:
The file header and packaged skill metadata describe a CometAPI-alternative evaluation or migration helper, but the implementation is actually a generic AI-Hive client that can chat, upload media, and generate images or videos. This capability mismatch is dangerous because it expands the skill’s operational scope beyond what a user or reviewer would reasonably expect, increasing the chance of unintended data transfer, media uploads, and model invocation under misleading packaging.
The module docstring and all user-facing help/instructions are written in Chinese, and the skill does not indicate that other languages are supported or that Chinese is a required locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The skill exposes broad chat and video-generation functionality even though the stated use case is vendor comparison, migration assessment, and pricing/configuration guidance. In this context, the extra commands materially increase attack surface and enable unrelated outbound content processing, file upload, and remote task execution that a user invoking a comparison skill may not anticipate.
This code embeds all checklist items in Chinese, which effectively fixes the generated audit content to a specific language. The file does not offer user opt-in for language selection or explain that the skill is intended only for a Chinese-language context, which matches the locale policy violation criteria.
The module docstring and all user-facing CLI prompts are written in Chinese, indicating the skill is designed to communicate in a fixed language. There is no documented user choice or opt-in for language/locale selection, which can violate language/locale policy requirements.
The skill includes user-info and interactive API-key bootstrap/browser-opening features that are not necessary for a narrow comparison or migration-assessment helper. In an agent-skill context, unrelated account and credential setup capabilities increase attack surface and can trick users into revealing or provisioning credentials for actions they did not expect this skill to perform.
The init flow stores the API key locally in ~/.ai-hive/config.json and sets file permissions, but it does not clearly warn the user beforehand that a long-lived credential will be written to disk. In shared, managed, or backed-up environments, undisclosed local secret storage can lead to accidental exposure, misuse, or policy violations even if the file is chmod 0600.
The file content is entirely written in Chinese, which imposes a specific language choice in the skill artifact without offering the user an alternative or opt-in. Under the policy rule, fixed language/locale requirements should either be optional for the user or clearly justified as region-specific.
The file embeds user-facing natural-language strings in Chinese, including the module description, CLI description, defaults, and search aliases, without offering any language or locale selection. This can violate language/locale policy when users are not explicitly opted into Chinese or a China-specific workflow.