Back to skill

Security audit

Nano Banana 2 营销图片

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent AI Hive image-generation helper for Nano Banana 2 marketing assets, with expected file upload, API key, network, and download behavior that is disclosed and purpose-aligned.

Install only if you intend to use AI Hive for Nano Banana 2 marketing images. Use a virtual environment, pin dependencies if possible, provide only reference images you are comfortable uploading, and understand that the skill stores an AI Hive API key locally and downloads generated media to your Downloads folder.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:72
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis
``` The script also directs users to the same unpinned installation command: ```python try: import requests except ImportError: print("缺少依赖:requests。请运行 pip3 install requests", file=sys.stderr) sys.exit(1) ``` ### Technical Analysis The documented setup installs `requests` without a version constraint, lockfile, integrity hash, or isolated environment. The package name is legitimate, but the artifact and its transitive dependencies remain mutable. Consequently, the dependency code executed by this Skill may differ from the code that was originally audited. The actual package source also depends on the user's `pip` configuration and configured package indexes. A compromised package release, index, mirror, or dependency-resolution path could therefore introduce unauthorized code. This is a supply-chain weakness rather than evidence that the current `requests` package is malicious. ### Attack Path 1. A user follows the installation instructions and runs `pip3 install requests`. 2. `pip` resolves the latest compatible package and transitive dependencies from its configured indexes. 3. An upstream release, package mirror, or dependency source is compromised or otherwise supplies an unexpected artifact. 4. The package is installed into the selected Python environment. 5. Malicious code can run during package installation or when `imagegen.py` imports the dependency. ### Impact Assessment Successful exploitation could execute code with the privileges of the user performing the installation or running the Skill. Depending ...[truncated 288 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imagegen.py:214
Finding

Reference-Image Validation Relies Only on the Filename Extension

Content
View full analysis
" raise SystemExit(f"OSS 上传失败 ({oss_resp.status_code}): {detail}") ``` The MIME inference function is based exclusively on the suffix: ```python def guess_mime(file_path): """根据扩展名推断 MIME 类型。""" ext = Path(file_path).suffix.lower() return MIME_MAP.get(ext, "application/octet-stream") ``` ### Technical Analysis The program claims to permit only reference images, but it infers the MIME type exclusively from the filename extension. It does not ins ...[truncated 1724 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/imagegen.py:263
Finding

Server-Provided Transfer URLs Are Used Without Destination Validation

Content
View full analysis
0: pct = int(downloaded * 100 / total) bar = "█" * (pct // 5) + "░" * (20 - pct // 5) print(f"\r {bar} {pct}% ({downloaded // 1024}KB)", end="", flush=True) print() ``` The unvalidated result URL is obtained from task data and passed to the downloader: ```python for i, item in enumerate(succeeded): result_url = item.get("resultUrl") if not result_url: continue ext = ".mp4" if "video" in task_type.lower() else ".png" filename = f"{task_type}_{tas ...[truncated 2631 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes shell commands, reads local image files, writes outputs, uses environment-provided secrets, and performs network requests, yet it does not declare any tool scope or permissions boundaries. This increases the chance the agent will grant broader capabilities than necessary and makes review of data flow and outbound access harder, especially since the skill sends key-bearing requests to an external API endpoint.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description contains very broad trigger phrases covering generic marketing, image generation, ecommerce, campaign assets, and AIGC image use cases in both Chinese and English. Overbroad activation can cause the skill to be selected for unrelated requests, unexpectedly exposing its file/network/tooling behaviors and bypassing more appropriate, narrower skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description is written to require or strongly imply Chinese-language usage without offering any user choice of language or locale. Under the policy, forcing a language without opt-in is a natural-language policy concern unless the constraint is explicitly justified and documented.

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 and all user-facing CLI messages are written in Chinese, and the script does not offer any language or locale selection. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example API key placeholder uses 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 another language, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.