Back to skill

Security audit

AI大模型专家|Seedance 2.5 视频生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with AI-HIVE video generation, but it has a risky custom API endpoint override that can expose the user’s API key, plus an unpinned dependency install.

Install only if you trust the publisher and can review the configuration. Use the default AI-HIVE endpoint, avoid setting AI_HIVE_BASE_URL or --base-url unless you fully trust that server, and consider using a dedicated low-limit API key. Install dependencies in a virtual environment and verify generated tasks and media uploads before spending account balance.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:64
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:60-65, scripts/videogen.py:7, and scripts/videogen.py:18-22
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

SKILL.md:60-65:

bash
### 1. Install dependencies

```bash
pip3 install requests
text

`scripts/videogen.py:18-22`:

```python
try:
    import requests
except ImportError:
    print("Missing dependency: requests. Run pip3 install requests", file=sys.stderr)
    sys.exit(1)

Technical Analysis

The installation instructions retrieve requests from the user's currently configured Python package index without pinning a reviewed version or verifying an integrity hash. The package selected during installation can therefore change over time and may also depend on local pip configuration, index mirrors, proxy settings, or additional package sources.

This is a supply-chain weakness rather than evidence that the current requests package is malicious. Nevertheless, the installation command does not provide reproducibility or protection against a compromised package release, compromised index, or malicious mirror.

Attack Path

  1. An attacker compromises or controls a package source, mirror, proxy, or pip configuration used by the victim.
  2. The victim follows the documented pip3 install requests instruction.
  3. pip downloads an attacker-controlled or otherwise compromised package artifact.
  4. Package installation hooks or imported package code execute under the victim user's privileges.
  5. The malicious dependency can access files, environment variables, network resources, and API credentials available to the Skill process.

Impact Assessment

Successful exploitation can provide arbitrary code execution with the privileges of the user running pip or invoking the Skill. This may expose the AI-HIVE API key, submitted prompts, user-selected media, generated results, and ...[truncated 252 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency file containing an exact version and cryptographic hashes, for example:

    text
    requests==<reviewed-version> \
        --hash=sha256:<verified-distribution-hash>
    
  2. Install with hash enforcement:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Recommend installation inside a dedicated virtual environment rather than the system Python environment.

  4. Document an explicitly trusted package index and avoid untrusted extra indexes.

  5. Add automated dependency vulnerability and provenance scanning to the release process.

  6. Periodically update the pin only after reviewing the new release and refreshing its verified hashes.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/videogen.py:91
Finding

API Key Disclosure Through Unrestricted Base URL Override

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py:91-99, scripts/videogen.py:128-144, and scripts/videogen.py:587; related default configuration at resources/config.example.json:1-4
Vulnerability Type: Unvalidated credential-bearing endpoint override
Risk Level: High

Vulnerable Code

scripts/videogen.py:91-99:

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

scripts/videogen.py:128-144:

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
        )

scripts/videogen.py:587:

python
parser.add_argument("--base-url", help=f"API Base URL (default {DEFAULT_BASE_URL})")

Technical Analysis

The API origin can be replaced through the --base-url command-line argument, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. The replacement URL is accepted without an origin allowlist, HTTPS enforcement, hostname verification against the official service, or a warning that credentials will be disclosed to the selected destination.

AiHiveClient creates an Authorization: Bearer header containing the AI-HIVE API key and attaches it to every request made through `_r ...[truncated 2014 chars]

Remediation
View remediation

Remediation Suggestions

  1. Allowlist the production endpoint by default:

    python
    from urllib.parse import urlparse
    
    ALLOWED_API_ORIGINS = {"https://ai-hive.iclip.cn"}
    
    parsed = urlparse(candidate_url)
    origin = f"{parsed.scheme}://{parsed.netloc}"
    if parsed.scheme != "https" or origin not in ALLOWED_API_ORIGINS:
        raise SystemExit("Refusing to send an API key to an untrusted API origin")
    
  2. Remove --base-url and AI_HIVE_BASE_URL from the production Skill unless endpoint customization is required for its declared functionality.

  3. If custom endpoints are required for development, gate them behind an explicit option such as --allow-unsafe-custom-endpoint.

  4. Before using a non-default endpoint, print the normalized destination host and require interactive confirmation that the bearer credential will be sent there.

  5. Enforce HTTPS for every credential-bearing request and reject URLs containing user-information components, malformed hosts, or unexpected schemes.

  6. Store development credentials separately and never reuse production AI-HIVE credentials with test endpoints.

  7. Protect the configuration directory as well as the file, validate ownership where supported, and warn when configuration values originate from an unexpected source.

  8. Support narrowly scoped, revocable API keys and advise users to rotate a key immediately if it may have been sent to an untrusted endpoint.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents and encourages capabilities that include network access, shell execution, reading local files, writing local configuration, and accessing environment variables, yet it does not declare any explicit tool scope or permission boundaries. In a skill that handles API keys, uploads local media, and runs local scripts, this increases the risk of over-broad execution and unintended access to sensitive files, tokens, or arbitrary network destinations if the surrounding agent grants default tools.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest sets metadata.language: zh-CN, and the skill content is written as a general-purpose video generation/editing workflow rather than a clearly China-only or compliance-bound tool. Under the policy, forcing a specific language/locale without opt-in or explicit justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The display name, short description, and default prompt are written entirely in Chinese, which indicates a fixed language choice in the skill's user-facing metadata. There is no indication that users can choose another language or that this locale restriction is required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring and substantial code paths implement text chat, image generation, model listing, user-info lookup, generic media upload, and a standalone generic CLI, while the manifest presents this skill as specifically for Seedance 2.5 video generation/editing workflows. Those extra capabilities are not merely hidden helpers for video generation; they expose materially broader AI-HIVE operations than the skill claims.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file’s user-facing docstrings, prompts, status messages, and setup instructions are written in Chinese, including the interactive CLI flow and help text. Because the skill does not offer an opt-in language selection or state that it is intentionally region/language-specific, this creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The example API key value uses Chinese-only placeholder text ("请替换为你的APIKey"), which imposes a specific language in a user-facing configuration artifact. The file does not offer a language choice or document why a Chinese-only locale is required, which conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest focuses on converting scripts and media into deliverable videos with generation, editing, extension, upload, polling, pricing snapshot use, and download. Separate commands for querying user wallet/account info and enumerating all available models broaden the behavior into account inspection and general model discovery, which are outside that stated workflow description.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

Opening a local browser is an extra local-system capability distinct from video generation/editing itself. While initialization may be convenient, the manifest describes AI-HIVE-backed generation/editing workflows, not browser automation or local UI launching.

Content

No source excerpt is available for this finding.