Back to skill

Security audit

AI大模型专家|ChatGPT Claude Gemini AI搜索引用

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its AI-HIVE media workflow purpose, but it needs Review because its scripts store and use API credentials and can send them to a user-configured API endpoint without validating the destination.

Install only if you intend to use AI-HIVE and are comfortable providing an API key for media generation. Prefer an environment variable or a carefully protected config file, do not set `AI_HIVE_BASE_URL` or `base_url` to anything except the official AI-HIVE endpoint unless you fully trust that server, and review commands before allowing uploads, billable generation tasks, or downloads.

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

API Credentials Can Be Redirected to an Arbitrary Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/imagegen.py:91-100, 126-144; duplicated in scripts/videogen.py:91-100, 126-144
Vulnerability Type: Unrestricted API endpoint override leading to credential disclosure
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

Both generation clients allow the API base URL to be supplied through a command-line argument, the AI_HIVE_BASE_URL environment variable, or the persistent configuration file. The value is accepted without requiring HTTPS or validating that the destination belongs to the declared AI-HIVE service.

The clients then attach the AI-HIVE bearer credential to every API request made through _request. Consequently, changing the base URL redirects authenticated requests, including the Authorization header, to an arbitrary server. An http:// endpoint is also accepted, allowing credentials and request ...[truncated 1367 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove custom base-URL support from these specialized Skill clients if it is not operationally required.
  2. Allowlist the exact expected origin, such as https://ai-hive.iclip.cn, and reject all other hosts.
  3. Require the https scheme and reject URLs containing user information, unexpected ports, fragments, or ambiguous hostnames.
  4. Apply authorization headers only after confirming that the final request origin matches the approved API origin.
  5. Disable automatic cross-origin redirects for authenticated requests, or validate every redirect target before following it.
  6. If custom endpoints are a required advanced feature, require explicit user confirmation and separate endpoint-specific credentials rather than reusing the AI-HIVE key.
  7. Apply the same correction to both scripts/imagegen.py and scripts/videogen.py.

T08 · Insecure Dependencies

Note
Location
SKILL.md:124
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis

Vulnerability Details

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

Vulnerable Code

bash
pip3 install requests

Technical Analysis

The setup instructions install the requests package from the user's active Python package index without specifying a reviewed version or cryptographic hash. Although requests is a legitimate package and the audit found no evidence of typosquatting, the installed artifact is determined by repository state and local pip configuration at installation time.

This weakens build reproducibility and supply-chain integrity. A compromised package release, package repository, mirror, or locally configured index could cause users to install code different from the version reviewed by the Skill author.

Attack Path

  1. A user follows the documented first-time setup command.
  2. pip resolves requests using the environment's configured package indexes and current repository state.
  3. A compromised index, mirror, account, or substituted distribution supplies an unintended package artifact.
  4. The malicious package executes code during installation or when the generation scripts import requests.
  5. That code runs with the privileges of the user invoking pip or the Skill.

Impact Assessment

Exploitation could allow arbitrary code execution with the privileges of the user performing installation or running the scripts. Potential consequences include access to local files available to that user, theft of environment variables and API credentials, modification of user-owned files, and unauthorized network activity.

The practical likelihood is reduced because the referenced package name is legitimate and no malicious package is bundled with the project. The risk arises from the absence of version and integrity controls.

Remediation
View remediation

Remediation Suggestions

  1. Declare dependencies in a reviewed requirements or lock file.
  2. Pin requests and its transitive dependencies to tested versions.
  3. Include cryptographic hashes and install with pip install --require-hashes -r requirements.txt.
  4. Document the trusted package index and consider explicitly specifying it in controlled deployment environments.
  5. Use an isolated virtual environment rather than installing into a shared or privileged Python environment.
  6. Add an automated dependency update and vulnerability-review process so pinned versions remain supported and secure.
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 (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the skill can retrieve user account information or wallet balance and store credentials locally while presenting itself mainly as a strategy/search expert, that creates a meaningful transparency and privacy problem. Users may expose credentials or permit account-linked actions without realizing the skill includes financial/account-inspection and persistent local-state behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the skill can retrieve user account information or wallet balance and store credentials locally while presenting itself mainly as a strategy/search expert, that creates a meaningful transparency and privacy problem. Users may expose credentials or permit account-linked actions without realizing the skill includes financial/account-inspection and persistent local-state behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the skill can retrieve user account information or wallet balance and store credentials locally while presenting itself mainly as a strategy/search expert, that creates a meaningful transparency and privacy problem. Users may expose credentials or permit account-linked actions without realizing the skill includes financial/account-inspection and persistent local-state behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises executable scripts and operational capabilities involving shell commands, environment variables, local files, and networked API access, yet it does not declare any explicit tool scope or permission boundaries. This can cause the host agent to over-grant capabilities or leave reviewers and users unaware that the skill may access sensitive local state and remote services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest metadata sets the language to zh-CN, and the skill content and display name are fully Chinese, but the file does not indicate that language is optional or user-selectable. This can amount to a language policy violation if the skill forces a specific locale without opt-in or documented regional scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation scope is very broad and keyed to generic search and content terms, which can cause the skill to trigger in contexts beyond the user's intent. Overbroad triggering is risky because it may route unrelated conversations into a skill that encourages script execution, external API usage, or media-generation workflows unnecessarily.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The display name, short description, and default prompt are entirely in Chinese, which implies a fixed language experience. There is no indication that users may choose another language or that the Chinese-only constraint is intentional for a region-specific use case.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill enables implicit invocation while providing no narrowly scoped activation criteria, so the platform may auto-select it for loosely related user requests. Because this skill is broad and can generate plans, commands, and delivery workflows, ambiguous triggering increases the chance of unintended routing, over-collection of project details, or execution of an unsuitable workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
72% confidence
Finding

The script description and embedded content mix English with fixed Chinese labels and defaults such as '待确认', 'AI搜索', and Chinese search aliases, with no indication that users can choose language or locale. Under the policy rule, forcing a specific language/locale without opt-in can be 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
98% confidence
Finding

This Python skill’s docstring and nearly all CLI prompts, help text, and status messages are written exclusively in Chinese, which imposes a specific language/locale on users. The file does not provide an option to select another language or indicate that the skill is intentionally region-specific, so it conflicts with the policy against forcing a language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The implemented skill behavior materially diverges from the declared metadata: instead of acting as a planning/citation expert, it exposes image generation, media upload, task polling, and file download operations against an external service. This mismatch can mislead users and reviewers about the skill’s actual capabilities, increasing the chance of unintended data transfer, unexpected charges, or execution of higher-risk actions under a lower-risk description.

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 natural-language descriptions and CLI output in Chinese throughout, beginning with the module docstring and continuing across prompts and status messages. Because the skill does not offer a locale selection or document a justified region-specific constraint, it violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The placeholder value for api_key includes Chinese text (请替换为你的APIKey), which imposes a specific language in user-facing configuration content. This can violate language/locale policy when no opt-in, alternative language, or documented regional justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code performs a file write to the path provided by --output, but the file contains no comment, docstring detail, or user-facing notice explaining that it will create or overwrite a local file. For code files, file writes should have some visible disclosure unless clearly documented as part of the skill behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest focuses on strategy, content structuring, AI search, citation, and related media workflow support. Exposing a user-info capability that queries account information and wallet balance is not an obvious requirement for that purpose, nor for the specialized image-generation wrapper embedded later in the file.

Content

No source excerpt is available for this finding.