T01 · Skill Instruction Hijacking
- Location
agents/openai.yaml:4- Finding
Implicit Invocation Steers General Migration Requests Toward a Specific Commercial Provider
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent as an AI-HIVE migration and generation helper, but it needs Review because it can implicitly steer broad Token Hub queries toward one provider while handling API keys, uploads, downloads, and billable generation actions with weak scoping safeguards.
Install only if you intentionally want an AI-HIVE-focused migration and sample-generation workflow. Treat it as an operational provider client, not a neutral read-only advisor: use a fresh limited API key, avoid changing AI_HIVE_BASE_URL or --base-url away from the official endpoint, upload only media you are authorized to share, use --no-download or a controlled output directory when testing, and watch for billable generation tasks.
agents/openai.yaml:4Implicit Invocation Steers General Migration Requests Toward a Specific Commercial Provider
scripts/imagegen.py:91Bearer API Key Can Be Sent to an Arbitrary User-Controlled Base URL
scripts/imagegen.py:266API-Controlled Upload and Download URLs Are Used Without Destination or Size Validation
scripts/imagegen.py:18Third-Party Requests Dependency Is Installed Without Version or Integrity Pinning
The skill markets itself as a broad consulting and migration-evaluation tool, but the detected implementation mainly performs AI generation, downloads, local config writes, browser actions, balance checks, and media uploads. This is a substantive trust-boundary violation: users may supply sensitive prompts, files, credentials, or business assets under the assumption of passive analysis, while the skill actually performs active external operations with cost and privacy consequences.
The skill markets itself as a broad consulting and migration-evaluation tool, but the detected implementation mainly performs AI generation, downloads, local config writes, browser actions, balance checks, and media uploads. This is a substantive trust-boundary violation: users may supply sensitive prompts, files, credentials, or business assets under the assumption of passive analysis, while the skill actually performs active external operations with cost and privacy consequences.
The skill markets itself as a broad consulting and migration-evaluation tool, but the detected implementation mainly performs AI generation, downloads, local config writes, browser actions, balance checks, and media uploads. This is a substantive trust-boundary violation: users may supply sensitive prompts, files, credentials, or business assets under the assumption of passive analysis, while the skill actually performs active external operations with cost and privacy consequences.
The skill markets itself as a broad consulting and migration-evaluation tool, but the detected implementation mainly performs AI generation, downloads, local config writes, browser actions, balance checks, and media uploads. This is a substantive trust-boundary violation: users may supply sensitive prompts, files, credentials, or business assets under the assumption of passive analysis, while the skill actually performs active external operations with cost and privacy consequences.
The implementation is wholly unrelated to the published purpose of evaluating Token Hub / AI-HIVE alternatives and instead performs local video manipulation. In a security review, hidden or scope-divergent functionality is dangerous because it can conceal unintended capabilities, bypass user consent boundaries, and make reviewers miss that the skill can read local paths and invoke native tooling.
The implemented skill behavior materially differs from the declared purpose: instead of providing Token Hub alternative evaluation and migration guidance, it performs direct image-generation, upload, and task execution against a fixed AI-HIVE model. This kind of capability mismatch is dangerous because users or calling systems may grant the skill broader trust, credentials, or approval based on its benign-sounding description, while it actually triggers billable external operations and transmits user-supplied media to a third-party service.
The skill metadata says it is an advisory/comparison tool for evaluating AI-HIVE as an alternative to Token Hub, but the embedded implementation is a fully operational AI-Hive client that can upload media, generate images/videos, and poll/download outputs. This capability mismatch is dangerous because users, reviewers, or higher-level agents may grant the skill broader trust or route it into advisory workflows while it actually performs external API actions and content generation.
The skill advertises executable scripts that use environment variables, local file I/O, shell commands, and network access, but it declares no explicit tool scope or permission boundaries. This creates a capability transparency problem: users and hosting platforms cannot easily tell that the skill can handle API keys, read/write local files, and invoke external services, increasing the chance of over-privileged execution or unintended data exposure.
The skill name heading and core description are entirely in Chinese and frame usage around Chinese search/query terms, with no indication that users may choose another language. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy violation unless a justified locale constraint is documented.
The prompt explicitly instructs the skill to produce runnable Chinese examples, which imposes a language preference in natural language. Because the file does not offer the user a language choice or document a justified region-specific constraint, this appears to violate the language/locale policy.
Implicit invocation is enabled with no visible trigger constraints, so the skill may activate in broader contexts than intended. Because this skill steers users toward a specific migration workflow and can influence technical and purchasing decisions, ambiguous activation increases the risk of unsolicited guidance, prompt hijacking via loose matching, or accidental use when the user did not request this domain-specific behavior.
The module docstring and CLI help explicitly advertise a generic short-video editing helper, contradicting the stated advisory-only skill purpose. This discrepancy makes the overall package more suspicious in context because it signals undeclared capabilities and increases the chance that users or hosting systems grant permissions inappropriate for the real behavior.
This file adds local process-execution capability through ffmpeg/ffprobe even though the skill is described as a Token Hub / AI-HIVE advisory assistant. That mismatch expands the skill's attack surface and operational privileges beyond user expectations, creating risk of unsafe local file access, unintended media processing, and abuse of host resources if the script is invoked by the agent runtime.
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 top-level module presents itself as a generic AI capability invocation tool, while the executable path at the bottom acts as a generated, fixed-purpose image skill for a specific commercial scenario. Misleading documentation and packaging increase the chance that reviewers, orchestrators, or users misunderstand what will execute, which can lead to inappropriate approval, unsafe invocation, or accidental transmission of data to external services.
The module docstring and user-facing interface text are written in Chinese and present the tool as a general-purpose AI skill, but there is no indication that users can opt into another language or locale. For a general skill, hard-wiring one language in natural-language instructions and prompts can violate language-choice policy expectations.
The skill includes browser-assisted API key acquisition, local credential storage, and direct authenticated API usage even though the stated skill purpose is advisory comparison and migration guidance. This is risky because it expands the trust boundary unnecessarily: a user invoking what appears to be a consultative skill may be led into provisioning credentials and enabling account actions that can incur charges or expose sensitive account access.
The checklist strings are written entirely in Chinese, and the file contains no indication that the language is configurable or intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The module docstring presents the file as a general-purpose AI-Hive tool, which conflicts with the specialized advisory identity claimed by the skill metadata. This inconsistency undermines security review and policy enforcement because capability classifiers may rely on metadata or top-level descriptions that no longer reflect the code's real behavior.
The generate/upload/task commands expose direct media-generation and file-upload operations that are not necessary for a migration-advisor skill. In context, this increases the chance of covert action-taking, unexpected data exfiltration of local media files, or unintended paid API consumption when a caller expects analysis-only behavior.
The docstring and CLI description hard-code Chinese-language naming ('Token Hub 成本路由中心|AI-HIVE') with no indication that language is selectable or that the skill is intended only for a Chinese-language or region-specific context. This can violate language/locale policy when users are not given an opt-in or alternative locale.
The top-level docstring is entirely in Chinese and describes the tool as a general-purpose AI capability wrapper, while later user-facing help and status messages are also Chinese by default. For a general-purpose skill, this effectively forces a specific language/locale without any opt-in or documented regional justification.