security-scan

Scan Gemini CLI configuration files for security vulnerabilities and misconfigurations.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill security-scan-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-scan
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/security-scan
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill security-scan-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces the risk of secret leaks, prompt-injection abuse, and unsafe tool or hook behavior in Gemini CLI projects by auditing your local configuration before deployment.

Core Features & Use Cases

  • Configuration security audit for Gemini CLI: Detects hardcoded secrets, dangerous auto-run instructions, and prompt-injection patterns in GEMINI.md and related config files.
  • Risk scanning across common attack surfaces: Reviews settings.json permissions/allow-lists, MCP server definitions, and hooks/agent files for command injection and overly broad tool access.
  • Actionable, automatable hardening: Produces severity-graded reports and can apply safe auto-fixes (e.g., replacing hardcoded secrets with environment references and tightening wildcard permissions).

Use case: Before committing a new or updated .gemini/ setup, run this scan to catch critical issues like hardcoded tokens, unsafe shell access (e.g., Bash allow-list entries), and hook interpolation that could enable command injection.

Quick Start

Run a security audit of your repository’s Gemini CLI configuration by telling the agent: scan the current project’s .gemini/ directory for vulnerabilities and misconfigurations.

Frequently Asked Questions about security-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan my Gemini CLI configuration for prompt injection vulnerabilities?

You can scan for prompt injection risks by auditing your local .gemini directory. The scan detects security vulnerabilities, misconfigurations, and injection patterns in GEMINI.md and settings.json before deployment.

How do I check my .gemini settings for hardcoded secrets before committing?

Checking your .gemini settings for hardcoded secrets involves running a configuration security audit. It identifies hardcoded tokens in GEMINI.md and can apply safe auto-fixes, replacing them with environment references before you commit.

Can I use this security scan to tighten wildcard permissions in settings.json?

Yes, you can use this security scan to tighten wildcard permissions in settings.json. It reviews permissions and allow-lists for overly broad tool access and can automatically apply safe fixes to harden your configuration.

Does this audit detect command injection in MCP server definitions and hooks?

Yes, the audit detects command injection risks in MCP server definitions and hooks. It reviews agent files and hook interpolation across common attack surfaces to prevent unsafe shell access and command execution.

What is the best way to gate CI merges for Gemini CLI misconfigurations?

The best way to gate CI merges for Gemini CLI misconfigurations is to run this scan as a pre-merge validation step. It produces severity-graded reports to block deployments if critical security issues are found in your .gemini setup.

Why does my Gemini CLI hook interpolation trigger a command injection warning?

Your Gemini CLI hook interpolation triggers a command injection warning because the scan detects unsafe shell access patterns. It identifies dangerous hook interpolation that could enable malicious command execution during agent operations.