Back to skill

Security audit

新派武侠与民俗奇幻动作短片|AI-HIVE原创工作流

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent AI-HIVE video-generation purpose, but it exposes broad remote MCP powers and has a helper script that can send credentials to an environment-selected endpoint.

Review before installing. Prefer OAuth over API keys, verify the AI-HIVE connection target, do not set a custom MCP endpoint, and avoid storing broad or long-lived keys in the environment. Only approve uploads or paid generations after checking the model, cost, number of calls, and data being sent; revoke the AI-HIVE grant or API key when finished.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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

Error
Location
scripts/ai_hive_mcp.py:19
Finding

Credentials and tool arguments can be transmitted to an arbitrary environment-controlled endpoint

Content
View full analysis
dict[str, str]: key = os.environ.get("AI_HIVE_API_KEY", "").strip() token = os.environ.get("AI_HIVE_ACCESS_TOKEN", "").strip() if token: return {"authorization": f"Bearer {token}"} if key: return {"x-ai-hive-api-key": key} raise SystemExit( "缺少凭据。OAuth 用户请在 MCP 客户端中完成登录;本脚本调用工具时需通过环境变量提供 " "AI_HIVE_API_KEY,或仅运行 doctor。" ) def post(payload: dict, session_id: str | None = None) -> 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", ) ``` ### Technical Analysis The remote MCP destination is taken directly from the `AI_HIVE_MCP_URL` environment variable. The code does not validate that the resulting URL: - Uses HTTPS. - Belongs to the documented `ai-hive.iclip.cn` host. - Uses an approved port. - Does not contain user information or another deceptive authority component. - Remains on the approved origin after redirects. The `post()` function then obtains either `AI_HIVE_ACCESS_TOKEN` or `AI_HIVE_API_KEY` and attaches it to every request sent to that destination. MCP payloads, including tool names and tool arguments, are transmitted in the same request. A configurable endpoint may be useful for testing, but attaching production credentials without validating the endpoint exceeds what is necessary for the declared AI-HIVE workflow ...[truncated 1387 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
agents/openai.yaml:6
Finding

Implicit MCP invocation exposes capabilities broader than the declared workflow requires

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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 (10)

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 allows AI_HIVE_MCP_URL from the environment to control the outbound POST target, and also attaches credentials from AI_HIVE_API_KEY or AI_HIVE_ACCESS_TOKEN to that request. If an attacker can influence the environment, they can redirect requests to a malicious server and exfiltrate API credentials or capture tool-call payloads.

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

The skill is presented as a narrowly scoped creative workflow for wuxia/fantasy short-film planning, but the referenced behavior is a generic MCP client that can list tools, inspect authentication state, and invoke arbitrary remote tools after confirmation. This mismatch is dangerous because users may grant trust and credentials to what appears to be a domain-specific assistant, while it actually exposes a much broader remote-action capability than advertised.

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

The skill describes network access, local file operations, and environment-variable use via helper scripts and MCP connectivity, but it does not declare any explicit tool scope or allowed-tools restrictions. That creates an overprivileged execution surface where a host agent may expose broader capabilities than users expect, increasing the chance of unintended file access, secret handling, or network calls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The user-facing display name, short description, and default prompt are all written exclusively in Chinese, with no indication that users may choose another language. This creates a locale/language policy concern because the skill appears to enforce a specific language without explicit opt-in or documented regional limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file uses Chinese throughout and does not indicate that the user can choose another language or that the skill is intentionally restricted to a Chinese-language audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file contains multiple user-facing error/help strings in Chinese, starting here, while the script does not offer any language selection or indicate that it is intentionally limited to Chinese-speaking users. This can violate organizational language/locale policy when users are not given an opt-in or alternative locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The argparse description and subcommand/help text are user-facing natural language, but they are hardcoded in Chinese only. Because the file does not offer locale choice or justify a Chinese-only audience, this is a policy-relevant language restriction.

Content

No source excerpt is available for this finding.