Back to skill

Security audit

Gemini Image Remix

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it uses Gemini to generate or edit images, with some disclosed credential, privacy, and dependency-management risks users should understand.

Install only if you are comfortable sending prompts and any selected images to Gemini/Google. Use GEMINI_API_KEY rather than --api-key, avoid confidential or regulated images unless approved, and prefer running in an environment with pinned dependencies or a reviewed lockfile.

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 (2)

T08 · Insecure Dependencies

Warning
Location
scripts/remix.py:2
Finding

Unpinned Third-Party Dependencies Are Resolved at Runtime

Content
View full analysis
=3.10" # dependencies = [ # "google-genai>=1.0.0", # "pillow>=10.0.0", # ] # /// ``` The documented execution method invokes the script through `uv run`: ```bash uv run {baseDir}/scripts/remix.py --prompt "a cybernetic owl in a neon forest" --filename "owl.png" ``` ### Technical Analysis The inline dependency declarations use open-ended `>=` constraints. No dependency lockfile, exact version constraints, or package hashes are present in the audited project. Consequently, `uv run` may resolve and install future releases from the configured package index without those releases having been reviewed as part of this Skill. The dependency names are consistent with the declared image-processing functionality, and the audit found no evidence that the currently declared packages are intentionally malicious. The security weakness is the absence of reproducible and integrity-controlled dependency resolution. A compromised package publisher account, malicious future release, compromised package index, or unsafe alternate index configuration could cause attacker-controlled Python code to be installed and subsequently imported. ### Attack Path 1. An attacker compromises a declared dependency's publishing account, its release infrastructure, or a package index trusted by the runtime. 2. The attacker publishes a malicious version that satisfies `google-genai>=1.0.0` or `pillow>=10.0.0`. 3. A user invokes the documented `uv run` command in an environment without a reviewed, immutable lock state. 4. `uv` resolves and installs the malicious compatible release. 5. The script imports the affected dependency: ```python from google import genai from google.genai import types from PIL import Image as PILImage `` ...[truncated 605 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/remix.py:34
Finding

Gemini API Key Can Be Exposed Through Command-Line Arguments

Content
View full analysis
str | None: if provided_key: return provided_key return os.environ.get("GEMINI_API_KEY") ``` ### Technical Analysis The `--api-key` option permits a sensitive Gemini credential to be placed directly in the process command line. Depending on the operating system and execution environment, process arguments may be exposed through process inspection utilities, process metadata, shell history, job-runner logs, terminal recording, monitoring products, or command telemetry. Although the script also supports the safer `GEMINI_API_KEY` environment variable, a command-line credential takes precedence. The public option documentation therefore enables users or automation to select the less secure secret-delivery mechanism. The key is not hardcoded, printed directly, or intentionally transmitted to an unrelated service. It is passed to the declared Google Gemini client. The finding is limited to incidental local or operational disclosure caused by command-line handling. ### Attack Path 1. A user or automation system invokes the script with a command such as: ```bash uv run scripts/remix.py --prompt "example" --filename "out.png" --api-key "SECRET_VALUE" ``` 2. The complete command is retained in shell history, execution logs, telemetry, or process metadata. 3. Another local principal, administrator, log reader, monitoring operator, or compromised process with a ...[truncated 675 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

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 · SKILL.md (reported line 58)May include surrounding context.

Switch to advanced models like Nano Banana Pro for high-fidelity work.

bash
uv run {baseDir}/scripts/remix.py --model "gemini-3-pro-image-preview" --prompt "highly detailed oil painting of a dragon" --filename "dragon.png"

Options

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares environment-variable requirements and invokes local code, but it does not define an explicit tool scope such as permissions or allowed-tools. That creates ambiguity about what execution capabilities the skill expects, increasing the chance of over-broad runtime access or unsafe execution in hosts that rely on declared scope for enforcement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill encourages users to submit prompts and local input images to Gemini services but does not warn that this content is transmitted to a third-party provider for processing. Users may unknowingly send sensitive images, personal data, or confidential prompts off-device, creating privacy, compliance, and data-handling risks.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.