T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Unvalidated API Endpoint Override Can Expose API Credentials and User Media
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its stated AI-HIVE marketing purpose, but a configurable server address could expose your API key and uploaded media if changed.
Install only if you are comfortable using AI-HIVE with an API key and uploading selected campaign media. Keep the default AI-HIVE endpoint, avoid AI_HIVE_BASE_URL or --base-url unless you control the server, and use a limited API key because a changed endpoint could receive your key and media.
scripts/imagegen.py:91Unvalidated API Endpoint Override Can Expose API Credentials and User Media
scripts/videogen.py:91Unvalidated Video API Endpoint Override Can Expose API Credentials and Uploaded Media
The documentation presents a broad marketing/content-production workflow, but the code reportedly includes undeclared user-info, wallet, chat, and image-generation functionality while lacking the advertised persistence and reporting features. This is dangerous because users may share business data expecting a scoped marketing assistant, yet the skill may access adjacent account features or perform chargeable generation outside the described contract.
The documentation presents a broad marketing/content-production workflow, but the code reportedly includes undeclared user-info, wallet, chat, and image-generation functionality while lacking the advertised persistence and reporting features. This is dangerous because users may share business data expecting a scoped marketing assistant, yet the skill may access adjacent account features or perform chargeable generation outside the described contract.
The documentation presents a broad marketing/content-production workflow, but the code reportedly includes undeclared user-info, wallet, chat, and image-generation functionality while lacking the advertised persistence and reporting features. This is dangerous because users may share business data expecting a scoped marketing assistant, yet the skill may access adjacent account features or perform chargeable generation outside the described contract.
The documentation presents a broad marketing/content-production workflow, but the code reportedly includes undeclared user-info, wallet, chat, and image-generation functionality while lacking the advertised persistence and reporting features. This is dangerous because users may share business data expecting a scoped marketing assistant, yet the skill may access adjacent account features or perform chargeable generation outside the described contract.
The skill advertises executable code paths involving shell commands, file access, environment variables, and network use, but declares no explicit tool scope or permission boundaries. In an agent environment, this can cause the skill to run with broader ambient authority than users or reviewers expect, increasing the chance of secret exposure, unintended file modification, or unauthorized outbound requests.
The description says to use the skill when a user searches or asks about a long list of generic terms such as AI图片、图片生成、视频生成、内容营销、品牌营销 and 获客推广. These phrases are broad and overlap with many ordinary requests, while the file does not clearly define exclusion boundaries beyond a later 'not suitable' section, increasing the risk of unintended invocation.
The skill content is entirely presented in Chinese and positions itself for use based on Chinese-language search or query patterns, but it does not state that language selection is optional or user-driven. Under the policy, forcing a specific language or locale without opt-in can be a natural-language policy violation unless the restriction is explicitly justified.
The skill metadata and default prompt enforce Chinese output regardless of the user's language preference, which can override user intent and cause misleading or unusable responses. While this is not a direct code-execution issue, it is a prompt-safety and user-consent problem that can degrade reliability, conceal important warnings, or cause the system to behave unexpectedly in multilingual contexts.
The invocation scope is broad and loosely constrained: the default prompt and implicit invocation settings make it easy for the skill to activate on general AI marketing or media-generation queries without clear user intent boundaries. In a skill that also promises AI-HIVE code and task routing behavior, ambiguous triggering increases the risk of unintended execution paths, over-collection of user inputs, or surprise automation the user did not explicitly request.
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:
This Python skill presents its top-level description and most CLI guidance in Chinese, and there is no mechanism for the user to select a preferred language or opt in to this locale. The policy scope explicitly covers natural-language strings in code files, so a hard-coded single-language experience is a locale-policy issue here.
The skill embeds core user-facing content and defaults entirely in Chinese, including industry, mode, focus, channels, and boundary text. This enforces a specific language/locale without offering user opt-in or documenting that the skill is intended only for a Chinese-language or region-specific workflow.
This code file contains natural-language descriptions, help text, and user-facing interaction entirely in Chinese, beginning with the module docstring and continuing throughout the CLI experience. Under the policy rule, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the constraint is explicitly documented and justified, which is not present here.
The manifest describes this skill as a marketing-oriented AI-HIVE tool for current image/video models, asset upload, pricing snapshots, routing, polling, and task tracking. However, this file includes a full generic chat command that can send arbitrary text and multimodal chat requests unrelated to the declared image/video marketing scope, broadening behavior beyond what the manifest claims for this skill.
The file-level docstring says the brief is created 'without network calls', but this script is only a local JSON generator and does not cover the networked AI-HIVE querying, uploading, routing, polling, or task recording described in the manifest. This is more of a narrowing/incompleteness issue than a direct contradiction, so confidence is low and it is not a strong intent-divergence finding.
The manifest emphasizes delivering marketing strategies and image/video generation workflows via AI-HIVE. In contrast, the file includes generic user-info and raw models inspection commands that retrieve wallet/user information and full model listings, which are broader platform utility operations rather than the declared marketing skill behavior.
The manifest describes content strategy, generation, uploads, pricing snapshots, routing, polling, and task recording. The init flow additionally launches a browser to a URL containing from=cli-skill and skill=<name> for backend attribution, which is ancillary telemetry-style behavior not necessary to perform the declared marketing generation functions.