Back to skill

Security audit

Seedance 参考视频原创复刻|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches an AI-HIVE video-generation workflow, but it deserves review because it handles API keys and media uploads with an unvalidated configurable API endpoint.

Review before installing if you will use a real AI-HIVE API key or private reference media. Use only the official HTTPS AI-HIVE endpoint unless you fully trust a custom endpoint, avoid setting AI_HIVE_BASE_URL from untrusted environments, confirm authorization for any reference videos, and review all billable generation parameters before running commands.

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

Warning
Location
scripts/videogen.py:91
Finding

Bearer Credentials Can Be Sent to an Arbitrary or Plaintext API Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py:91-100, scripts/videogen.py:128-143, and scripts/videogen.py:586-587
Vulnerability Type: Unvalidated credential destination
Risk Level: Medium

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
class AiHiveClient:
    """封装 AI Hive OpenAPI HTTP 调用。"""

    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
            )
python
parser.add_argument("--api-key", help="AI Hive API Key (sk-api-*)")
parser.add_argument("--base-url", help=f"API Base URL (默认 {DEFAULT_BASE_URL})")

Technical Analysis

The API base URL can come from the --base-url command-line argument, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. None of these sources is validated to ensure that:

  • The URL uses HTTPS.
  • The destination is the legitimate AI-HIVE host.
  • The URL contains a valid HTTP or HTTPS scheme.
  • Sending the configured credential to the selected host has been explicitly authorized.

