Back to skill

Security audit

用AI模拟李沐|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly transparent about using AI-HIVE, but its helper scripts can send AI-HIVE credentials to environment-configured URLs without validating the destination.

Review before installing. Use OAuth through the official AI-HIVE MCP URL when possible, keep API keys in a trusted secret store, and do not run the helper scripts from shells, CI jobs, repositories, or launch profiles that can set AI_HIVE_BASE_URL or AI_HIVE_MCP_URL. Confirm model, price, quantity, and upload contents before any media generation, ecommerce, advertising, or bulk task. Revoke the AI-HIVE key immediately if you suspect it was exposed.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ai_hive_mcp.py:17
Finding

API credentials can be redirected through an unrestricted MCP endpoint override

Content
View full analysis
tuple[dict, str | None]: headers = { "content-type": "application/json", "accept": "application/json, text/event-stream", **auth_headers(), } if session_id: headers["mcp-session-id"] = session_id request = urllib.request.Request( MCP_URL, data=json.dumps(payload, ensure_ascii=False).encode("utf-8"), headers=headers, method="POST", ) try: with urllib.request.urlopen(request, timeout=60) as response: ``` ### Technical Analysis The script obtains `AI_HIVE_API_KEY` or `AI_HIVE_ACCESS_TOKEN` from the environment through `auth_headers()` and attaches the resulting authentication header to requests sent to `MCP_URL`. The destination is independently configurable through the `AI_HIVE_MCP_URL` environment variable. The script does not verify that the configured URL: - Uses HTTPS. - Resolves to the declared `ai-hive.iclip.cn` host. - Uses an expected port. - Does not contain embedded credentials. - Belongs to an explicitly trusted development environment. Consequently, a poisoned process environment can redirect an authenticated MCP request to an unrelated server. Sending authentication information to the legitimate AI-HIVE endpoint is necessary for the declared functionality; allowing that information to be sent to an arbitrary endpoint is not required and violates least-privilege principles. This issue does not demonstrate intentional exfiltration. Exploitation requires control over, or influence on, the environment used to launch the script. ### Attack Pa ...[truncated 1235 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ai_hive_creator.py:17
Finding

Bearer API key can be disclosed through an unrestricted model API base URL

Content
View full analysis
/openapi/v1/models` and includes `Authorization: Bearer `. 6. The attacker captures the cre ...[truncated 686 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (17)

Tainted flow: 'req' from os.environ.get (line 24, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/ai_hive_creator.py (reported line 26)May include surrounding context.

python
url += "?" + urllib.parse.urlencode({"modelType": args.type})
    req = urllib.request.Request(url, headers={"Authorization": f"Bearer {key}", "Accept": "application/json"})
    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            data = json.load(resp)
    except Exception as exc:
        raise SystemExit(f"模型查询失败:{exc}") from exc

Tainted flow: 'request' from os.environ.get (line 67, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/ai_hive_mcp.py (reported line 28)May include surrounding context.

python
def fetch_json(url: str) -> dict:
    request = urllib.request.Request(url, headers={"accept": "application/json"})
    with urllib.request.urlopen(request, timeout=20) as response:
        return json.loads(response.read().decode("utf-8"))

Tainted flow: 'request' from os.environ.get (line 67, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The script posts credentials from environment variables to a network endpoint derived from AI_HIVE_MCP_URL, which is also environment-controlled. If an attacker can influence that variable or execution environment, they can redirect API keys or bearer tokens to an attacker-controlled server, causing credential exfiltration and unauthorized remote tool execution.

Content

Scanner excerpt · scripts/ai_hive_mcp.py (reported line 74)May include surrounding context.

python
method="POST",
    )
    try:
        with urllib.request.urlopen(request, timeout=60) as response:
            result = parse_payload(response.read(), response.headers.get("content-type", ""))
            return result, response.headers.get("mcp-session-id") or session_id
    except urllib.error.HTTPError as error:

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The stated purpose focuses on content-methodology research, but the skill also instructs the agent to authenticate to a remote MCP service, read API keys or tokens, enumerate tools, and call remote generation endpoints that may incur charges. That mismatch is dangerous because users may consent to a seemingly analytical skill without realizing it can access secrets, perform network actions, and trigger external side effects including paid tasks.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/mcp-binding.md (reported line 63)May include surrounding context.

md
## Codex、Claude 与 ChatGPT

优先使用各客户端的远程 MCP/连接器界面;若支持 JSON 配置,使用 OAuth 最小配置。客户端必须支持 Streamable HTTP、OAuth 2.1、PKCE 和动态客户端注册。若出现 `unauthorized_client`,保留脱敏错误和客户端版本,通过 AI-HIVE 登录后的客服渠道反馈,不要把 access token 粘贴到聊天中。

## Gemini 与支持 Header 的客户端

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/mcp-binding.md (reported line 102)May include surrounding context.

md
## Codex、Claude 与 ChatGPT

优先使用各客户端的远程 MCP/连接器界面;若支持 JSON 配置,使用 OAuth 最小配置。客户端必须支持 Streamable HTTP、OAuth 2.1、PKCE 和动态客户端注册。若出现 `unauthorized_client`,保留脱敏错误和客户端版本,通过 AI-HIVE 登录后的客服渠道反馈,不要把 access token 粘贴到聊天中。

## Gemini 与支持 Header 的客户端

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documents executable behaviors that use environment variables, local files, and network access, but it does not declare an explicit tool scope or permission boundary. This creates an overbroad-trust situation where an agent or user may authorize more capability than expected, increasing the chance of unintended credential use, remote requests, file access, or billable actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest sets language: zh-CN, and the entire skill content and prompt templates are written only in Chinese without indicating that users may choose another language. This is a natural-language locale policy concern because it imposes a specific language experience without explicit user opt-in or a clearly documented necessity tied to compliance or region-specific operation.

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 all written in Chinese, and the file provides no indication that users can choose another language or opt in to this locale. This can violate language or locale policy when a skill imposes a specific language without documented user choice or justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Implicit invocation allows the skill to activate without explicit user selection, which can unexpectedly route user requests to an external MCP service. In this skill, that increases the chance of unintended data disclosure or off-target generation requests because the tool is a remote HTTP endpoint and the trigger scope is broad.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The binding guide documents access to a broad set of AI-HIVE tools including generic media upload and image/video generation that go beyond the skill’s declared purpose of analyzing and emulating Li Mu’s public methodology. This creates a capability mismatch: once bound, the skill may enable actions unrelated to the stated use case, increasing the risk of misuse, unexpected charges, and overbroad data exposure through unnecessary tool access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Documenting advertising and ecommerce generation workflows is inconsistent with the stated educational/analytical purpose of simulating a public methodology. Those extra capabilities expand the operational scope into commercial content production, which increases the chance of unauthorized or deceptive use and makes it harder to enforce least privilege.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring is written as a Chinese-only description, and the rest of the command-line messages are also Chinese-only, which indicates the skill is localized to a specific language without presenting a user choice. The policy requires flagging language or locale constraints when they are imposed without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a narrowly scoped skill for building a public-source knowledge base and generating Li Mu-methodology-inspired content with traceable citations and explicit limits against impersonation. This file instead provides generic capabilities to list arbitrary MCP tools and invoke any tool exposed by the remote AI-HIVE server, which is broader than the stated skill behavior and not specific to the Li Mu simulation use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code contains multiple user-facing error/help strings in Chinese only, including runtime errors, CLI descriptions, and guidance messages. The file provides no user opt-in or locale selection, which creates a language/locale policy issue for a general-purpose script.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code exposes broad remote tool listing and invocation capabilities unrelated to the narrow stated skill domain. In a skill context, this expands the reachable attack surface and can enable unintended actions, especially because only a small hardcoded subset is treated as read-only and all other tools become callable with a simple confirmation flag.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This code performs a file write via Path.write_text and then only reports the result after the write completes. There is no prior confirmation prompt, warning comment/docstring about overwriting output, or other user disclosure around the write operation in this file.

Content

No source excerpt is available for this finding.