Back to skill

Security audit

数字人持物展示视频|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its AI-HIVE product-video purpose, but it has a real credential-routing risk that should be reviewed before installation.

Install only if you intend to use AI-HIVE for this video workflow. Treat your AI-HIVE API key like a password, avoid --api-key on shared machines, and do not use --base-url, AI_HIVE_BASE_URL, or a modified config file unless you fully trust the endpoint. Review generated commands before running anything that uploads media or may incur charges.

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

Unrestricted API endpoint override can disclose the AI-HIVE bearer credential

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py, lines 93–104, 128–134, and 488–491
Vulnerability Type: Unvalidated credential-bearing 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",
    }
python
def add_common_args(parser):
    parser.add_argument("--api-key", help="AI Hive API Key (sk-api-*)")
    parser.add_argument("--base-url", help=f"API Base URL (default {DEFAULT_BASE_URL})")
    parser.add_argument("--verbose", action="store_true", help="Verbose logging")

Technical Analysis

The client permits its API base URL to be supplied through a command-line argument, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. No validation requires HTTPS or restricts the destination to an approved AI-HIVE hostname.

Every API request generated from this base URL carries the user's bearer credential in the Authorization header. Consequently, configuration of an attacker-controlled endpoint causes the legitimate client to disclose the API key. Allowing an arbitrary endpoint is not necessary for the Skill's declared fixed-purpose integration with https://ai-hive.iclip.cn/api and therefore exceeds least-privilege requirements.

The command-line API-key option further makes it possible for a maliciously supplied command to combine a user credential wit ...[truncated 1961 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the runtime base-URL override when custom deployments are not required, and always use the fixed DEFAULT_BASE_URL.
  2. If custom endpoints are a legitimate requirement, parse the URL and require:
    • The https scheme.
    • An explicit allowlist of trusted hostnames.
    • The expected API path.
    • No embedded username or password.
  3. Never attach the bearer credential until the final request destination has passed validation.
  4. Require an explicit security confirmation before sending credentials to any non-default endpoint. Clearly display the destination hostname without displaying the API key.
  5. Reject plaintext HTTP endpoints to prevent credential interception in transit.
  6. Prefer environment variables or a permission-restricted credential file over --api-key, and consider removing the command-line secret option.
  7. Add tests confirming that attacker-controlled hosts, plaintext URLs, malformed URLs, and unapproved ports are rejected.
  8. Document credential revocation and rotation procedures in case a key has already been sent to an untrusted endpoint.
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 (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This mismatch is more security-relevant because the skill is framed as a narrowly scoped product-video workflow while the finding indicates broader reusable API client capabilities such as general chat, image generation, account information retrieval, model discovery, and generic uploads. In an agent setting, undeclared broad capabilities can bypass user expectations and policy review, leading to over-privileged actions, unnecessary data exposure, or billable operations outside the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This mismatch is more security-relevant because the skill is framed as a narrowly scoped product-video workflow while the finding indicates broader reusable API client capabilities such as general chat, image generation, account information retrieval, model discovery, and generic uploads. In an agent setting, undeclared broad capabilities can bypass user expectations and policy review, leading to over-privileged actions, unnecessary data exposure, or billable operations outside the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

This mismatch is more security-relevant because the skill is framed as a narrowly scoped product-video workflow while the finding indicates broader reusable API client capabilities such as general chat, image generation, account information retrieval, model discovery, and generic uploads. In an agent setting, undeclared broad capabilities can bypass user expectations and policy review, leading to over-privileged actions, unnecessary data exposure, or billable operations outside the stated purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a skill for creating digital-human product showcase videos, including reference upload, pricing snapshot selection, polling, and downloads for that workflow. This file also implements standalone text chat and image generation commands, which are independent end-user capabilities and not necessary for the declared purpose of producing avatar holding-product videos.

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 includes example commands that rely on sensitive capabilities such as network access, shell execution, filesystem access, and environment variables, but it does not declare any tool scope or permission boundaries. In an agent environment, this increases the chance that the skill can be invoked with broader-than-expected privileges, enabling unintended API calls, local file access, or secret exposure if the runtime grants ambient authority.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The default prompt hardwires invocation of this skill for any request to make something 'production-ready' and generate runnable AI-HIVE commands. That phrase is broad enough to match common workflow/code-generation requests beyond the narrow intended use of avatar product videos, which can cause unintended skill activation and steer users into external API usage, uploads, and generated outputs they did not explicitly request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The default prompt mandates a 'production-ready Chinese workflow' regardless of the user's language preference. Forcing output language without opt-in can mislead users, reduce comprehension of workflow details, and increase the chance they approve commands, pricing, or generated content they do not fully understand.

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

The top-level module docstring describes a broad '通用 AI 能力调用工具' covering text chat, image generation, video generation, model queries, uploads, and polling. However, the manifest for this skill is narrowly scoped to authorized digital-human holding-product showcase videos, and the file actually exposes generic chat, image, account-info, and model-listing functionality beyond that stated skill purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest focuses on producing compliant product showcase videos from authorized references and AI-HIVE generation APIs. Fetching user profile information and wallet balance is an account-management capability rather than a direct requirement of the video-creation workflow described for this 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 a user-facing CLI help string that says the video description is "中英文均可", which explicitly limits accepted languages to Chinese and English. Under the policy, forcing a specific language or locale without opt-in or documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code hard-codes Chinese-language skill descriptions and search aliases in user-facing strings, including the module docstring, argparse description, skill name, and aliases. Under the stated policy, forcing a specific language or locale without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest says the skill should use AI-HIVE for configuration queries needed to complete the declared video task, but this file exposes a general-purpose model listing interface covering TEXT, IMAGE, and VIDEO models. That broader discovery capability is not clearly justified for a skill that should operate within a fixed digital-human product-video use case and preconfigured model set.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill-specific parser inherits a user-controlled --base-url and passes it into the HTTP client, allowing API requests bearing the Authorization header to be redirected to an arbitrary host. If a user is tricked into using a malicious base URL, their AI Hive API key can be exposed to an attacker-controlled endpoint, which is especially relevant because this skill handles credential initialization and authenticated media operations.

Content

No source excerpt is available for this finding.