Back to skill

Security audit

seo-image-gen

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent SEO image-generation helper, but users should understand it relies on Gemini/nanobanana tooling, local helper commands, generated file storage, and cost logging.

Install only if you intend to use Gemini/nanobanana for SEO image generation and are comfortable with API usage costs, generated images being saved locally, and usage/preset state being kept under your home directory. Review the external banana extension and helper scripts before relying on the local fallback commands.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/cost-tracking.md (reported line 30)May include surrounding context.

bash
# Log a generation
cost_tracker.py log --model gemini-3.1-flash-image-preview --resolution 1K --prompt "coffee shop hero"

# View summary (total + last 7 days)
cost_tracker.py summary

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/cost-tracking.md (reported line 39)May include surrounding context.

md
cost_tracker.py today

# Estimate before batch
cost_tracker.py estimate --model gemini-3.1-flash-image-preview --resolution 1K --count 10

# Reset ledger
cost_tracker.py reset --confirm

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The invocation description includes broad phrases like 'banner', 'thumbnail', and 'create visual', which can cause the skill to trigger in unrelated contexts. Overbroad activation increases the chance that the agent enters a workflow that may execute tools or commands without the user's specific intent to use this extension.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs the agent to execute local shell and Python commands for preset discovery (presets.py list) in addition to the declared MCP image-generation workflow. Even though this appears operational rather than malicious, expanding behavior into local command execution increases attack surface and can expose the host to unsafe file access or execution if surrounding paths, arguments, or referenced content are compromised.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

After every successful generation, guide the user on:

  1. Alt text:Write descriptive, keyword-rich alt text for the generated image
  2. File naming:Rename to SEO-friendly format: keyword-description-widthxheight.webp
  3. WebP conversion:Convert to WebP for optimal page speed:
    bash

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
75% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

Scanner excerpt · SKILL.md (reported line 148)May include surrounding context.

md
| MCP not configured | Run `./extensions/banana/install.sh` |
| API key invalid | New key at https://aistudio.google.com/apikey |
| Rate limited (429) | Wait 60s, retry. Free tier: ~10 RPM / ~500 RPD |
| `IMAGE_SAFETY` | Rephrase prompt - see `references/prompt-engineering.md` Safety section |
| MCP unavailable | Fall back: `python3 ~/.Codex/skills/seo-image-gen/scripts/generate.py --prompt "..." --aspect-ratio "16:9"` |
| Extension not installed | Show install instructions: `./extensions/banana/install.sh` |

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
75% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

Scanner excerpt · references/gemini-models.md (reported line 182)May include surrounding context.

md
| MCP not configured | Run `./extensions/banana/install.sh` |
| API key invalid | New key at https://aistudio.google.com/apikey |
| Rate limited (429) | Wait 60s, retry. Free tier: ~10 RPM / ~500 RPD |
| `IMAGE_SAFETY` | Rephrase prompt - see `references/prompt-engineering.md` Safety section |
| MCP unavailable | Fall back: `python3 ~/.Codex/skills/seo-image-gen/scripts/generate.py --prompt "..." --aspect-ratio "16:9"` |
| Extension not installed | Show install instructions: `./extensions/banana/install.sh` |

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
75% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

Scanner excerpt · references/gemini-models.md (reported line 184)May include surrounding context.

md
| MCP not configured | Run `./extensions/banana/install.sh` |
| API key invalid | New key at https://aistudio.google.com/apikey |
| Rate limited (429) | Wait 60s, retry. Free tier: ~10 RPM / ~500 RPD |
| `IMAGE_SAFETY` | Rephrase prompt - see `references/prompt-engineering.md` Safety section |
| MCP unavailable | Fall back: `python3 ~/.Codex/skills/seo-image-gen/scripts/generate.py --prompt "..." --aspect-ratio "16:9"` |
| Extension not installed | Show install instructions: `./extensions/banana/install.sh` |

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
75% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

Scanner excerpt · references/gemini-models.md (reported line 185)May include surrounding context.

md
| MCP not configured | Run `./extensions/banana/install.sh` |
| API key invalid | New key at https://aistudio.google.com/apikey |
| Rate limited (429) | Wait 60s, retry. Free tier: ~10 RPM / ~500 RPD |
| `IMAGE_SAFETY` | Rephrase prompt - see `references/prompt-engineering.md` Safety section |
| MCP unavailable | Fall back: `python3 ~/.Codex/skills/seo-image-gen/scripts/generate.py --prompt "..." --aspect-ratio "16:9"` |
| Extension not installed | Show install instructions: `./extensions/banana/install.sh` |

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The fallback path directs execution of a local Python generator when MCP is unavailable, which materially changes the trust model from remote-tool use to local code execution. In a skill file, fallback execution paths are dangerous because they can bypass expected controls, invoke unreviewed scripts, and create a command-execution avenue on the user's machine.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction to load this reference "when the user asks about costs or before batch operations" is broad and underspecified. It does not define clear trigger phrases, scope boundaries, or exclusion conditions, so common requests about costs could activate it unintentionally.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/post-processing.md (reported line 14)May include surrounding context.

which ffmpeg # For video/animation

text

Install ImageMagick if not present: `sudo apt install imagemagick` (Debian/Ubuntu) or `brew install imagemagick` (macOS).

## Common Operations

Ssd 2

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section explicitly teaches users how to rephrase prompts after safety blocks and frames blocked content as something to work around rather than respect. Even though some examples are mild or framed as benign substitutions, the overall guidance enables iterative bypass of model safety controls, which can be repurposed to obtain disallowed violent, celebrity, or otherwise restricted image outputs.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/seo-image-presets.md (reported line 124)May include surrounding context.

Creating Custom Presets

Users can create their own presets:

bash
python3 ~/.claude/skills/seo-image-gen/scripts/presets.py create my-brand

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The skill's stated purpose is generating SEO images, but it also instructs the agent to log usage and query summaries via local Python scripts. Cost reporting may be operationally useful, yet this is still an extra local-execution capability not disclosed in the manifest's purpose statement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents behavior that writes generated images to ~/Documents/nanobanana_generated/, which affects user data on disk. The description states the save location but does not present it as a caution or user warning, despite the operation creating persistent files automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown includes looped ImageMagick commands that write derived files for every matching PNG in a user directory. While the commands are understandable, the document does not explicitly warn that running them will create or overwrite multiple files in bulk, which is a user-impacting filesystem operation.

Content

No source excerpt is available for this finding.