Back to skill

Security audit

Nano Banana 2 图片生成与编辑

Security checks for vulnerabilities and agentic risk

Overview

This image-generation skill mostly matches its stated purpose, but it needs review because it can send API keys and uploaded media to configurable endpoints and can write downloaded results without safe path containment.

Review carefully before installing. Use only the official AI Hive endpoint, avoid setting AI_HIVE_BASE_URL or custom base_url values unless you fully trust them, do not upload sensitive media, and prefer a version that validates upload/download destinations and sanitizes downloaded filenames.

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

Error
Location
scripts/imagegen.py:89
Finding

Credentials and user media can be transmitted to unrestricted network destinations

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imagegen.py:399
Finding

API-controlled filename components permit output-directory traversal

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose is a narrow image-generation skill, but the detected behavior reportedly includes broader chat/text, video generation, model enumeration, and account or wallet-related queries. That mismatch is dangerous because it obscures the real trust boundary: users and orchestrators may route requests to this skill believing it is limited to image tasks while it can access unrelated and potentially sensitive functions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes shell commands, performs package installation, reads local files, and accesses the network, but it declares no explicit tool scope or permissions boundary. This creates an avoidable least-privilege failure: an agent may grant broader capabilities than users expect, increasing the blast radius if the skill is misused or later modified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad and generic enough to overlap with many ordinary image-editing or design requests, which can cause the skill to be selected more often than intended. Over-broad routing increases security risk because it exposes users to shell/network/file-capable behavior in contexts where a narrower or safer skill might have sufficed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements a full generic AI Hive client with text chat, video generation, model enumeration, task polling, upload, and init flows, while the skill is presented as a Nano Banana 2 image-only skill. This capability mismatch can bypass policy or reviewer expectations, enabling operators or downstream tooling to invoke broader networked AI functions than the manifest suggests.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and CLI descriptions describe a universal AI capability tool rather than a narrowly scoped Nano Banana 2 image generator. Mislabeling security scope is dangerous because reviewers, users, or automated permission systems may trust the declared identity and overlook the broader reachable behavior embedded in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring and nearly all user-facing prompts, help text, and status messages are written only in Chinese, which imposes a specific language on users without any opt-in or alternative locale. This matches the policy category for language or locale constraints that are not optional or explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file uses Chinese throughout the substantive entries, which can amount to a language-policy issue when the skill documentation forces a specific language without user opt-in. There is no indication that the skill is region-specific or that alternative language support is available.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill metadata and body are primarily written in Chinese, with no statement that users may choose their preferred language or locale. This can create a language-policy issue if the skill consistently responds in Chinese by default without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example API key value uses Chinese text ('请替换为你的APIKey') as the only user-facing instruction. This imposes a specific language in a user-visible config artifact without any opt-in, alternative locale, or documented regional constraint.

Content

No source excerpt is available for this finding.