The resulting URL is passed to requests.request() with an Authorization: Bearer header containing the AI-HIVE API key. Consequently, an attacker wh ...[truncated 1475 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require the base URL to use HTTPS:

    python
    from urllib.parse import urlparse
    
    parsed = urlparse(candidate_url)
    if parsed.scheme != "https":
        raise SystemExit("The API base URL must use HTTPS.")
    
  2. Allowlist the official API hostname by default:

    python
    ALLOWED_API_HOSTS = {"ai-hive.iclip.cn"}
    if parsed.hostname not in ALLOWED_API_HOSTS:
        raise SystemExit("Untrusted API hostname.")
    
  3. If custom enterprise endpoints are required, place them behind an explicit option such as --allow-custom-api-host and require interactive confirmation before transmitting credentials.

  4. Do not automatically reuse the production API key for a custom destination. Require a separately supplied credential for nonstandard hosts.

  5. Reject URLs containing embedded user information, unexpected ports, fragments, or nonempty query strings.

  6. Treat configuration-file ownership and permissions as part of validation. Reject files not owned by the current user rather than only attempting to change their mode after reading them.

  7. Add automated tests confirming that HTTP URLs, lookalike domains, malformed URLs, and unauthorized custom hosts are rejected.

T08 · Insecure Dependencies

Note
Location
scripts/videogen.py:18
Finding

Unpinned Third-Party Dependency Installation Produces Non-Reproducible Builds

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:63 and scripts/videogen.py:18-23
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code

From SKILL.md:

text
先在本 Skill 目录执行。脚本默认使用 `https://ai-hive.iclip.cn/api`;需要 `requests`,视频本地处理需要 `ffmpeg`。

From scripts/videogen.py:

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

Technical Analysis

The project instructs users to install requests using an unconstrained pip3 install requests command. It does not provide a lockfile, pinned version, integrity hash, or documented isolated environment.

The package name is legitimate and no malicious dependency is embedded in the audited project. However, an unconstrained installation resolves whatever package and transitive dependency versions are available from the configured package index at installation time. This prevents reproducible dependency resolution and increases exposure to compromised future releases, incompatible updates, or a malicious package index configured in the user's environment.

Attack Path

  1. The requests module is unavailable in the user's Python environment.
  2. The script displays the instruction to run pip3 install requests.
  3. The user runs the command without a version constraint or hash verification.
  4. pip resolves the latest acceptable package and transitive dependencies from the configured index.
  5. If the index, package release, or a transitive release is compromised, malicious installation or runtime code executes with the privileges of the user running pip or the Skill.

This path requires a compromised dependency source or release; the audit found no evidence that the current requests package is malicious.

Impact Assessment

Impact depends on the privileges used during installation and execution. A compromised package could execute code as th ...[truncated 321 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a version-pinned dependency file, for example:

    text
    requests==<reviewed-version>
    
  2. Generate and verify package hashes, using a requirements entry such as:

    text
    requests==<reviewed-version> --hash=sha256:<verified-hash>
    
  3. Pin and hash relevant transitive dependencies through a lock-generation tool such as pip-compile.

  4. Recommend installation in a dedicated virtual environment rather than a global Python environment.

  5. Replace the runtime message with installation instructions referencing the audited requirements file:

    text
    python3 -m pip install --require-hashes -r requirements.txt
    
  6. Periodically review and update pinned versions for security fixes instead of allowing automatic adoption of unreviewed releases.

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 (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description promises a fairly comprehensive workflow for authorized Seedance reference-video recreation, including decomposition of reference structure, variable transfer, originality safeguards, prompt generation, copyright checking, and optional AI-HIVE API-based media generation operations. The supplied code does not implement those behaviors. It only parses command-line arguments and emits a JSON file with project metadata and some predefined lists. This is a materially different and much narrower purpose than the declared skill, so the description does not accurately represent the actual code behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a specialized workflow skill for authorized Seedance-style reference video recreation and differentiation, including analysis of reusable structure, generation of R2V prompts, recordkeeping, copyright checks, and optional API-driven media generation via AI-HIVE. The supplied code does none of that. It is a simple local CLI wrapper around ffmpeg/ffprobe for basic editing operations such as probing, trimming, aspect conversion, muting, loudness normalization, and concatenation. While video editing is loosely adjacent, the actual code lacks the core advertised behaviors and integrations, so the description does not accurately represent the code's primary purpose or capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

There is a meaningful description/behavior mismatch. Part of the declaration does match the code: it does use AI-HIVE OpenAPI patterns including model lookup, upload-token/upload/complete, pricing snapshot extraction, routing modes (COST_FIRST/SPEED_FIRST/SUCCESS_FIRST), asynchronous polling, and downloading. The embedded SKILL_CONFIG also targets Seedance models and supports reference media inputs for video generation. However, the declared skill is framed as a specialized business workflow for authorized reference-video remake/originalization, including accepting brand/reference/variable inputs and delivering structured analysis artifacts such as structure breakdown, differentiation方案, R2V prompts, task records, and copyright checks. None of those higher-level workflow functions are implemented. Instead, the actual code is a broad, generic AI Hive command-line client with extra unrelated capabilities (text chat, image generation, user info, model listing). So the description overstates specialized functionality and understates broader generic capabilities.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents executable workflows involving environment variables, local file access, shell commands, and outbound network use, but it does not declare any explicit tool/permission scope. That creates an overbroad trust boundary: an agent or reviewer cannot easily tell what capabilities are intended, which increases the risk of unintended command execution, data exfiltration, or misuse of local files and secrets.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger list includes broad phrases such as '视频复刻', '运镜复刻', and '动作参考', which can cause the skill to activate for ambiguous or high-risk requests involving imitation, copyright infringement, impersonation, or policy evasion. In this context, broad invocation increases the chance that an agent routes users into a workflow that normalizes near-copying of protected creative works, even though the text also includes some cautionary language.

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 requires a production-ready Chinese workflow, which imposes a language choice on the user. The file does not indicate that this is optional, user-selected, or justified as a region-specific requirement, so it appears to violate the language/locale policy.

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 without any visible activation constraints, exclusion conditions, or safety gating. In this context, that increases the chance the agent will auto-select a workflow that supports reference-video remake and AI-HIVE execution for borderline or unauthorized copying requests, reducing deliberate user confirmation before sensitive actions are prepared.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a skill centered on Seedance reference-video remake workflows, including authorized reference handling, originality/difference planning, copyright checks, AI-HIVE OpenAPI configuration, upload, pricing, routing, polling, and download. This file instead implements only a standalone local ffmpeg/ffprobe CLI for generic video probing and edits such as trim, aspect conversion, mute, loudness normalization, and concatenation, with none of the described Seedance- or AI-HIVE-specific workflow logic present.

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:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file is presented as a narrowly scoped Seedance remake skill, but actually exposes a reusable general-purpose AI Hive client with chat, image, video, model listing, upload, task polling, and account-related functions. This scope expansion increases the attack surface and makes it easier to repurpose the skill for unintended operations outside the declared workflow, weakening governance and policy enforcement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file-level description and all user-facing guidance are written exclusively in Chinese, presenting the skill as a general-purpose tool rather than a region-specific one. Because no opt-in or alternative locale is offered, this creates a natural-language locale policy concern for users who may expect language flexibility.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The metadata claims the skill performs copyright checks, originality safeguards, and structured remake artifacts, but the implementation merely forwards user-supplied media and prompts to generation APIs and downloads outputs. This mismatch can mislead operators into believing compliance controls exist when they do not, enabling unauthorized or infringing content generation with a false sense of safety.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The script description and several embedded strings are fixed in Chinese, including the CLI description and generated metadata values, with no option to select another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code creates parent directories and writes a JSON file to the path provided by --output, which can affect the user's filesystem. Although the filename is configurable, there is no confirmation prompt, warning comment/docstring about the write behavior, or explicit user-facing notice beyond printing the resulting path after the fact.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

For a skill framed as handling Seedance reference-video remake jobs, opening a browser for API-key onboarding and exposing a user-info command to query account and wallet details are ancillary account-management capabilities, not part of the described creative/remake workflow. These features may be convenient for a generic CLI, but they are not justified by the manifest's stated purpose.

Content

No source excerpt is available for this finding.