Back to skill

Security audit

AI大模型专家|Gemini API中转

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly scoped to its advertised Gemini relay role and handles API credentials, uploads, and downloads in ways users should review before installing.

Review this skill before installing. Use it only with an AI-HIVE key you can revoke, avoid custom base URLs unless you fully trust the endpoint, do not upload private media unless the destination is acceptable, and consider disabling automatic result downloads or using a constrained output directory. The package does not show backdoor-style persistence, but its public description overstates Gemini relay management compared with what the scripts actually do.

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

Error
Location
scripts/imagegen.py:91
Finding

Bearer API Key Disclosure Through an Unrestricted Custom Base URL

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:274
Finding

Unvalidated API-Controlled Upload and Download Destinations

Content
View full analysis
PUT -> complete. Returns mediaId.""" path = Path(file_path) if not path.is_file(): raise SystemExit(f"File does not exist: {file_path}") filename = path.name content_type = guess_mime(str(path)) size = path.stat().st_size token = client.create_upload_token(filename, content_type, size) media_id = token["mediaId"] upload_url = token["upload"]["url"] upload_method = token["upload"].get("method", "PUT") upload_headers = token["upload"].get("headers", {}) with open(str(path), "rb") as f: try: oss_resp = requests.request( upload_method, upload_url, headers=upload_headers, data=f, timeout=300, ) except requests.exceptions.RequestException as e: raise SystemExit( f"OSS upload network error: {e}" ) if not oss_resp.ok: try: detail = oss_resp.text except Exception: detail = "" raise SystemExit(f"OSS upload failed ({oss_resp.status_code}): {detail}") result = client.complete_upload(media_id) return media_id ``` The response-controlled download URL is also used without destination or size validation: ```python def download_file(url, out_path, timeout=300): """Stream a file download with progress reporting.""" try: resp = requests.get(url, stream=True, timeout=timeout) resp.raise_for_status() total = int(resp.headers.get("content-length", 0)) downloaded = 0 ...[truncated 3660 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:113
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
``` 2. Generate and verify cryptographic hashes using a lock-file workflow such as `pip-tools`. 3. Install with hash enforcement: ```bash pip install --require-hashes -r requirements.txt ``` 4. Pin transitive dependencies as well as direct dependencies. 5. Use an approved package index or internally controlled mirror. 6. Run dependency vulnerability scanning in continuous integration. 7. Review and deliberately update locked versions on a controlled schedule. 8. Recommend installation inside a dedicated virtual environment without administrative privileges. ]]>
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims Gemini/Google relay and management capabilities, but the reported implementation lacks actual relay compatibility and platform-level controls while adding undeclared chat, upload, download, browser, and local config behaviors. In a security-sensitive context involving enterprise AI gateways and tokens, this kind of capability mismatch can cause users to overtrust the skill and handle regulated prompts, files, or credentials in an unsafe client-side workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims Gemini/Google relay and management capabilities, but the reported implementation lacks actual relay compatibility and platform-level controls while adding undeclared chat, upload, download, browser, and local config behaviors. In a security-sensitive context involving enterprise AI gateways and tokens, this kind of capability mismatch can cause users to overtrust the skill and handle regulated prompts, files, or credentials in an unsafe client-side workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill claims Gemini/Google relay and management capabilities, but the reported implementation lacks actual relay compatibility and platform-level controls while adding undeclared chat, upload, download, browser, and local config behaviors. In a security-sensitive context involving enterprise AI gateways and tokens, this kind of capability mismatch can cause users to overtrust the skill and handle regulated prompts, files, or credentials in an unsafe client-side workflow.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises commands that use shell execution, local files, environment variables, and network access, but it does not declare any explicit tool scope or permission boundaries. This creates an overbroad capability surface where a host may grant more access than users expect, increasing the risk of credential exposure, unintended file writes, or arbitrary command execution through helper scripts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The invocation guidance uses broad search-style phrases like generic Gemini relay terms, which can cause the skill to activate in unrelated discussions. Overbroad triggering is risky here because the skill has network, file, and credential-related workflows; accidental invocation could steer users into key setup, uploads, or external service use without clear intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The display name, short description, and default prompt are all written in Chinese, which implies a fixed language/locale for the skill's interface and invocation guidance. The file does not offer a user language choice or document a justified region-specific constraint, so this appears to violate the language/locale policy requirement.

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 Gemini API relay and AI-HIVE integration skill for organizing model endpoints, managing keys/models/routing/quotas/auditing, and handling async tasks. This script instead generates a local JSON 'production brief' containing creative-planning fields like audience, format, storyboards, and acceptance checklists, with no API relay, key management, routing, quota, audit, or task-handling behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring says it creates a deterministic production brief for 'Gemini API中转', implying a brief related to the relay product. However, the generated JSON focuses on media-production artifacts such as 人物板, 故事板, 场景板, and 逐镜提示词, which contradict the relay-oriented label and point to a different business function.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code embeds Chinese-language descriptions and labels such as "Gemini API中转", "API聚合", and Chinese search aliases directly in user-facing strings. Because no language or locale choice is offered, the skill appears to enforce a specific language context without user opt-in, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level docstring states this file wraps general AI Hive OpenAPI capabilities for text chat, image generation, video generation, model queries, media upload, and task polling. That behavior and framing are broader than, and partially different from, a manifest describing a Gemini API relay service, creating a semantic mismatch between declared purpose and implemented tool scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring presents the skill description exclusively in Chinese, and user-facing prompts/help strings throughout the file also enforce Chinese output/interaction by default. This can violate a language/locale policy when users are not given an explicit choice or opt-in for the locale.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The embedded skill configuration and CLI description frame this file as a GPT Image 2 picture generation/editing skill, but the implementation also allows task, upload, and init operations, including opening a browser and persisting API credentials locally. Those extra behaviors may be valid support functions, but they go beyond the narrow image-generation purpose claimed by the skill-specific metadata and interface text.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents itself as a video-generation skill, but the implementation is a broad AI-HIVE client that includes account inspection, generic model enumeration, text chat, media upload, and arbitrary task handling. This capability mismatch can mislead users and calling agents into granting API keys and trust under narrower assumptions, increasing the risk of overbroad data exposure and unintended remote actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code file includes natural-language descriptions, help text, and user-facing instructions almost entirely in Chinese, starting from the module docstring. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale restriction is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The wrapper exposes task, upload, and initialization flows backed by a generic client, not just narrowly constrained short-drama generation. In an agent skill context, extra operational surface area matters because it enables credential setup, file transfer, and broader API interaction than a user may expect from the advertised purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file declares language: zh-CN, which indicates a fixed language/locale setting. There is no accompanying statement that users may choose another language, nor a clear justification that this skill must be limited to Chinese for compliance or region-specific reasons.

Content

No source excerpt is available for this finding.