Back to skill

Security audit

AI大模型专家|霸总短剧 AI生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches an AI-HIVE media-generation workflow, but it can send the user's bearer API key to an arbitrary configured endpoint, so it needs review before installation.

Install only if you trust the publisher and AI-HIVE account handling. Keep the default HTTPS AI-HIVE endpoint, do not set AI_HIVE_BASE_URL or --base-url to an untrusted host, avoid placing the API key in shared environments, and prefer installing dependencies in an isolated environment with reviewed pinned versions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imagegen.py:92
Finding

Bearer Credential Can Be Redirected to an Arbitrary API Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:92-98, 130-143, 586-587; scripts/videogen.py:92-98, 130-143, 586-587
Vulnerability Type: Unrestricted authenticated endpoint configuration
Risk Level: High

Vulnerable Code

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
self.headers = {
    "Authorization": f"Bearer {config.api_key}",
    "Content-Type": "application/json",
}

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
        )
python
parser.add_argument("--base-url", help=f"API Base URL (default {DEFAULT_BASE_URL})")

The same implementation is present in both image and video generation scripts.

Technical Analysis

The scripts obtain the API base URL from a command-line argument, the AI_HIVE_BASE_URL environment variable, or the local configuration file. They do not require HTTPS, validate the destination hostname, or confirm that the configured endpoint is controlled by AI-HIVE.

The client then attaches the AI-HIVE API key as a bearer credential to every request made through that base URL. Consequently, endpoint selection and credential destination are controlled by configuration that may be modified independently of the credential.

This violates the principle that bearer credentials must be scoped to trusted origins. Because bearer tokens do not provide destination binding, any server receiving the header can reuse the credential.

