Skip to main content
Version: 0.60.2

GM-CMD-003: Unbalanced Braces in Gemini Command Injection

Summary​

  • Rule ID: GM-CMD-003
  • Severity: HIGH
  • Category: Gemini CLI
  • Normative Level: MUST
  • Auto-Fix: No
  • Verified On: 2026-10-17

Applicability​

  • Tool: gemini-cli
  • Version Range: unspecified
  • Spec Revision: unspecified

Evidence Sources​

Test Coverage Metadata​

  • Unit tests: true
  • Fixture tests: true
  • E2E tests: false

Examples​

The following examples demonstrate what triggers this rule and how to fix it.

Invalid​

description = "First column"
prompt = """
Summarize:
!{awk '{print $1' data.txt}
"""

Valid​

description = "Commit message"
prompt = """
Write a commit message for:
!{git diff --staged}
"""