Back to skill

Security audit

Lazada 电商视频生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

This Lazada video skill mostly matches its purpose, but it can send the user's AI Hive API key to any configured API endpoint, including plaintext HTTP, so users should review it before installing.

Install only if you trust AI Hive and this publisher with your product media and API key. Do not set --base-url, AI_HIVE_BASE_URL, or config base_url to an untrusted or http:// endpoint; use the official HTTPS endpoint unless you have isolated development credentials. Prefer installing dependencies in a virtual environment and consider pinning requests before use.

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:94
Finding

API Bearer Credential Can Be Transmitted to an Arbitrary or Plaintext Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py:94-101, 128-143
Vulnerability Type: Unrestricted credential destination and insecure transport configuration
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
        )

Technical Analysis

The API base URL may be supplied through the --base-url command-line argument, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. The implementation does not validate the URL scheme or restrict the destination hostname.

The HTTP client then unconditionally attaches the AI Hive bearer credential to every API request made through that base URL. Consequently, an attacker able to influence command-line arguments, environment variables, or ~/.ai-hive/config.json can redirect authenticated requests to an attacker-controlled server. An http:// endpoint can also expose the credential to network interception because transport encryption is not required.

Custom endpoints may be useful for development, but forwarding a production credential to an unrestricted endpoint ...[truncated 1279 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require https:// for all API base URLs and reject plaintext HTTP.
  2. Allowlist the official API hostname, ai-hive.iclip.cn, for normal operation.
  3. If custom endpoints are required for development, require an explicit unsafe-development flag and display a prominent warning before sending credentials.
  4. Do not attach the production bearer token when the destination origin differs from the trusted API origin.
  5. Parse URLs with urllib.parse.urlparse and validate the normalized scheme, hostname, and port rather than using string-prefix checks.
  6. Consider separating credentials by endpoint so development servers cannot receive production keys.
  7. Protect the environment and configuration file from untrusted modification and document that AI_HIVE_BASE_URL is security-sensitive.
  8. Revoke and rotate any API key that may already have been sent to an untrusted endpoint.

T08 · Insecure Dependencies

Note
Location
SKILL.md:69
Finding

Third-Party Dependency Is Installed Without Version or Integrity Pinning

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:69
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code

bash
pip3 install requests

Technical Analysis

The documented installation command retrieves the latest resolvable release of requests and its transitive dependencies from the user's configured Python package index. It does not specify audited versions, hashes, a lock file, or an isolated environment.

The package name is legitimate, and the audit found no evidence of typosquatting or a deliberately malicious package source. Nevertheless, the installation is not reproducible and relies on mutable package-index state. A future compromised release, compromised dependency, maliciously configured package index, or incompatible update could affect installation or runtime behavior.

Attack Path

  1. A user follows the runtime setup instructions in SKILL.md.
  2. pip3 resolves requests and its transitive dependencies from the currently configured package index.
  3. The selected package set differs from the versions reviewed with the Skill, or an attacker controls or compromises the configured index or a resolved package release.
  4. Malicious package installation behavior or imported Python code executes when installed or when videogen.py imports requests.

Exploitation depends on compromise or manipulation of the package supply chain; the repository itself does not contain evidence that such compromise has occurred.

Impact Assessment

If the resolved package or one of its dependencies is malicious, its code can execute with the privileges of the user running pip3 or the Skill. Depending on how installation is performed, this could permit access to user files, environment variables, the AI Hive API key, and outbound network connections.

System-wide impact would require the user to run package installation with elevated privileges; the documentation ...[truncated 34 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin requests and all transitive dependencies to reviewed versions.
  2. Supply a requirements or lock file containing cryptographic hashes, and install with hash verification:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Use a dedicated virtual environment rather than modifying the system Python environment.
  4. Document the trusted package index and avoid untrusted mirrors or additional indexes.
  5. Use automated dependency monitoring and periodically regenerate pins after security review.
  6. Avoid running dependency installation as root or with sudo.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill invokes shell commands, performs package installation, and references a Python script that likely uses filesystem, environment, and network capabilities, but the manifest does not declare any tool restrictions or allowed-tools scope. This creates an overbroad execution surface where an agent may grant more capabilities than are necessary, making misuse or unintended data access more likely if the script or its inputs are compromised.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description says 'Use this skill for' followed by a wide list of multilingual video-related phrases, but it does not define explicit trigger boundaries or exclusions. In a manifest file, this kind of broad activation wording can cause unintended invocation for generic ecommerce or video-editing requests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file presents itself as a generic AI utility supporting chat, image generation, model listing, account queries, uploads, and task polling, while the declared skill is narrowly scoped to Lazada video generation/editing. This scope mismatch increases attack surface and enables use of capabilities unrelated to the advertised purpose, violating least functionality and making abuse or accidental misuse more likely.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module documentation explicitly describes a generic AI/OpenAPI tool rather than a specialized Lazada video skill. Misleading metadata and documentation make it easier to smuggle broader capabilities into a narrowly approved skill, reducing review effectiveness and increasing the risk that operators enable functionality they did not intend to trust.

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’s natural-language description and all user-facing prompts/messages are written in Chinese, framing the tool as a general-purpose skill rather than a region-specific one. Under the policy, forcing a specific language without opt-in is a natural-language locale violation when no alternative or language choice is provided.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code includes a general-purpose text chat operation unrelated to the skill's stated Lazada video-editing purpose. In the context of an agent skill, hidden or extra capabilities can be invoked to send arbitrary prompts and media to external models, expanding exfiltration paths and defeating user expectations about what the skill can do.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Standalone image generation is outside the declared video-focused purpose and gives the skill broader model-execution capability than advertised. This unnecessary capability increases attack surface, may incur unintended cost, and could be abused by agents or users to process unrelated content through the same API credentials.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file presents all substantive changelog entries in Chinese, with no indication that the skill supports multiple languages or that Chinese is a required locale. Under the language/locale policy rule, natural-language content that effectively forces a specific language without user opt-in can be a 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 placeholder uses Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration content. There is no indication that the skill is region-specific or that users may choose another language, so this creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill exposes a user-info endpoint that retrieves account information and wallet balance, which is not needed for Lazada video creation. Even if the backend enforces authorization, surfacing unnecessary account features increases data exposure risk and broadens the consequences of misuse of the configured API key.

Content

No source excerpt is available for this finding.