Back to skill

Security audit

包装Logo与文字准确性检查|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Review item because it presents as a packaging/logo/text checker but ships broad AI-HIVE generation, upload, download, and video-editing tools with weak API-key endpoint scoping.

Install only if you intend to use a broad AI-HIVE media-generation helper, not just a passive package checker. Use a low-privilege AI-HIVE key, avoid setting AI_HIVE_BASE_URL or --base-url to anything other than the official endpoint, confirm every billable generation before running it, and upload only media you are authorized to send to the service.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:92
Finding

API Key Disclosure Through a Caller-Controlled Base URL in the Image Generation Client

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:92-99, scripts/imagegen.py:125-143
Vulnerability Type: Arbitrary credential destination
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
class AiHiveClient:
    """Encapsulates AI Hive OpenAPI HTTP calls."""

    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 client loads an AI-HIVE API key from a command-line argument, environment variable, or persistent configuration file. Independently, it accepts the API base URL from --base-url, AI_HIVE_BASE_URL, or the same configuration file without validating the URL scheme or destination hostname.

AiHiveClient subsequently attaches the bearer token to every request sent to the configured base URL. Consequently, an attacker who can influence the process environment, generated command line, or ~/.ai-hive/config.json can redirect authenticated requests to a server under their control. The implementation does not require HTTPS and does not restrict credential transmission to the intend ...[truncated 1032 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict the Skill-specific client to the documented https://ai-hive.iclip.cn/api endpoint.
  2. If custom endpoints are a legitimate requirement, normalize the URL and enforce an explicit allowlist of trusted HTTPS hostnames.
  3. Reject plaintext HTTP and URLs containing unexpected credentials, ports, schemes, or hostnames.
  4. Require an explicit interactive warning and confirmation before transmitting a credential to any non-default endpoint.
  5. Separate endpoint configuration from credential selection so a production AI-HIVE key cannot automatically be attached to an arbitrary host.
  6. Disable authorization forwarding across redirects, or reject cross-origin redirects before following them.
  7. Add tests verifying that malicious environment values and command-line URLs cannot receive the authorization header.
  8. Advise users to rotate their API key if it may already have been used with an untrusted base URL.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/videogen.py:92
Finding

API Key Disclosure Through a Caller-Controlled Base URL in the Video Generation Client

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py:92-100, scripts/videogen.py:125-143
Vulnerability Type: Arbitrary credential destination
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
class AiHiveClient:
    """Encapsulates AI Hive OpenAPI HTTP calls."""

    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 video generation client duplicates the unrestricted endpoint-selection behavior of the image generation client. A command-line argument, environment variable, or configuration-file value can replace the intended API origin. The bearer token is then attached to requests sent to that origin.

No HTTPS requirement or trusted-host allowlist is applied. The configurable destination is therefore an exploitable credential sink whenever an attacker can influence process configuration or persuade a user to execute a command containing a malicious base URL.

Attack Path

  1. The victim configures a valid AI-HIVE API key.
  2. An attacker sets or influences AI_HIVE_BASE_URL, `-- ...[truncated 740 chars]
Remediation
View remediation

Remediation Suggestions

  1. Hard-code or allowlist the official AI-HIVE HTTPS endpoint in the Skill-facing client.
  2. Validate the normalized URL scheme and hostname before constructing an authenticated request.
  3. Never send the API key over plaintext HTTP.
  4. Do not forward authorization headers across redirects to a different origin.
  5. If development endpoints must remain supported, use separate credentials and require explicit opt-in confirmation.
  6. Treat environment and configuration-file endpoint values as untrusted input.
  7. Add regression tests for malicious hosts, Unicode hostname confusion, unexpected ports, and cross-origin redirects.
  8. Rotate any key that may have been transmitted to an untrusted endpoint.

T08 · Insecure Dependencies

Note
Location
scripts/imagegen.py:7
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:7,17-22; scripts/videogen.py:7,17-22; SKILL.md:67
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code

scripts/imagegen.py and scripts/videogen.py contain the following installation guidance:

python
"""AI Hive OpenAPI Skill — general AI capability invocation tool.

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

SKILL.md also states that the scripts require requests, but the project supplies no pinned requirements file, lockfile, or package hash.

Technical Analysis

The package name is not misspelled, and the audited project does not configure a suspicious package index. However, the documented installation command resolves a mutable package version from whichever Python package index is configured in the user's environment.

This makes installation non-reproducible and prevents the audited source from defining the exact dependency artifact that will execute. A future compromised release, an attacker-controlled package index, or an incompatible dependency update could therefore introduce behavior that was not part of this audit.

Attack Path

  1. The requests package is absent from the user's environment.
  2. The script instructs the user to run pip3 install requests.
  3. Pip resolves an unspecified version from the environment's configured package index.
  4. A compromised index, compromised future release, or altered package source supplies an unsafe artifact.
  5. Package installation or subsequent import executes the unsafe dependency with the user's privileges.

Impact Assessment

If the dependency source or resolved release is compromised, malicious package code could execute with the privileges of ...[truncated 314 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a version-pinned dependency file, such as requirements.txt, generated from a reviewed release.
  2. Use hash verification, for example pip's --require-hashes, to bind installation to approved artifacts.
  3. Install dependencies in an isolated virtual environment rather than the system Python environment.
  4. Document the expected trusted package index and avoid untrusted extra indexes.
  5. Add automated dependency vulnerability and integrity scanning.
  6. Review and deliberately update dependency pins on a controlled schedule.
  7. Keep the dependency declaration synchronized between both scripts and SKILL.md.
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 (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This skill’s declared purpose is narrow product/package inspection, but the described command surface appears to prioritize generic video generation, upload, task management, and downloading instead of the stated compliance-style checks. In security terms, that is a deceptive or at least materially misleading trust boundary: a user may invoke it expecting analysis, while the skill can initiate costly or sensitive external workflows that do not deliver the promised validation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This skill’s declared purpose is narrow product/package inspection, but the described command surface appears to prioritize generic video generation, upload, task management, and downloading instead of the stated compliance-style checks. In security terms, that is a deceptive or at least materially misleading trust boundary: a user may invoke it expecting analysis, while the skill can initiate costly or sensitive external workflows that do not deliver the promised validation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This skill’s declared purpose is narrow product/package inspection, but the described command surface appears to prioritize generic video generation, upload, task management, and downloading instead of the stated compliance-style checks. In security terms, that is a deceptive or at least materially misleading trust boundary: a user may invoke it expecting analysis, while the skill can initiate costly or sensitive external workflows that do not deliver the promised validation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This skill’s declared purpose is narrow product/package inspection, but the described command surface appears to prioritize generic video generation, upload, task management, and downloading instead of the stated compliance-style checks. In security terms, that is a deceptive or at least materially misleading trust boundary: a user may invoke it expecting analysis, while the skill can initiate costly or sensitive external workflows that do not deliver the promised validation.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 81)May include surrounding context.

md
python3 scripts/imagegen.py init --skill-name packaging-logo-text-check-ai-hive

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 83)May include surrounding context.

md
python3 scripts/imagegen.py init --skill-name packaging-logo-text-check-ai-hive

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 93)May include surrounding context.

md
python3 scripts/videogen.py init --skill-name packaging-logo-text-check-ai-hive

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 95)May include surrounding context.

md
python3 scripts/videogen.py init --skill-name packaging-logo-text-check-ai-hive

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements a general-purpose local video editing wrapper, which is materially outside the stated packaging/logo/text-checking purpose of the skill. Capability mismatch is dangerous because it expands what the skill can do on the host, increasing the chance of unauthorized media manipulation or abuse of local tooling under a misleading skill identity.

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 broad AI client with chat, image generation, video generation, model enumeration, media upload, and task polling, while the declared skill is narrowly scoped to packaging/logo/text accuracy checking. This over-broad capability materially increases misuse risk because a caller can invoke unrelated generative functions not justified by the skill’s stated purpose, undermining least-privilege and scope confinement.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The implemented skill materially differs from the declared packaging/logo/text accuracy checking purpose: it exposes broad AI Hive chat, image, and video generation plus media upload/download workflows without any inspection-specific controls. This scope mismatch is dangerous because a caller expecting a constrained quality-checking tool instead receives a general content-generation utility that can be repurposed for unrelated or deceptive content workflows, increasing the chance of policy bypass and unauthorized capability exposure.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documents code paths that rely on environment variables, local file access, shell execution, and network access, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, this increases the risk of overbroad capability use, accidental secret exposure, or unintended file/network operations because reviewers and policy layers cannot easily constrain what the skill may do.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger conditions and positioning broaden the skill from packaging accuracy checking into general ecommerce/marketing content creation. That scope creep makes the skill more dangerous because it encourages use in higher-risk persuasive-media workflows while retaining the trust framing of a QA/checking tool.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger condition is broad enough to catch generic ecommerce, advertising, and marketing delivery scenarios, not just packaging/logo/text verification. Overbroad routing can cause the agent to select a skill with networked generation/editing capabilities in situations where a narrower, safer tool should have been used.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code examples actively instruct users to submit image and video generation jobs, which materially exceeds a read-only or analysis-oriented packaging-checking function. This is risky because examples often define real operator behavior, and here they normalize sending prompts/assets to external services and initiating potentially billable tasks under a misleading skill identity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language prompt explicitly instructs the skill to produce a "production-ready Chinese workflow," which imposes a specific language choice by default. This is a locale/language policy concern because the file does not offer the user an option to choose another language or indicate that Chinese is only used with consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill exposes broad subprocess-driven ffmpeg functionality for trimming, aspect conversion, muting, normalization, probing, and concatenation, none of which are justified by the packaging inspection use case. In this context, the extra capability enlarges the attack surface and enables local media transformation that could be repurposed for unintended or policy-evasive workflows.

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:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file-level docstring presents the skill description entirely in Chinese, and the rest of the CLI's user-facing guidance follows the same fixed locale. This can violate a language/locale policy when users are not given any opt-in or alternative language path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script's runtime messages, errors, prompts, and status text are written in Chinese throughout the file, indicating a fixed-language interaction model. There is no visible mechanism for users to select another language or opt into Chinese output.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Querying user information and wallet balance is unrelated to packaging/logo/text inspection and grants access to account metadata that is unnecessary for the skill’s function. Even if intended for diagnostics, exposing this operation expands the attack surface and can leak sensitive billing or identity details to unauthorized users or downstream tooling.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Providing standalone upload and task-query utilities exposes broader platform primitives than the skill’s declared packaging-check purpose and can be repurposed to stage arbitrary content or retrieve unrelated generation outputs. In context, these helpers make the skill more like a generic platform client than a constrained packaging-review tool, weakening intended safety boundaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module documentation and CLI framing explicitly describe a general AI tool and video skill, contradicting the manifest's specialized packaging/logo/text checking purpose. Misleading documentation is security-relevant here because reviewers, orchestrators, or users may grant or invoke the skill under false assumptions about its behavior and risk profile.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and user-facing descriptions are entirely in Chinese, presenting the skill as a general-purpose tool rather than a region-specific or Chinese-only skill. Because there is no opt-in or documented locale constraint, this creates a natural-language locale policy issue for users who may expect language choice.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

A generic text chat endpoint is unnecessary for a packaging/logo/text accuracy checking skill and expands the attack surface beyond the advertised function. In this context, unrestricted chat can be used to generate arbitrary instructions or content unrelated to packaging review, undermining least-privilege expectations for the skill.

Content

No source excerpt is available for this finding.