Back to skill

Security audit

gemini-delegation

Security checks for vulnerabilities and agentic risk

Overview

This Markdown-only skill explains how to use Gemini CLI for delegated analysis, with some credential and trigger-scope cautions but no hidden execution or persistence.

Install only if you intend to use Gemini CLI for delegated code or document analysis. Be deliberate about which files you include with @path or recursive globs, confirm the Gemini account/model and cost before running commands, and handle GEMINI_API_KEY through safer local secret practices rather than exposing it in shared terminals or persistent shell history.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 75)May include surrounding context.

md
gemini -p "@src/**/*.py Summarize these files"

# With specific model
gemini --model gemini-2.5-pro-exp -p "..."

# JSON output
gemini --output-format json -p "..."

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list contains generic terms like "gemini", "cli", "delegation", and "google" without narrowing context or exclusion conditions. These words are broad enough to overlap with ordinary discussion, making activation boundaries unclear.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation instructs users to export a GEMINI_API_KEY directly in the shell without warning about shell history, process environment exposure, or safer secret-management practices. In agent and CLI-heavy environments, this can lead to accidental credential leakage to logs, subprocesses, shared shells, or screenshots, making the issue contextually more dangerous.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.