Attack Path

  1. An a ...[truncated 1248 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin authenticated requests to the official HTTPS origin by default:
    • Scheme: https
    • Hostname: ai-hive.iclip.cn
    • Expected API path prefix: /api
  2. Reject URLs using plaintext HTTP, embedded credentials, unexpected ports, or unapproved hostnames.
  3. If custom endpoints are a legitimate requirement, require an explicit high-friction option such as --allow-custom-endpoint.
  4. Display the destination hostname and require confirmation before sending an existing credential to a non-default endpoint.
  5. Use separate credentials for custom endpoints rather than automatically reusing the AI-HIVE key.
  6. Apply the same validation after redirects, or disable cross-origin redirects for authenticated requests.
  7. Add automated tests covering malicious environment variables, configuration-file overrides, HTTP URLs, look-alike domains, and redirect-based credential leakage.
  8. Advise affected users to revoke and rotate any API key that may already have been sent to an untrusted endpoint.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:126
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:126
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

bash
pip3 install requests

Technical Analysis

The documented installation procedure retrieves the latest version of requests and its transitive dependencies from the user's configured Python package index. The project does not provide a pinned requirements file, lock file, or package hashes.

As a result, installation is not reproducible and depends on mutable external package-index state. A compromised package release, compromised index, maliciously configured mirror, or incompatible future dependency version could introduce unintended code into the environment.

Although requests is correctly spelled and is a well-known package, using an unconstrained dependency without integrity verification remains a supply-chain weakness.

Attack Path

  1. The user follows the setup instructions and runs pip3 install requests.
  2. Pip contacts the configured package index or mirror.
  3. Pip resolves whichever package and transitive dependency versions are current at installation time.
  4. If the index, mirror, package release, or dependency is compromised, malicious package code may be installed.
  5. The malicious code can execute during installation or when the scripts import and use the dependency.

Impact Assessment

Exploitation would run with the privileges of the user performing the installation or executing the Skill. Depending on those privileges, an affected dependency could:

  • Read the AI-HIVE API key and other files accessible to the user.
  • Modify files in the Python environment or user account.
  • Intercept prompts, uploaded media, API responses, and generated results.
  • Make arbitrary network requests.
  • Establish additional persistence if permitted by the user's account.

The practical likelihood depends on compromise of the config ...[truncated 129 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency file with exact versions for requests and all transitive dependencies.
  2. Record cryptographic hashes and require verification during installation.
  3. Replace the current command with a reproducible installation command such as:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  4. Generate and review the lock file using a trusted dependency-management process.
  5. Use an approved package index over HTTPS and document the expected index.
  6. Regularly scan dependencies for known vulnerabilities and update pins through a controlled review process.
  7. Install dependencies inside an isolated virtual environment with only the permissions required to run the Skill.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个具备端到端 AI 短剧/漫剧生成与编辑能力的系统,并涉及 AI-HIVE 平台上的多模型调用与任务管理。但给出的代码仅生成一个静态生产需求蓝图 JSON,不处理媒体文件,不调用任何 AI 模型或外部服务,也不执行上传、路由、轮询或下载。虽然生成 brief 可视为前期策划支持,但这只是声明能力中的很小一部分,且与宣称的核心功能相比存在明显的能力落差,因此属于描述与实际行为不符。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description emphasizes a specialized short-drama and comic-video generation/editing assistant for transforming scripts, storyboards, character art, and reference videos into deliverable short-drama outputs. The code does use AI-HIVE and can submit generic image/video generation jobs, upload media, poll tasks, and download outputs, so there is partial thematic overlap with AI media generation. However, the actual supplied skill wrapper is not focused on short-drama/video production: its fixed configuration targets public_model_gpt_image_2 and exposes generate, task, and upload for image creation/editing. More broadly, the file is a generic AI-HIVE CLI SDK with many unrelated helper functions (chat, model listing, user info, generic video generation) rather than a dedicated short-drama workflow tool. There is no code implementing script-to-video conversion, storyboard handling, role/scene-specific processing, or other specialized short-drama logic suggested by the declared purpose. Therefore the declared description materially overstates and mischaracterizes the actual primary behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents shell commands, environment-variable use, file paths, and network/API interactions, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where a host or reviewer cannot easily determine what capabilities the skill expects, increasing the chance of unintended file, shell, or network access during execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest sets language: zh-CN, and the skill content is written entirely in Chinese, but there is no indication that users can opt into another language or that the skill is restricted to a China-specific compliance or regional use case. This creates a natural-language policy concern because it appears to enforce a specific language/locale by default.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill enables implicit invocation globally without any trigger scoping, exclusion rules, or user-consent boundaries. That can cause the assistant to auto-select this skill in loosely related conversations, increasing the chance of unintended prompt injection exposure, unexpected data sharing with the skill, or execution of workflows the user did not explicitly request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s natural-language description and CLI description are only in Chinese (e.g. '霸总短剧 AI生成与编辑') with no indication that users may choose another language or locale. The policy requires flagging language or locale constraints when they are imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains natural-language descriptions and CLI guidance entirely in Chinese, starting from the module docstring and continuing throughout user-facing messages. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in, and there is no indication that users can choose another language or that the skill is region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest focuses on turning creative inputs into deliverable short-drama and manga videos using image/video models. This file contains a chat subcommand and corresponding chat_text API call for general text conversation, which is not described in the manifest and is a distinct capability from media generation/editing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file bundles broad generic API capabilities—text chat, model enumeration, account inspection, and standalone media upload—despite the skill being presented as a short-drama video generation/editing tool. This expands the accessible attack surface and enables unintended use of the skill as a general-purpose API client, undermining least-privilege and increasing the chance of data exposure or platform misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains natural-language descriptions presented only in Chinese, including the module docstring and later CLI help text. Under the policy, forcing a specific language without user opt-in is a violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Exposing user-info allows callers to retrieve account-related information, including wallet/balance data, which is not necessary for short-drama generation. Even if not directly code-executing, this creates an information disclosure path that can leak sensitive operational or billing details to unauthorized users of the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The display name, description, and default prompt are written entirely in Chinese, which may imply a fixed language experience without any stated opt-in or locale constraint. Because the file does not document that the skill is region-specific or that users can choose another language, this may violate language or locale policy expectations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The top-level docstring and parser description present this file as a '通用 AI 能力调用工具' covering text chat, image generation, video generation, model query, upload, and polling. But the actual entrypoint is skill_main() with a fixed SKILL_CONFIG for a specific GPT Image 2 image-generation skill, so the inline documentation overstates and misstates what this shipped skill file is intended to be.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes a specialized skill for generating and editing CEO-romance short-drama and manga video assets. However, this code includes generic user-info, models, and task commands that query wallet/account information and enumerate all available AI Hive models, which goes beyond the stated end-user creative workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The models capability lets users enumerate backend model inventory and routing options, which is broader platform discovery than required for a specialized short-drama generator. This can help users map internal service capabilities and pivot to unsupported or higher-risk usage patterns beyond the advertised purpose.

Content

No source excerpt is available for this finding.