Back to skill

Security audit

Seedance 2.5 视频生成

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed AI Hive video-generation helper, but it needs review because it can send the user's API key to an unvalidated custom API host and its activation scope is very broad.

Install only if you intend to use AI Hive for Seedance 2.5 generation and are comfortable storing an AI Hive API key locally. Do not set `--base-url`, `AI_HIVE_BASE_URL`, or config `base_url` to any non-official host unless you intentionally trust that host with the API key; prefer a virtual environment and pinned dependencies for installation.

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/videogen.py:92
Finding

API Credential Disclosure Through an Unvalidated Custom Base URL

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py, lines 92–100, 130–143, and 587
Vulnerability Type: Unvalidated credential destination
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
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("--base-url", help=f"API Base URL (default {DEFAULT_BASE_URL})")

Technical Analysis

The API destination can be supplied through the --base-url command-line argument, the AI_HIVE_BASE_URL environment variable, or the base_url field in ~/.ai-hive/config.json. The value is accepted without validating its scheme or hostname.

The client subsequently attaches the AI Hive bearer credential to every request made through _request(). Consequently, an attacker-controlled base URL receives the Authorization header. The implementation also permits plain HTTP destinations, which can expose the credential to network interception.

This is a destination-validation failure: a sensitive credential intended for AI Hive is not bound to an approved origin before transmission.

Attack Path

  1. An ...[truncated 1354 chars]
Remediation
View remediation

Remediation Suggestions

  1. Bind API credentials to the official origin by default:

    • Permit only https://ai-hive.iclip.cn/api.
    • Reject URLs with any other scheme, hostname, port, username, or password component.
  2. If custom deployments must be supported:

    • Require HTTPS.
    • Maintain an explicit hostname allowlist.
    • Require a separate credential for each custom origin.
    • Require interactive confirmation before transmitting an AI Hive credential to a non-default origin.
    • Clearly display the normalized destination hostname.
  3. Parse URLs with urllib.parse.urlparse() rather than relying on string concatenation.

  4. Reject malformed URLs, plain HTTP, embedded credentials, fragments, and unexpected ports.

  5. Avoid attaching the authorization header globally. Construct it only after confirming that the request destination matches the credential's approved origin.

  6. Add tests confirming that CLI, environment, and configuration-file overrides cannot route an AI Hive credential to an unapproved host.

  7. If a credential may already have been exposed, revoke it, issue a replacement, and review account usage for unauthorized generation tasks.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:169
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 169–176
Vulnerability Type: Unpinned dependency installation
Risk Level: Medium

Vulnerable Code

markdown
### 1. Install dependencies

```bash
pip3 install requests
text

### Technical Analysis

The installation instructions retrieve `requests` without a fixed version or integrity hash. The installed artifact and its transitive dependencies can therefore change over time without any modification to this project.

Although `requests` is a legitimate package, an unpinned installation is non-reproducible and relies entirely on the package index and the latest dependency resolution state. A compromised upstream release, package-index account, mirror, or transitive dependency could introduce malicious code. Unexpected compatibility or security regressions can also be incorporated automatically.

Imported Python package code executes in the user's Python process. It therefore receives the local permissions of the user running `videogen.py`.

### Attack Path

1. A user follows the documented command `pip3 install requests`.
2. `pip` resolves the latest available package and transitive dependency versions from its configured package index or mirror.
3. A compromised or unexpectedly unsafe release is selected because the project defines no reviewed version or cryptographic hash.
4. Package installation hooks, imported module code, or runtime dependency code executes with the user's privileges.
5. Malicious code could access environment variables, local files available to the user, or API credentials loaded by the Skill.

Exploitation depends on compromise or malicious modification of an upstream package, dependency, package index, or configured mirror; the audited repository does not itself contain such a payload.

### Impact Assessment

A compromised dependency would execute with the privileges of the user installing or running the Skill. Depend
...[truncated 579 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency file with exact versions, for example:

    text
    requests==REVIEWED_VERSION
    
  2. Generate and verify cryptographic hashes for the package and all transitive dependencies.

  3. Install dependencies with hash enforcement:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  4. Use a lock-file workflow so dependency resolution is reproducible across installations.

  5. Regularly review and update pinned versions in a controlled process rather than resolving the latest release during installation.

  6. Use a trusted package index or an internally controlled mirror with provenance and integrity controls.

  7. Recommend installation in a dedicated virtual environment and explicitly discourage running pip or the Skill with administrator privileges.

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file contains user-facing natural-language content entirely in Chinese, but does not indicate that the skill is region-specific or provide any opt-in or alternative language. Under the policy rule, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and documents capabilities that include reading environment variables, reading and writing files, making network requests, and invoking shell commands, but it does not declare any explicit tool scope or permission boundary. This creates a confused-deputy risk: an agent may invoke the skill with broader runtime privileges than users expect, enabling unintended access to API keys, local files, or external endpoints during media upload, task polling, and download flows.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description contains an extremely broad set of trigger terms spanning many generic video-generation, editing, advertising, and competitor-brand queries. Overbroad matching can cause unintended invocation for users who were merely researching alternatives or discussing unrelated tools, leading the agent to upload local media, initialize credentials, or make paid API calls without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The applicable-user section broadens activation further by listing expansive Chinese and English search phrases without boundaries, increasing the chance the skill is selected for loosely related discovery queries. In this skill's context, mistaken activation is more dangerous because the documented workflow includes credential setup, media upload, task submission, and result download, all of which have privacy or billing consequences.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file implements a broad generic AI Hive client with chat and image-generation commands even though the manifest presents this as a Seedance 2.5 video-generation skill. Extra capabilities increase the attack surface and can let callers invoke unintended paid or data-processing actions outside the declared scope, undermining least privilege and user expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains user-facing natural-language descriptions entirely in Chinese, including the module docstring and command help text, which effectively constrains the skill's interaction language. The policy allows locale constraints only when explicitly documented and justified or when users are offered a choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The instructions direct users to a specific Chinese AI Hive page and specify login via phone number and SMS verification, while much of the audience targeting is framed around Chinese or English users without offering a locale choice. This may impose a locale-specific workflow on all users rather than clearly documenting it as a region-specific prerequisite or opt-in constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The example API key placeholder uses Chinese text ("请替换为你的APIKey"), which imposes a specific language in a user-facing configuration artifact. There is no indication that the skill is region-specific or that users may choose another language, so this appears to violate the language/locale neutrality policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

Exposing user-info and wallet-balance queries exceeds the described video-generation workflow and gives the skill access to account metadata not necessary for its task. While not directly code-execution dangerous, unnecessary account introspection violates least-privilege design and could leak sensitive billing or identity information through logs or downstream consumers.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.