Back to skill

Security audit

Seedance1.5 视频生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed AI video-generation tool, but its broad activation language and custom API endpoint handling create review-worthy risk around uploads, API key exposure, and paid remote tasks.

Review before installing. Use it only when you explicitly want AI Hive Seedance video generation/editing, confirm before uploading local media or submitting tasks that may consume quota, and avoid setting --base-url or AI_HIVE_BASE_URL to anything untrusted. Store the API key carefully and rotate it if it was ever used with an untrusted endpoint.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/videogen.py:91
Finding

API Credential Disclosure Through an Unrestricted Custom Base URL

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py:91-99, 130-143
Vulnerability Type: Unrestricted authenticated endpoint configuration
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 API base URL can be supplied through the --base-url argument, the AI_HIVE_BASE_URL environment variable, or the local configuration file. The application does not validate the URL scheme or restrict the destination hostname.

The HTTP client subsequently attaches the AI Hive bearer credential to every API request sent to the configured destination. Consequently, an attacker who can influence command-line arguments, environment variables, or ~/.ai-hive/config.json can redirect an authenticated request to an attacker-controlled server.

The absence of an HTTPS requirement also permits configuration of a plaintext HTTP endpoint, exposing the bearer token to network interception.

Attack Path

  1. The victim has a valid AI Hive API key configured through the environment, command line, or ~/.ai-hive/config.json.
  2. An attacker causes the base URL to resolve to an attacker-control ...[truncated 1092 chars]
Remediation
View remediation

Remediation Suggestions

  1. Default to an allowlist containing only the official API origin, such as https://ai-hive.iclip.cn/api.
  2. Parse custom URLs with a standard URL parser and reject malformed URLs, embedded credentials, fragments, and unsupported schemes.
  3. Require HTTPS for all authenticated requests. Permit plaintext HTTP only for an explicitly enabled local-development mode, and never send production credentials in that mode.
  4. If custom API hosts are a required feature, require an explicit opt-in and display the exact destination before transmitting credentials.
  5. Restrict custom destinations to approved hostnames or certificate identities rather than relying only on string-prefix checks.
  6. Avoid automatically attaching the AI Hive bearer token to arbitrary URLs. Build authenticated requests only for validated API origins.
  7. Protect the configuration file and its parent directory from unauthorized modification, and document that environment and command-line overrides affect where credentials are sent.
  8. Rotate any API key that may already have been used with an untrusted base URL, and review the associated account for unexpected usage.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing natural language entirely in Chinese across the substantive changelog entries. Under the policy, forcing a specific language without user opt-in or justification can be a natural-language policy violation, and this file does not state that the skill is intended only for a Chinese-language or region-specific audience.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares no explicit tool scope even though its documented behavior includes reading environment/config values, writing files, making network requests, and invoking shell commands. Without a least-privilege declaration, an agent may grant or infer broader capabilities than necessary, increasing the blast radius if the skill is triggered unexpectedly or the script behavior changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description contains extremely broad trigger terms covering many unrelated video tools, marketplaces, and generic marketing intents, which can cause the skill to activate for queries far outside its narrow operational purpose. Overbroad routing is dangerous because it can cause unnecessary API-key setup, uploads of local media, network access, and file writes in contexts where the user did not actually ask to run this skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README states the skill is appropriate whenever users seek alternatives, APIs, pricing, migration, or comparisons across a large set of competing products and companies, without clear decision boundaries. This broadens invocation beyond direct execution requests and may route exploratory or advisory conversations into a skill that performs uploads, remote API calls, and local persistence.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill extends activation to a very broad set of e-commerce platforms, seller roles, ad channels, and content-production intents, making it ambiguous whether the user wants operational video generation or merely platform-specific advice. In context, that ambiguity is risky because this skill can initiate media uploads, create remote tasks, and save outputs, so accidental invocation exposes user assets and may incur charges.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest positions this as a Seedance 1.5 video generation and editing skill, but the file contains a broader '通用 AI 能力调用工具' with text chat, image generation, model listing, and user-info retrieval capabilities. Those behaviors go beyond the stated video-focused purpose and are not necessary implementation details for this specific Seedance skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language descriptions and CLI guidance entirely in Chinese, beginning with the module docstring and continuing through user prompts. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale limitation is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description states the skill is suitable for '中文或英文用户,' but the surrounding guidance and primary description are written as Chinese-first targeting without clarifying user language selection behavior. This can be a locale/language policy concern because it suggests a default language assumption rather than explicit user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example API key placeholder uses Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration content. The file does not provide an alternative locale or indicate that the Chinese wording is intentional for a region-specific audience.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The top-level docstring describes the program as a generic AI Hive OpenAPI tool for text chat, image generation, video generation, model queries, media upload, and polling. In this packaged skill, the declared intent is a specialized Seedance 1.5 video generation/editing skill, so the documentation actively describes a different, broader intent than the actual skill packaging.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest describes automatic upload, task saving/progress query, and downloading as part of the video-generation workflow, but this code exposes separate task and upload commands as user-invokable standalone operations. That expands the behavior from workflow implementation detail to independent utility capability not clearly disclosed in the manifest.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.