Back to skill

Security audit

商品真实性守门员|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill is presented as a product-authenticity reviewer, but its shipped tools mostly generate, upload, edit, and download media using an AI-HIVE API key, so it needs careful review before installation.

Install only if you intend to use AI-HIVE for commercial media generation as well as review planning. Treat it as a billable media-generation client, not just an authenticity checker; use a limited API key, keep the default HTTPS AI-HIVE endpoint, avoid custom base URLs, review files before uploading them, and confirm generation parameters before running jobs.

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

Warning
Location
scripts/imagegen.py:91
Finding

Bearer Credential Disclosure Through a Configurable API Endpoint

Content
View full analysis

Vulnerability Details

File Locations:

  • scripts/imagegen.py:91-98
  • scripts/imagegen.py:128-143
  • scripts/imagegen.py:583-588
  • scripts/videogen.py:91-98
  • scripts/videogen.py:128-143
  • scripts/videogen.py:583-588

Vulnerability Type: Unrestricted credential-bearing endpoint configuration
Risk Level: Medium

Evidence

The endpoint can be supplied through a command-line option, environment variable, or configuration file:

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

The API key is then attached to every request sent through the configured 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
        )

The command-line interface explicitly permits an arbitrary base URL:

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")

The same implementation is present in both generation scripts.

Technical Analysis

