Back to skill

Security audit

商品换背景与商业场景图|Nano Banana Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent AI product-background replacement tool, but its downloader trusts remote service data in ways that can write outside the chosen folder or consume excessive disk space.

Review before installing. Use it only if you trust the AI Hive service and are comfortable uploading the selected product images there. Prefer an isolated virtual environment, avoid running it from sensitive directories, use a dedicated output folder, and patch or request fixes for task ID validation, output containment, download size limits, and pinned dependencies before production use.

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/product_scene_swap.py:264
Finding

Server-Controlled Task Identifier Allows Output Path Traversal

Content
View full analysis
.png` suffix, which limits which existing filenames can be directly targeted, but an attacker can still create files outside the intended directory or overwrite matching paths. If a matching destination is a symbolic link, the write operation also follows that link and may overwrite its target. Merely requiring the download URL to use HTTPS does not establish that the returned task identifier is safe for use as a filesystem path. ### Attack Path 1. A user submits an image-generation request to the configured remote service. 2. The service, or an attacker who has compromised it, returns a crafted `taskId` containing traversal components, such as `../../outside/target`. 3. `run_swap()` accepts the value without validating its format and passes it into `poll()`. 4. When the task reports a completed item, `poll()` constructs a path such as `output_dir/../../outside/target_1.png`. 5. `save_result()` creates the escaped parent directory where permissions allow and writes remot ...[truncated 915 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/product_scene_swap.py:225
Finding

Unbounded Remote Result Download Can Exhaust Local Storage

Content
View full analysis
Remediation
View remediation
MAX_RESULT_BYTES: raise SystemExit("Result exceeds the permitted size") written = 0 with temporary_destination.open("xb") as handle: for chunk in response.iter_content(8192): if not chunk: continue written += len(chunk) if written > MAX_RESULT_BYTES: raise SystemExit("Result exceeds the permitted size") handle.write(chunk) ``` ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:112
Finding

Runtime Dependency Installation Is Not Version-Pinned or Hash-Verified

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill exposes operational commands that imply shell, network, file read/write, and environment use, but it does not declare any tool scope restrictions. That creates an avoidable trust gap: an agent may grant broader capabilities than necessary, increasing the blast radius if the script or its inputs are abused. In this context, the skill calls a fixed external API and local Python scripts, so undeclared capabilities are more risky than a purely descriptive skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill title, operational instructions, task schema, and all example prompts are written in Chinese, with no statement that users may choose another language. This creates a natural-language locale constraint that is not presented as optional or justified as region-specific compliance behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file contains natural-language strings that present the tool and its guidance exclusively in Chinese, beginning with the module docstring. The policy requires avoiding forced language or locale choices unless the user is offered a choice or the restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The example API key value includes Chinese text ('请替换为你的APIKey'), which imposes a specific language in user-facing configuration content. There is no indication that the skill is region-specific or that users may choose their preferred language or locale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.