T09 · Insecure Skill Coding Practices
- Location
scripts/imagegen.py:91- Finding
Bearer API Credential Can Be Redirected to an Arbitrary 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 a disclosure-checking skill also exposes broad AI generation, media transfer, credential storage, and download behavior with weak boundaries.
Install only if you intend this to be a media-generation and AI-HIVE API workflow, not just a passive disclosure checker. Use a dedicated AI-HIVE key, avoid custom base URLs unless you fully trust them, review generated commands before running them, and avoid uploading sensitive or unlicensed media.
scripts/imagegen.py:91Bearer API Credential Can Be Redirected to an Arbitrary Endpoint
scripts/imagegen.py:393Server-Controlled Task Fields Permit Output Path Traversal
scripts/imagegen.py:266Unrestricted Response-Directed Media Transfers and Unbounded Downloads
SKILL.md:67Runtime Dependency Is Recommended Without Version or Integrity Pinning
The skill is framed as a disclosure/compliance checker but appears to support direct text/image/video generation, user/account queries, pricing/model selection, uploads, and result downloads. In context, that is more dangerous because the domain concerns advertising and synthetic media, where hidden generation capabilities can facilitate undisclosed content creation, misleading outputs, and unanticipated spending while bypassing the narrower expectations of a review tool.
The skill is framed as a disclosure/compliance checker but appears to support direct text/image/video generation, user/account queries, pricing/model selection, uploads, and result downloads. In context, that is more dangerous because the domain concerns advertising and synthetic media, where hidden generation capabilities can facilitate undisclosed content creation, misleading outputs, and unanticipated spending while bypassing the narrower expectations of a review tool.
The skill is framed as a disclosure/compliance checker but appears to support direct text/image/video generation, user/account queries, pricing/model selection, uploads, and result downloads. In context, that is more dangerous because the domain concerns advertising and synthetic media, where hidden generation capabilities can facilitate undisclosed content creation, misleading outputs, and unanticipated spending while bypassing the narrower expectations of a review tool.
The skill is framed as a disclosure/compliance checker but appears to support direct text/image/video generation, user/account queries, pricing/model selection, uploads, and result downloads. In context, that is more dangerous because the domain concerns advertising and synthetic media, where hidden generation capabilities can facilitate undisclosed content creation, misleading outputs, and unanticipated spending while bypassing the narrower expectations of a review tool.
The file implements local video editing operations such as trim, aspect conversion, mute, normalization, and concat, which do not align with the skill's declared purpose of AI content disclosure/compliance analysis. This capability mismatch expands the skill's effective privileges and could let an agent modify media assets under the guise of a compliance tool, increasing the chance of unauthorized content manipulation or policy evasion.
The skill is presented as an AI-content disclosure checker, but its exposed commands and fixed configuration provide direct image-generation, upload, and task-management capabilities unrelated to compliance verification. This capability mismatch is dangerous because it can be used to generate synthetic marketing assets under the guise of a compliance tool, undermining user trust, bypassing governance expectations, and enabling misuse in regulated advertising contexts.
The skill is marketed as an AI-content disclosure checking tool, but the implementation is a generic AI generation client supporting chat, image, video, upload, and download workflows. This capability mismatch can mislead users, reviewers, and policy controls, making it easier to smuggle broad media-generation functionality into a narrowly approved compliance-oriented skill.
The skill documents and encourages capabilities that imply environment access, file I/O, network calls, and shell execution, but it declares no explicit tool scope or permissions boundary. In an agent environment, this creates an over-privilege and transparency problem: reviewers and orchestrators cannot reliably constrain what the skill may access, increasing the chance of unintended command execution, data exposure, or external API use.
The manifest positions the skill as a disclosure checker, but the usage section expands into generating new image/video assets and producing scripts, prompts, and code. This scope drift is risky because safety controls or user expectations for compliance review do not automatically cover content-generation behavior, especially in ad and synthetic-media contexts where generated assets may introduce legal, disclosure, or deception risks.
The trigger conditions are broad enough to catch requests that are not actually about disclosure checking, including general content creation and adaptation tasks. Over-broad activation is dangerous because it can route users into a skill with network, file, and generation-oriented behavior when they did not intend to invoke those capabilities.
The declared outputs go beyond compliance deliverables and include scripts, prompts, shot lists, image lists, and code commands. In practice, this broadens the skill from reviewer to content-production assistant, which can be exploited to obtain operational generation guidance from a tool users might trust as merely evaluative and low risk.
The default prompt hard-codes Chinese output and production-ready artifacts without user opt-in, which can override user expectations and reduce transparency about how the skill will respond. While not a classic security flaw, this creates a safety and misuse risk because users may receive executable-looking commands in a language they did not request, making review and validation harder.
The skill enables implicit invocation with no scoped activation criteria, so the agent may auto-select this skill for loosely related requests. Because the skill is designed to generate production-ready workflows and runnable AI-HIVE commands, unintended invocation could cause inappropriate handling of user requests, unwanted third-party API preparation, or disclosure/compliance guidance being applied outside the intended context.
The manifest describes a skill that accepts generation process, character type, edit level, platform, region, and rules to deliver disclosure elements, placement guidance, metadata ledgers, and pre-publication checklists. This file only collects a few CLI fields and writes a static blueprint JSON with canned lists, without implementing any disclosure assessment, rule evaluation, or AI-HIVE API interactions.
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:
Providing local media transformation in a disclosure-audit skill is unjustified by the stated business purpose and creates unnecessary capability to alter source evidence before review or publication. In this context, concat and other edit operations can facilitate producing or reshaping media rather than auditing disclosure obligations, making the mismatch more dangerous than the code alone would suggest.
The module docstring says this is a '通用 AI 能力调用工具' that wraps text chat, image generation, video generation, model queries, media upload, and task polling. That directly conflicts with the surrounding skill's declared intent as a specialized AI-content disclosure checking skill, indicating the documentation describes a broader generic tool than the skill is supposed to be.
This code file contains natural-language instructions, help text, and CLI descriptions exclusively in Chinese, beginning with the module docstring. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.
The generate subcommand exposes standalone image-generation functionality without any built-in enforcement that the output is tied to disclosure-check workflows. In the context of a skill advertised for transparency and labeling compliance, this creates a policy-confusion gap that can facilitate unauthorized synthetic content creation while users or platforms assume the tool is compliance-focused.
The docstring explicitly describes a general-purpose AI capability tool, contradicting the declared identity of a specialized disclosure-check skill. This inconsistency is dangerous because it signals capability laundering: operators may approve or trust the skill for a narrow compliance purpose while the codebase advertises and implements broader functionality.
The module docstring and all user-facing guidance are written exclusively in Chinese, presenting the skill as a general-purpose tool ('通用 AI 能力调用工具') rather than a region-specific or Chinese-only skill. Because there is no user opt-in or documented locale limitation, this creates a natural-language locale policy concern.
Exposing generic text chat and image generation inside a compliance/disclosure skill expands the attack surface beyond the declared use case. In a skill intended for policy checks, these unrelated capabilities can be abused to generate arbitrary content while bypassing governance based on skill name, category, or expected reviewer assumptions.
L003 的调用描述和适用请求全部以中文固定表述,没有说明是否支持其他语言,也未给出用户选择语言的机制。按规则,这可能构成语言/locale 约束未获用户明确选择的自然语言策略问题。
The docstring frames the script as producing a deterministic production brief for the disclosure-checking skill, implying an artifact tied to that purpose. In practice, the code emits mostly static project metadata and generic artifact labels, with no concrete disclosure-checking content or determination logic.
This Python file contains multiple natural-language strings in Chinese, including the module docstring, CLI description, skill name, and search aliases, with no indication that the skill is region-specific or that users may choose another language. Under the policy, hard-coding a specific language without opt-in or clear justification is a natural-language policy concern.