Back to skill

Security audit

Nano Banana Prompting Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for image generation, but its documented shell command passes user-shaped prompt text in a way that could let a malicious prompt become a local command.

Install only if you are comfortable with the agent invoking a local image-generation command and using GEMINI_API_KEY. Before use, prefer an implementation that passes prompt JSON as a separate process argument or file/stdin, checks output filenames for collisions, and confirms non-default output paths.

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

Error
Location
SKILL.md:24
Finding

Shell Command Injection Through Unsafe Prompt Interpolation

Content
View full analysis
' \ --filename ".png" \ --resolution 2K ``` The editing workflow repeats the same unsafe interpolation pattern: ```bash uv run {nano-banana-pro-dir}/scripts/generate_image.py \ --prompt '' \ --filename "edited-output.png" \ -i "/path/to/original.png" \ --resolution 2K ``` ### Technical Analysis The Skill instructs the Agent to incorporate content derived from the user's image request into a JSON prompt and then insert that prompt directly into a single-quoted shell argument. Single quotes only protect the argument until another single quote is encountered. If user-controlled content contains an apostrophe followed by shell syntax, it can terminate the quoted argument and introduce an additional command. For example, malicious text conceptually shaped like the following could escape the prompt argument when copied into the generated JSON: ```text '; attacker-controlled-command; # ``` The exact payload depends on how the Agent constructs and submits the command, but the underlying issue is that data and shell syntax are combined in one command string without context-aware escaping. Although `SKILL.md` explicitly requires filename sanitization, it provides no equivalent protection for the more directly user-controlled `--prompt` value. The same concern applies to dynamically substituted generator, input-image, and output paths if they are interpolated into a shell command rather than supplied as separate process arguments. ### Attack Path 1. An attacker submits an image-generation or editing request containing a single quote and shell control operators. 2. The Agent incorporates the attacker-controlled ...[truncated 1558 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (3)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 85)May include surrounding context.

Claude Code

bash
mkdir -p .claude/skills
cd .claude/skills
git clone https://github.com/minilozio/nano-banana-prompting-skill.git

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to interact with the agent using very broad natural-language phrases like 'Generate a photo...' and 'Draw me...'. In an agentic environment, such generic triggers can cause the skill to activate during ordinary conversation or be invoked unintentionally by third-party content, increasing the risk of prompt-routing mistakes and unintended model/tool use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly directs the agent to save generated files to the user's Desktop or another specified path, but it does not require user confirmation before creating or overwriting files. In an agent setting, this can cause unintended file writes, clutter, or overwriting of existing files if filename collisions occur, especially when the path is user-specified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.