Back to skill

Security audit

Seedance 短剧生成工作室|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with AI-HIVE media generation, but it persists and uses a paid API key with an unvalidated custom API endpoint that could expose the key if configuration is altered.

Review this skill before installing. Use it only with an AI-HIVE key you can revoke, avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust the endpoint, and confirm prompts, uploads, routing, cost, and download location before running generation commands.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:91
Finding

Unrestricted API Base URL Can Expose the AI-HIVE Bearer Credential in the Image Generation Client

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py, lines 91-99 and 130-143
Vulnerability Type: Arbitrary authenticated API endpoint / credential disclosure
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
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 image generation client accepts its API base URL from the --base-url command-line option, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. No validation restricts the URL scheme or destination host.

The client then unconditionally attaches the AI-HIVE API key as an Authorization: Bearer header to requests constructed from that URL. Consequently, an attacker who can influence any accepted base URL source can redirect authenticated requests to an attacker-controlled endpoint. The implementation also permits an http:// endpoint, which could expose the credential through network interception.

This issue does not require arbitrary code execution. It exploits the trust placed in configuration data and the unconditional reuse of a sensitive production credential for an unverified origin.

Attack Path

  1. The victim ...[truncated 1298 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require HTTPS for every authenticated API endpoint and reject plaintext HTTP.
  2. Allowlist the expected API origin, such as https://ai-hive.iclip.cn, before attaching the bearer credential.
  3. Parse URLs with a standard URL parser and reject user information, fragments, malformed ports, unsupported schemes, and unexpected hosts.
  4. Do not send the production API credential to a custom host by default. If custom endpoints are needed for development, require a separate credential and an explicit opt-in.
  5. Treat the environment and configuration file as untrusted inputs. Validate the resolved URL regardless of its source.
  6. Consider storing only the API key in the configuration file and keeping the production endpoint fixed in code.
  7. Add tests confirming that HTTP URLs, lookalike domains, subdomain tricks, embedded credentials, and alternate ports are rejected.
  8. If exposure may already have occurred, revoke and rotate the affected API key and review account task and billing history.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/videogen.py:91
Finding

Unrestricted API Base URL Can Expose the AI-HIVE Bearer Credential in the Video Generation Client

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py, lines 91-99 and 130-143
Vulnerability Type: Arbitrary authenticated API endpoint / credential disclosure
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
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 video generation client resolves the API endpoint from an unrestricted command-line argument, environment variable, or configuration-file field. It performs no scheme validation and no destination allowlisting.

All API requests use a shared header dictionary containing the AI-HIVE bearer credential. Because the destination is derived directly from the unvalidated base URL, the credential can be transmitted to an attacker-controlled origin. Permitting plaintext HTTP also makes interception possible on an untrusted network.

The vulnerable pattern is duplicated independently in the video generation script and is reachable through its generation, task, upload, model, and related API operations.

Attack Path

  1. The victim configures a valid AI-HIVE API key.
  2. An attacker causes the victim's process to use a malicious AI_HIVE_BASE_URL, persuades the ...[truncated 1042 chars]
Remediation
View remediation

Remediation Suggestions

  1. Enforce https:// for authenticated service communication.
  2. Verify the normalized hostname against an explicit allowlist before constructing authenticated requests.
  3. Reject URLs containing user information, fragments, unsupported schemes, malformed hosts, or unauthorized ports.
  4. Never attach an AI-HIVE production credential to a custom origin. Development endpoints should use separate, restricted credentials.
  5. Validate configuration values after resolving precedence among CLI, environment, and file sources.
  6. Prefer a fixed production base URL unless endpoint customization is an essential documented feature.
  7. Add automated negative tests for HTTP endpoints, lookalike hosts, suffix-based hostname bypasses, redirects, and nonstandard ports.
  8. Rotate potentially exposed credentials and inspect generation and billing records for unauthorized activity.
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
96% confidence
Finding

If the skill is effectively a generic AI-HIVE media client with undeclared text chat, image generation, account lookup, and model query functions, then the declared purpose materially understates its operational scope. Under-declared capabilities reduce informed consent and can expose account metadata or incur unexpected actions/costs, particularly in an agent environment where users rely on the manifest to understand what a skill can do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the skill is effectively a generic AI-HIVE media client with undeclared text chat, image generation, account lookup, and model query functions, then the declared purpose materially understates its operational scope. Under-declared capabilities reduce informed consent and can expose account metadata or incur unexpected actions/costs, particularly in an agent environment where users rely on the manifest to understand what a skill can do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the skill is effectively a generic AI-HIVE media client with undeclared text chat, image generation, account lookup, and model query functions, then the declared purpose materially understates its operational scope. Under-declared capabilities reduce informed consent and can expose account metadata or incur unexpected actions/costs, particularly in an agent environment where users rely on the manifest to understand what a skill can do.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the skill is effectively a generic AI-HIVE media client with undeclared text chat, image generation, account lookup, and model query functions, then the declared purpose materially understates its operational scope. Under-declared capabilities reduce informed consent and can expose account metadata or incur unexpected actions/costs, particularly in an agent environment where users rely on the manifest to understand what a skill can do.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises executable workflows and includes code examples that rely on environment variables, filesystem access, networking, and shell-style/local tool usage, but it declares no explicit tool scope or permissions boundary. This creates a least-privilege and reviewability problem: a runtime may grant broader capabilities than users or reviewers expect, increasing the chance of unintended file access, network egress, or command execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include broad categories such as 'AI短剧', '漫剧', and '剧情视频', which can cause the skill to activate in many loosely related contexts. Overbroad activation increases the chance that users are funneled into a skill with networked, file-handling, or billable generation capabilities when they did not intend to use it, raising risks of misrouting, oversharing sensitive content, or accidental spend.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The default prompt explicitly instructs the skill to produce a 'production-ready Chinese workflow', which imposes a language/locale requirement. There is no indication in this file that the user can opt into another language or that the Chinese-only behavior is a documented, justified regional constraint.

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 scoped trigger constraints, so the agent may auto-select this capability in loosely related user requests. Because this skill can produce runnable AI-HIVE commands and orchestrate uploads, polling, and downloads, unintended activation increases the risk of overbroad tool use, unexpected external API interaction, or assisting policy-sensitive content generation workflows without clear user intent.

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
90% confidence
Finding

The manifest presents this as a Seedance short-drama image generation studio focused on story assets, prompts, generation tasks, and continuity workflows via AI-HIVE. However, the file-level docstring and implemented client also support generic text chat, user-info/wallet queries, model listing, generic video generation, and broad media upload functionality, which goes beyond the skill's described Seedance studio role.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and all user-facing instructions in this skill are written in Chinese, establishing a Chinese-only interaction pattern with no indication that users may choose another language. The policy specifically calls out language or locale constraints when they are forced without opt-in or clear justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file implements a general-purpose AI Hive client with text chat and image-generation functions, while the declared skill is narrowly scoped to Seedance short-drama video generation. This scope mismatch increases the attack surface and enables capability abuse outside the user’s expected permission boundary, including arbitrary text and image operations through the same configured API key.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level docstring describes a generic AI capability tool, conflicting with the specialized Seedance skill identity later in the file. This kind of deceptive or inconsistent packaging is dangerous because users and reviewers may believe they are granting access to a narrow video skill while the code actually supports a much broader API surface.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python skill embeds its top-level docstring and nearly all user-facing CLI messages in Chinese, establishing a fixed language expectation. The file does not offer any language selection or explain that the skill is intentionally region- or locale-specific, which conflicts with the policy against forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill exposes a user-info endpoint that returns account information and wallet balance, which is unrelated to generating short-drama videos. Unnecessary access to account metadata violates least privilege and may leak sensitive billing or identity details to users or downstream tooling that only expected content-generation behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill automatically downloads remote result URLs and writes them into a default local directory without an explicit confirmation step. In skill context this is more dangerous because generated tasks come from a remote service, so automatic file writes can surprise users, consume disk space, or store untrusted content locally without a deliberate opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The top-level docstring describes the module as a '通用 AI 能力调用工具' covering chat, image, video, model query, upload, and polling. But the actual entrypoint executed by this file is the specialized skill_main path with fixed SKILL_CONFIG for the Seedance short-drama studio image skill, so the documentation actively frames the file as a generic tool rather than the specific bounded skill it is acting as.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a creative production workflow for short-drama asset generation, pricing snapshots, uploads, polling, and downloads. A dedicated user-info endpoint used for querying user information and wallet balance is an account-management capability rather than a direct requirement of generating Seedance drama assets.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The models command allows enumeration of TEXT, IMAGE, and VIDEO models across the account, despite the skill being presented as Seedance-specific. While not directly code execution, this reveals broader backend capabilities and enables users to discover and potentially invoke models outside the intended workflow.

Content

No source excerpt is available for this finding.