Back to skill

Security audit

强透视姿态与高反差漫画动画|AI-HIVE原创工作流

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed AI-HIVE animation workflow, but its helper can send AI-HIVE credentials to an arbitrary configured endpoint.

Review before installing or running the helper. Prefer OAuth through an MCP client or a scoped API key stored in a secret manager. Do not set AI_HIVE_MCP_URL unless you fully trust the destination, and avoid using AI_HIVE_ACCESS_TOKEN in shell environments. Confirm model, cost, and output scope before any paid generation, upload, batch operation, send, or publish action.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ai_hive_mcp.py:19
Finding

Credentials Can Be Transmitted to an Arbitrary User-Configured MCP 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 script permits `AI_HIVE_MCP_URL` to replace the documented AI-HIVE endpoint with an arbitrary URL. Before sending a request, `auth_headers()` reads either `AI_HIVE_ACCESS_TOKEN` or `AI_HIVE_API_KEY` from the process environment and adds the credential to the request headers. No validation ensures that the configured URL: - Uses HTTPS. - Resolves to the documented `ai-hive.iclip.cn` host. - Uses the expected `/api/mcp` path. - Remains on an approved origin throughout request processing. As a result, a modified environment, compromised launcher, unsafe shell profile, or copied configuration can cause the script to transmit the credential directly to an attacker-controlled endpoint. This network transmission is necessary when communicating with the legitimate A ...[truncated 1943 chars]
Remediation
View remediation
str: parsed = urlparse(raw_url) if parsed.scheme != "https": raise SystemExit("The MCP endpoint must use HTTPS.") if parsed.hostname not in ALLOWED_MCP_HOSTS: raise SystemExit("The MCP endpoint host is not approved.") if parsed.port not in (None, 443): raise SystemExit("The MCP endpoint must use the standard HTTPS port.") if parsed.path != "/api/mcp" or parsed.params or parsed.query or parsed.fragment: raise SystemExit("The MCP endpoint path is invalid.") if parsed.username or parsed.password: raise SystemExit("User information is not permitted in the MCP URL.") return raw_url ``` 3. **Validate the destination before calling `auth_headers()`.** Authentication material should only be loaded and attached after the endpoint passes all origin checks. 4. **Restrict redirects for authenticated requests.** Reject redirects to a different scheme, host, port, or path, and never forward authentication headers across origins. 5. **Prefer scoped, short-lived credentials.** Use OAuth tokens with the minimum required MCP scopes instead of broadly privileged, long-lived API keys where possible. 6. **Document the trust boundary.** Warn that endpoint overrides must not be accepted from untrusted project files, shell snippets, task inputs, or user-provided prompts. 7. **Add automated tests** confirming that HTTP endpoints, alternate hosts, embedded credenti ...[truncated 101 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (12)

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 sends authentication material from environment variables to a network endpoint whose base URL can be overridden via AI_HIVE_MCP_URL. In an untrusted execution environment, a malicious or tampered environment variable could redirect requests and API credentials to an attacker-controlled server, causing credential exfiltration and unauthorized tool invocation.

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

The skill is presented as a narrowly scoped creative workflow for original animation production, but the described behavior and referenced scripts suggest a more generic MCP integration that can inspect connectivity and invoke tools without strong task-level constraints. This gap is dangerous because users and orchestrators may grant trust based on the benign description while the implementation can access broader MCP functionality, bypassing expectations around IP safety, confirmation steps, and limited-purpose execution.

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

The skill exposes operational guidance for network access, local file reads/writes, and environment-based credential use, but does not declare any explicit tool scope or allowed-tools boundary. In an agentic environment, that mismatch can let the skill run with broader capabilities than users expect, increasing the chance of unintended network actions, local file access, or secret handling beyond the advertised workflow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation description contains broad terms such as anime, games, AI images, AI video, and short-video production, which can cause the skill to trigger for many loosely related requests. Overbroad activation increases the risk that this skill is selected in inappropriate contexts and gains access to tools or user data when a more specific, less privileged skill should have been used.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The search tags are highly generic and cover broad creative domains, making accidental or excessive routing likely. In a tool-using skill, unsafe overmatching matters because the skill may be invoked outside its intended safety and review assumptions, leading to unnecessary credential prompts, tool exposure, or unintended external actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The display name, short description, and default prompt are all written in Chinese, which imposes a specific language on users without any stated opt-in or alternative locale handling. This can violate language/locale policy when the skill is presented in environments serving users with different language preferences.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation tells users not to handle OAuth tokens directly, but the implementation still accepts a bearer token from the environment. That mismatch can mislead users into unsafe operational practices and weakens the trust boundary the module claims to enforce.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code emits user-facing error text in Chinese, and the same pattern continues throughout the script in credential, HTTP, argument, and CLI help messages. For a general-purpose helper, forcing a specific language without opt-in is a natural-language policy issue because users are not offered a language/locale choice and no region-specific justification is stated in the file.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The helper accepts raw bearer tokens from AI_HIVE_ACCESS_TOKEN even though the documented workflow says OAuth users should let the MCP client manage login and tokens. This encourages insecure token handling outside the intended client boundary, increasing the chance of token leakage through shell history, process inspection, CI logs, or misconfigured environments.

Content

No source excerpt is available for this finding.