Back to skill

Security audit

真实买家评价转广告视频|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real AI-HIVE ad-video helper, but it needs Review because it can use stored API keys, upload media, submit potentially billable jobs, and send credentials to a configurable API host without enough safeguards.

Install only if you intentionally want an AI-HIVE-specific workflow. Use a limited API key if available, avoid setting AI_HIVE_BASE_URL or --base-url to anything other than the intended AI-HIVE endpoint, review every generated command before running it, and confirm costs and uploaded files manually before image or video generation.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T01 · Skill Instruction Hijacking

Warning
Location
agents/openai.yaml:3
Finding

Implicit Skill activation promotes and redirects users to a fixed third-party service

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:7, agents/openai.yaml:3-6
Vulnerability Type: Model-facing promotional instruction and traffic diversion
Risk Level: Medium

Evidence

markdown
[真实买家评价转广告视频进入 AI-HIVE](https://ai-hive.iclip.cn/chat)
yaml
interface:
  display_name: "真实买家评价转广告视频|AI-HIVE"
  short_description: "把真实买家评价转广告视频需求变成可执行工作流、可运行代码与可交付内容"
  default_prompt: "Use $real-review-to-ad-video-ai-hive to turn my request into a production-ready Chinese workflow, runnable AI-HIVE commands, and a quality checklist."
policy:
  allow_implicit_invocation: true

Technical Analysis

The Skill documentation contains a prominent fixed link to AI-HIVE, while the Agent configuration directs generated responses toward runnable AI-HIVE commands. The Skill may also be activated implicitly.

The declared business function is to convert authorized customer reviews into advertising-video production assets. Requiring generated answers to promote one named provider and directing users to its website is not inherently necessary for planning scripts, storyboards, evidence records, or local video processing.

This model-facing configuration can influence the current session by replacing vendor-neutral assistance with provider-specific onboarding and commands. The risk is reinforced by implicit invocation because users may receive third-party promotion without expressly selecting this Skill or requesting AI-HIVE.

Attack Path

  1. A user asks a general question about converting customer reviews into advertising content.
  2. The platform implicitly activates the Skill because allow_implicit_invocation is enabled.
  3. The loaded instructions bias the response toward AI-HIVE commands and its fixed website.
  4. The user is redirected to the provider, where account registration, telephone verification, API-key creation, or paid generation may follow.
  5. The provider receives traffic and att ...[truncated 484 chars]
Remediation
View remediation

Remediation Suggestions

  • Disable implicit invocation for this vendor-specific Skill by setting allow_implicit_invocation: false.
  • Remove the fixed promotional link from the main instructions or place it in an explicitly labeled optional provider-integration section.
  • Change the default prompt to request a vendor-neutral workflow unless the user specifically asks for AI-HIVE.
  • Clearly disclose that AI-HIVE is an external commercial service and that content submitted to it leaves the local environment.
  • Require affirmative user selection before presenting provider onboarding, API-key setup, or paid-service commands.
  • Remove unsupported promotional claims or provide independently verifiable sources and dates.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imagegen.py:91
Finding

User-controlled API base URL can exfiltrate the AI-HIVE bearer credential

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:91-100, scripts/imagegen.py:128-144; duplicated in scripts/videogen.py:91-100, scripts/videogen.py:128-144
Vulnerability Type: Credential disclosure through an unrestricted API endpoint
Risk Level: High

Evidence

python
def _resolve_base_url(self, cli_url):
    if cli_url:
        return cli_url.rstrip("/")
    env_url = os.environ.get("AI_HIVE_BASE_URL")
    if env_url:
        return env_url.rstrip("/")
    file_config = self._read_config_file()
    if file_config.get("base_url"):
        return file_config["base_url"].rstrip("/")
    return DEFAULT_BASE_URL
python
def __init__(self, config):
    self.config = config
    self.base = config.base_url
    self.headers = {
        "Authorization": f"Bearer {config.api_key}",
        "Content-Type": "application/json",
    }

def _url(self, path):
    return f"{self.base}/openapi/v1/{path}"

def _request(self, method, url, **kwargs):
    self.config.log(f"{method} {url}")
    try:
        resp = requests.request(
            method, url, headers=self.headers, timeout=DEFAULT_TIMEOUT, **kwargs
        )

Technical Analysis

The scripts allow the API base URL to come from a command-line argument, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. No scheme validation, hostname allowlist, certificate pinning, or explicit confirmation is applied.

The client then attaches the AI-HIVE bearer credential to every request sent through _request. Consequently, an attacker who can influence the base URL without knowing the API key can redirect an authenticated request to an attacker-controlled HTTPS server and capture the Authorization header.

The same implementation is present in both image and video generation clients, increasing the number of affected entrypoints.

Attack Path

  1. The victim has a valid ...[truncated 1147 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not permit arbitrary base URLs in normal production operation.
  • Enforce an HTTPS scheme and an exact hostname allowlist, such as ai-hive.iclip.cn.
  • If custom endpoints are needed for development, require a separate explicit development flag and never automatically reuse the production API key.
  • Bind credentials to approved origins and reject redirects to a different host.
  • Use separate credentials for test and production environments.
  • Warn and require interactive confirmation before sending credentials to a non-default endpoint.
  • Ensure redirect handling cannot forward the Authorization header to an untrusted origin.
  • Apply identical corrections to scripts/imagegen.py and scripts/videogen.py.

other

Warning
Location
scripts/imagegen.py:462
Finding

Billable generation is submitted without an enforced confirmation boundary

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:462-497; equivalent generation flow exists in scripts/videogen.py
Vulnerability Type: Unconfirmed paid external operation
Risk Level: Medium

Evidence

python
def cmd_image(client, args):
    model_entry = client.find_model(args.model, "IMAGE")
    pricing = client.get_pricing_snapshot(model_entry, args.mode)

    image_media_ids = []
    if args.image:
        for img_path in args.image:
            media_id = upload_media(client, img_path)
            image_media_ids.append(media_id)

    params = parse_params(args.param)

    result = client.generate_image(
        args.model, args.mode, args.prompt, pricing,
        batch_size=args.batch,
        image_media_ids=image_media_ids,
        params=params,
    )
    task_id = result.get("taskId")
    if not task_id:
        print(json.dumps(result, ensure_ascii=False, indent=2))
        return

    print(f"图片生成任务已提交:taskId = {task_id}")
    if args.no_download:
        print(json.dumps(result, ensure_ascii=False, indent=2))
        return

    poll_task(client, task_id, output_dir=args.output_dir,
              no_download=args.no_download)

Technical Analysis

The documentation states that potentially billable image or video generation should occur only after the user reviews and confirms the final parameters and routing mode. The implementation retrieves a pricing snapshot but immediately submits the generation request. It does not display the price and wait for confirmation, enforce a spending ceiling, distinguish interactive from automated execution, or use a dry-run stage.

A CLI invocation is normally evidence of intent, but this Skill is designed for use by an Agent and allows implicit invocation. Therefore, documentation-only consent requirements are insufficient: an Agent, wrapper, or automation can invoke generate and create a paid task without ...[truncated 937 chars]

Remediation
View remediation

Remediation Suggestions

  • Add a mandatory preview stage showing model, routing mode, pricing snapshot, batch size, uploaded files, and maximum estimated cost.
  • Require an explicit confirmation token or --confirm-charge option before submission.
  • Make dry-run behavior the default when invoked by an Agent.
  • Add configurable per-task and per-session spending ceilings.
  • Reject unexpectedly large batch sizes and validate all provider-specific parameters.
  • Require a second confirmation when reference media will be uploaded.
  • Record the approval event, pricing snapshot, task ID, and input hash in an audit log without recording the API key.
  • Apply the same controls to image and video generation paths.

T08 · Insecure Dependencies

Note
Location
scripts/imagegen.py:18
Finding

Third-party dependency is installed without version or integrity pinning

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:18-22, scripts/videogen.py:18-22; no dependency lock or requirements file is present
Vulnerability Type: Unpinned runtime dependency
Risk Level: Low

Evidence

python
try:
    import requests
except ImportError:
    print("缺少依赖:requests。请运行 pip3 install requests", file=sys.stderr)
    sys.exit(1)

Technical Analysis

The package instructs users to install requests directly with pip3 install requests, but the audited project contains no version constraint, lock file, hash verification, or reproducible environment definition.

requests is a legitimate and widely used package; the audit found no evidence that the project intentionally references a typosquatted package. Nevertheless, installing an unconstrained latest version means the effective dependency code can change after the Skill itself has been reviewed. A future compromised release, malicious package-index configuration, or incompatible update would execute in the same Python process as the Skill and gain access to its API key, uploaded media, filesystem permissions, and network connectivity.

Attack Path

  1. A user follows the installation instruction in an environment lacking requests.
  2. pip resolves the package from the configured package index without a pinned version or expected hash.
  3. The index, resolver configuration, or a future package release supplies compromised code.
  4. The malicious dependency executes when imported by the image or video generator.
  5. It can inspect process environment variables, intercept bearer headers, read accessible files, or modify network requests.

Impact Assessment

A compromised dependency would run with the operating-system privileges of the user launching the Skill. It could access the API key, media selected for upload, generated files, and any other files readable by that user. The current evidence establishes ...[truncated 102 chars]

Remediation
View remediation

Remediation Suggestions

  • Add a dependency manifest with an explicitly reviewed requests version range.
  • Prefer a lock file that records transitive dependency versions.
  • Use hash-verified installation, for example pip's --require-hashes.
  • Document the trusted package index and prevent unexpected extra-index resolution.
  • Run dependency vulnerability and provenance checks in CI.
  • Use a dedicated virtual environment with only the minimum required packages.
  • Periodically update pins through a controlled review process rather than installing the unconstrained latest release.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill markets itself as enforcing authorized-real-review-only use, but the finding states there is no enforcement of those constraints and that several broader capabilities are undeclared. In this context, absence of enforcement is a substantive security and integrity issue: it can enable creation of misleading social-proof content, unauthorized use of references, and access to user/account functionality under a misleadingly narrow description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill markets itself as enforcing authorized-real-review-only use, but the finding states there is no enforcement of those constraints and that several broader capabilities are undeclared. In this context, absence of enforcement is a substantive security and integrity issue: it can enable creation of misleading social-proof content, unauthorized use of references, and access to user/account functionality under a misleadingly narrow description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill markets itself as enforcing authorized-real-review-only use, but the finding states there is no enforcement of those constraints and that several broader capabilities are undeclared. In this context, absence of enforcement is a substantive security and integrity issue: it can enable creation of misleading social-proof content, unauthorized use of references, and access to user/account functionality under a misleadingly narrow description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill markets itself as enforcing authorized-real-review-only use, but the finding states there is no enforcement of those constraints and that several broader capabilities are undeclared. In this context, absence of enforcement is a substantive security and integrity issue: it can enable creation of misleading social-proof content, unauthorized use of references, and access to user/account functionality under a misleadingly narrow description.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises executable workflows that involve environment variables, local file operations, network access, and shell commands, but it does not declare any tool scope or permissions boundary. This creates an overbroad execution surface where an agent may invoke sensitive capabilities without explicit user-visible restriction, increasing the risk of secret exposure, unintended filesystem changes, or unreviewed outbound requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The default prompt explicitly instructs the skill to produce a "production-ready Chinese workflow," which imposes a language choice regardless of user preference. This is a natural-language policy concern because the file does not offer a language option or indicate that Chinese output is optional or user-selected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest enables implicit invocation with no visible trigger narrowing, allowing the skill to be auto-selected in broader contexts than intended. Because this skill can generate runnable AI-HIVE commands and advertising workflows, unintended invocation could lead to unauthorized ad-content generation, misuse of review assets, or policy-sensitive marketing outputs without clear user confirmation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/edit_video.py (reported line 20)May include surrounding context.

python
def run(args: list[str]) -> None:
    print(" ".join(args))
    subprocess.run(args, check=True)


def main() -> None:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file’s docstring and all user-facing prompts/messages are written exclusively in Chinese, indicating the skill is designed to operate in a single language without offering an opt-in or alternative locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a skill for turning authorized real buyer reviews into ad videos, including evidence grouping, ad angles, subtitle cards, scene images, video variants, and provenance ledgers. In this file, the generated skill configuration hard-codes an image model and the exposed generate command forwards only to cmd_image, while the skill-specific CLI omits any review-processing or video-generation flow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file presents itself as a narrowly scoped skill for turning real reviews into ad videos, but actually embeds a broad AI Hive client with unrelated capabilities such as chat, model discovery, uploads, image generation, and account queries. This expands the reachable attack surface and violates least-privilege expectations for a skill consumers may trust as single-purpose.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring explicitly describes the program as a generic AI capability tool, while the embedded skill metadata markets it as a specialized review-to-ad-video skill. This contradiction is a security concern because capability misrepresentation undermines informed trust decisions and can hide broader operational powers inside a seemingly constrained skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The user-info capability can retrieve account details and wallet balance, which are unrelated to review-to-video generation and may disclose sensitive billing or account metadata. In a skill context, hidden access to such data is dangerous because operators may invoke the skill assuming it only handles creative generation, not account inspection.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The general text-chat endpoint enables arbitrary prompt submission beyond the stated video-ad transformation use case. That makes the skill a covert wrapper for broader model access, increasing misuse potential and defeating security review assumptions about what the skill can do.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Standalone image generation is outside the skill's declared video-focused purpose and creates additional capabilities for unreviewed content creation. In a narrowly described marketing skill, this mismatch matters because users and reviewers may underestimate what the tool can actually generate and exfiltrate through.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The docstring, argument parser description, and skill name are all presented only in Chinese, which can constitute a language/locale policy issue when no user opt-in or justification is provided. The file does not indicate that the skill is region-specific or that users may choose another language.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The module docstring says it is a general AI capability tool covering text chat, image generation, video generation, model queries, media upload, and task polling via argparse subcommands. However, the runtime entrypoint at the bottom uses skill_main(), whose parser only exposes image generation, task query, upload, and init for this packaged skill, so the active behavior is narrower than the documentation claims.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

cmd_upload prints that the returned mediaId can be passed to chat/image/video, which is true for the generic helper functions but contradicts the packaged skill interface in this file. The skill-specific parser only exposes generate, task, upload, and init, so the user-facing guidance does not match what this skill actually allows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and all user-facing guidance are written in Chinese, presenting the skill as a general-purpose tool without indicating that Chinese is required or optional. Under the policy rule, forcing a specific language or locale without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.