The scripts do not validate the scheme or hostname of the configured API endpoint before attaching the bearer credential. Consequently, a va ...[truncated 2092 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict the default client to an explicit allowlist of trusted HTTPS hosts, such as ai-hive.iclip.cn.
  2. Reject non-HTTPS URLs before constructing the client.
  3. Parse the URL with urllib.parse.urlsplit and validate the normalized hostname rather than using string-prefix checks.
  4. Do not send the production AI-HIVE credential to custom endpoints. Require a separate credential when custom endpoint support is necessary.
  5. Require an explicit high-visibility confirmation before using a non-default endpoint, displaying the exact hostname that will receive the credential.
  6. Ignore AI_HIVE_BASE_URL in privileged, automated, or billing-sensitive execution contexts unless custom endpoints are explicitly enabled.
  7. Protect ~/.ai-hive/config.json against replacement and symlink attacks before reading it; verify ownership and regular-file status where supported.
  8. Add tests confirming that HTTP URLs, deceptive subdomains, user-information URL components, and unapproved hosts are rejected.
  9. Document immediate API-key revocation and rotation procedures for suspected exposure.

T08 · Insecure Dependencies

Note
Location
SKILL.md:67
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Locations:

  • SKILL.md:67
  • scripts/imagegen.py:9-13
  • scripts/videogen.py:9-13

Vulnerability Type: Unpinned runtime dependency
Risk Level: Low

Evidence

The documentation identifies requests as a required dependency but does not provide a version constraint, lock file, or integrity hash:

text
The scripts use https://ai-hive.iclip.cn/api by default; requests is required, and local video processing requires ffmpeg.

The generation scripts import the dependency and direct users to install it without a pinned version:

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

No dependency manifest or lock file appears in the audited directory structure.

Technical Analysis

Installing a package without a pinned, reviewed version delegates dependency selection to the user's active package index and resolver configuration. Although requests is a legitimate and correctly spelled package, the project does not constrain the selected release or verify package integrity.

The risk is greater in environments with an untrusted package mirror, compromised index configuration, dependency substitution, or future incompatible releases. Python packages may execute code during installation and are subsequently imported with the privileges of the user running the Skill.

This finding is a supply-chain hardening issue rather than evidence that the current requests package is malicious.

Attack Path

  1. The user runs the Skill and encounters the missing-dependency message or follows the installation instructions.
  2. The user executes an unconstrained installation command for requests.
  3. The package manager resolves the dependency through the user's configured package index or mirror.
  4. A compromised index, mirror, account, or resolver configuration supplies an unauthorized or unsafe distribution.
  5. Pa ...[truncated 898 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency manifest with a constrained requests version.
  2. For reproducible deployment, provide a lock file containing cryptographic hashes for all direct and transitive dependencies.
  3. Recommend installation inside a dedicated virtual environment rather than the system Python environment.
  4. Document the expected trusted package index and warn against unknown mirrors.
  5. Use hash-verified installation, such as pip install --require-hashes -r requirements.txt, where practical.
  6. Add automated dependency scanning and update review to detect known vulnerabilities.
  7. Review and test dependency upgrades before changing the pinned version.
  8. Document a minimum supported ffmpeg version and trusted installation source for the external binary dependency as well.
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 (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding indicates undeclared generic chat, video-generation, model-discovery, and account/wallet-related capabilities alongside the absence of the promised authenticity-analysis logic. Undeclared capability expansion is dangerous because users may grant trust based on a narrow review use case while the skill can access broader functions unrelated to that purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The finding indicates undeclared generic chat, video-generation, model-discovery, and account/wallet-related capabilities alongside the absence of the promised authenticity-analysis logic. Undeclared capability expansion is dangerous because users may grant trust based on a narrow review use case while the skill can access broader functions unrelated to that purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding indicates undeclared generic chat, video-generation, model-discovery, and account/wallet-related capabilities alongside the absence of the promised authenticity-analysis logic. Undeclared capability expansion is dangerous because users may grant trust based on a narrow review use case while the skill can access broader functions unrelated to that purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding indicates undeclared generic chat, video-generation, model-discovery, and account/wallet-related capabilities alongside the absence of the promised authenticity-analysis logic. Undeclared capability expansion is dangerous because users may grant trust based on a narrow review use case while the skill can access broader functions unrelated to that purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file provides generic video-editing operations such as trim, aspect conversion, muting, loudness normalization, and concatenation, which do not align with a product-authenticity guard skill whose purpose is to detect discrepancies and false claims. In this context, content-manipulation primitives materially increase the chance the skill can be repurposed to alter marketing evidence or generate misleading product media, undermining the stated trust-and-audit function.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file is presented as a narrowly scoped 商品真实性/审核 skill, but it actually embeds a broad AI Hive client exposing chat, image generation, video generation, model enumeration, account queries, upload, and task polling. This capability mismatch violates least privilege and can let users or downstream agents invoke unrelated high-risk functions under the guise of a trusted authenticity-review tool.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file advertises and implements a generic AI-Hive client with broad chat, image, and video generation capabilities, while the declared skill purpose is product-authenticity guarding. This capability mismatch is dangerous because it enables content generation workflows that can be used to create marketing or deceptive media under the cover of a trust/safety skill, weakening policy boundaries and operator expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill-specific entrypoint routes users into video generation for commercial content instead of performing authenticity checks or producing discrepancy findings. In the context of a product-authenticity guard, this is especially risky because it can facilitate the creation of persuasive commerce assets that may misrepresent products, directly conflicting with the stated safety purpose.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises runnable commands that use environment variables, local files, network access, and shell execution, but it does not declare any tool scope or permission boundaries. This weakens least-privilege controls and can let an agent invoke broader capabilities than a reviewer or user would expect, especially around API-key handling, file access, and external requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The activation criteria are broad enough to match ordinary content-production or adaptation requests, not just authenticity-review tasks. Overbroad triggering can route unrelated user work into a skill with media-generation and external API patterns, increasing the chance of unnecessary data exposure, unintended charges, or policy-bypass through misclassification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The default prompt explicitly requires a "production-ready Chinese workflow," which imposes a language choice regardless of user preference. This is a natural-language policy concern because it forces a specific language without offering opt-in or an alternative locale.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest enables implicit invocation, allowing the skill to activate without an explicit user request or tightly scoped trigger conditions. In a skill that can generate production-ready workflows and runnable AI-HIVE commands for commerce content, this increases the chance of unintentional activation, overreach into adjacent tasks, or execution planning in contexts where the user did not intend product-authenticity analysis.

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:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The concat branch and other editing commands expose a broad content-manipulation capability that is unnecessary for verifying product authenticity. In a skill meant to serve as a guardrail for e-commerce and advertising claims, such features lower the barrier to assembling or polishing deceptive media while appearing to come from a compliance-oriented tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains user-facing natural-language strings entirely in Chinese, beginning with the module docstring and continuing throughout prompts and status messages. Because the skill does not offer language selection or justify a China/Chinese-only locale constraint, it violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill can call user-info and expose account profile and wallet/balance data even though that is unrelated to product authenticity checking. In an agent ecosystem, unnecessary access to billing/account metadata increases privacy exposure and can aid reconnaissance about the user's account state or available spend.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

Standalone upload and task-query operations expose reusable infrastructure for arbitrary media hosting and job management beyond the declared authenticity-guard purpose. That broadens the skill into a generic asset pipeline, enabling misuse for unrelated or policy-violating generation workflows while benefiting from the trust users place in the narrower advertised role.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module and parser describe the tool as a generic AI capability client, contradicting the safety-oriented identity of the skill. This documentation/identity mismatch can mislead operators, audits, and downstream automation about what the skill actually does, increasing the chance that broad generation features are deployed in a trusted review context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Natural-language strings that describe usage, prompts, and help throughout the file are written exclusively in Chinese, with no language-selection mechanism or indication that the skill is region-specific. Under the stated policy, forcing a specific language without offering user choice is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Exposing unrestricted text chat in a skill intended for product-authenticity guarding expands the tool beyond its stated trust-and-safety scope without clear necessity. That broader interface can be repurposed for unrelated or abusive content generation/planning, and the mismatch is more dangerous here because users and reviewers may assume the skill is safety-constrained when it is not.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file presents all user-facing instructions, triggers, workflow, and output requirements exclusively in Chinese, and does not state that the skill is intentionally limited to Chinese-speaking users or a China-specific compliance context. Under the policy, forcing a specific language without user opt-in can be a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The file hard-codes the skill name and user-facing description in Chinese in both the module docstring and argparse description. This can be a natural-language policy concern if users are not given any option to select or opt into another language or locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

This code creates the output directory and writes downloaded result files to the local filesystem automatically after task completion. Although this is part of the skill's functionality, there is no explicit docstring/comment/help text warning at the write point that files will be saved under the configured output directory unless --no-download is used.

Content

No source excerpt is available for this finding.