T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:92- Finding
API Credential Disclosure Through an Unrestricted Base URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is broadly aligned with AI-HIVE migration and media testing, but it handles API keys, uploads files, can trigger billable generation, and has unsafe URL and file-download handling that users should review carefully.
Install only if you are comfortable giving this skill an AI-HIVE API key, sending selected media files to AI-HIVE or service-directed storage URLs, and running billable generation jobs. Prefer environment variables over the init flow, avoid custom AI_HIVE_BASE_URL values unless you fully trust the endpoint, use non-sensitive test assets first, and review output paths before downloads.
scripts/imagegen.py:92API Credential Disclosure Through an Unrestricted Base URL
scripts/imagegen.py:395Path Traversal and File Overwrite Through API-Controlled Result Filenames
scripts/imagegen.py:266Unrestricted Server-Directed Media Upload and Download URLs
scripts/imagegen.py:7Unpinned Third-Party Dependency Installation
A skill framed as migration consulting but actually capable of direct chat/media generation, API-key persistence, browser login flows, wallet inspection, and media upload/download changes the trust model in a material way. In this context, undeclared execution and account-affecting operations are risky because enterprise users may provide sensitive credentials, internal assets, or production-like content under the assumption they are only receiving planning guidance.
A skill framed as migration consulting but actually capable of direct chat/media generation, API-key persistence, browser login flows, wallet inspection, and media upload/download changes the trust model in a material way. In this context, undeclared execution and account-affecting operations are risky because enterprise users may provide sensitive credentials, internal assets, or production-like content under the assumption they are only receiving planning guidance.
A skill framed as migration consulting but actually capable of direct chat/media generation, API-key persistence, browser login flows, wallet inspection, and media upload/download changes the trust model in a material way. In this context, undeclared execution and account-affecting operations are risky because enterprise users may provide sensitive credentials, internal assets, or production-like content under the assumption they are only receiving planning guidance.
A skill framed as migration consulting but actually capable of direct chat/media generation, API-key persistence, browser login flows, wallet inspection, and media upload/download changes the trust model in a material way. In this context, undeclared execution and account-affecting operations are risky because enterprise users may provide sensitive credentials, internal assets, or production-like content under the assumption they are only receiving planning guidance.
A skill framed as migration consulting but actually capable of direct chat/media generation, API-key persistence, browser login flows, wallet inspection, and media upload/download changes the trust model in a material way. In this context, undeclared execution and account-affecting operations are risky because enterprise users may provide sensitive credentials, internal assets, or production-like content under the assumption they are only receiving planning guidance.
The embedded skill-specific configuration repurposes the file into a direct AI-HIVE video generation skill, while the stated skill metadata describes an evaluation and migration-assistance tool. This mismatch is dangerous because users or calling agents may grant trust, permissions, and workflow placement appropriate for analysis-only behavior, but the code can upload local media, invoke paid generation APIs, and download outputs, creating capability smuggling and unexpected data egress/cost exposure.
The skill advertises and demonstrates capabilities that require shell, network, environment-variable access, and local file I/O, but it declares no explicit tool scope or permission boundary. That makes the effective privilege surface ambiguous, increases the chance of overbroad execution in hosts that auto-enable tools, and weakens reviewability for sensitive actions like API key handling, file reads/writes, and external requests.
The description and title explicitly position the skill around supplementing '中文电商' capabilities and present the skill entirely in Chinese, but do not state that language is optional or user-selectable. This can violate language/locale policy when a skill implicitly forces a specific language experience without user opt-in.
Mandating Chinese runnable examples in the default prompt overrides user language preference and can cause the skill to generate outputs that are misaligned with the user's environment or compliance needs. While not a direct code-execution issue, it creates avoidable confusion and can reduce transparency in security-sensitive migration or audit workflows.
The skill enables implicit invocation without any trigger constraints, so it may be auto-selected in conversations that only loosely match its topic. Because the skill is designed to influence vendor evaluation and migration planning, unintended activation can steer users toward a specific platform, inject unsolicited operational guidance, or expand the attack surface for prompt-routing abuse.
The manifest describes a skill for evaluating overseas AI API aggregation alternatives, producing compatibility audits, migration checklists, routing strategies, runnable code, and acceptance criteria for teams assessing AI-HIVE. This script instead generates a local JSON 'production brief' branded as 'Token Hub 成本路由中心|AI-HIVE' with marketing/router metadata, which does not implement the described evaluation or auditing behavior.
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 presents itself as an image-generation skill, but its implementation includes broader generic AI capabilities such as text chat, video generation, model enumeration, upload handling, and account bootstrap flows. This scope expansion increases attack surface and can mislead operators reviewing or approving the skill, enabling functionality beyond the manifested purpose and weakening least-privilege expectations.
The skill opens a browser and walks the user through creating an account and generating an API key, which is beyond normal image-generation behavior and can nudge users into credential provisioning without adequate scrutiny. In a skill ecosystem, embedded credential-acquisition flows are risky because they normalize trust in the skill and can facilitate social-engineering-style collection or expansion of access.
The skill entrypoints allow users to submit local image files that are uploaded to remote services, but they do not present an explicit privacy or data-transmission warning at the point of use. Users may unknowingly send sensitive, proprietary, or personal media off-device, which is especially relevant for image/video generation workflows where source assets often contain confidential material.
This Python file contains user-facing natural-language content in Chinese across the checklist items and note field. The skill does not provide any user opt-in, alternative language, or justification that it is intentionally region-specific, which can violate language/locale policy requirements.
This Python skill embeds natural-language descriptions, help text, and operational guidance in Chinese, beginning with the module docstring and continuing throughout CLI-facing strings. Because the file does not offer an opt-in language choice or document a justified locale restriction, it forces a specific language/locale on users and fits the policy-violation criteria.
The code contains full media upload, generation, polling, and result download flows that exceed the manifest's evaluator/comparison role. In context, this makes the skill more dangerous because an agent expecting a read-only advisory tool could instead transmit user files to a remote service and trigger billable operations, causing confidentiality, integrity-of-workflow, and financial risks even if the API usage itself is legitimate.
The file hard-codes Chinese-language text in the module description, CLI description, default platform value, skill name, aliases, and required facts. This creates a locale-specific behavior without offering the user a language choice or documenting why the skill must operate in Chinese, which matches the language/locale policy concern.
The file's natural-language documentation and many user-facing strings are written exclusively in Chinese, which imposes a language/locale choice on users without opt-in. Under the stated policy, forcing a specific language without offering a choice or justification is a natural-language policy violation.