PluginPartly tested (needs an account)

Security check for Gemini

Gemini CLI Security extension

An extension for Gemini CLI that scans the code you wrote and the changes in a pull request for security problems and suggests fixes.

Works with
Gemini CLI
Good for
Security testing, Web developers

What it does

This extension adds two commands to Gemini CLI. An extension is an add-on that gives Gemini CLI new commands. Google's extension team publishes it as open source.

The first command is /security:analyze. It reads the code changes on your current branch. A branch is your own working copy of a project. The command then writes a report of likely security problems. By default it compares your branch with the main version of the project, and it uses git to do this.

The second command is /security:scan-deps. It checks the packages your project uses. A package is code that other people wrote and you reuse. The command compares your packages with OSV.dev, a public database of known security flaws. It uses a tool named OSV-Scanner for this. The report lists which packages are weak, how serious each flaw is, and which version to upgrade to.

The analysis looks for common problem types. These include passwords or keys typed into code, weak encryption, private data written to logs, and injection flaws such as SQL injection and cross-site scripting. It also checks login and password reset logic. It has checks for code that calls AI models.

The README says the report is a first-pass analysis. It is not a full security audit. Use it with other tools and with a human review.

Who it is for

  • People who build a website or app with Gemini CLI and want a quick first check before they publish a change.
  • Teams that already use pull requests and want an automatic check on each one. The README describes a GitHub workflow for this.

Example prompts

  • "/security:analyze"
  • "/security:analyze Analyze all the source code under the scripts folder. Skip the docs, config files and package files."
  • "/security:analyze --json"
  • "/security:scan-deps"
  • "Explain the most serious finding in the report in plain words, then fix it."

How to install

gemini extensions install https://github.com/gemini-cli-extensions/security

How to use it

Open Gemini CLI in your own project and ask it to run a security review of the current changes. Read each finding and decide what to fix. Use it only on code you own.

Check it works

Start gemini in a project folder. Type /security and look for the analyze and scan-deps commands. You can also run this command in your normal terminal.

gemini extensions list

You should see the security extension in the list. The extension needs Gemini CLI version 0.4.0 or newer.

Common problems

  • The command finds nothing to check: the default scope is the difference between your branch and the main branch. Commit your work on a new branch first. Or name a folder in the prompt, as in the example above.
  • You need the report in a script or in a scheduled job: the README says /security:analyze works for interactive use only. Support for runs without a person is planned. The README tracks it as issue 20.
  • The install fails: update Gemini CLI first. Then run the install command again. The README requires version 0.4.0 or newer.
  • The report lists a problem that is not real: this can happen. Read the code yourself before you change it. Ask Gemini to explain why it flagged the line.

What to watch out for

  • Your code is sent to Google's Gemini model for analysis. Do not use it on code that you may not share.
  • Results can include false alarms and can miss real problems.

Licence and author

Licence
Apache-2.0
Author
Google Gemini CLI extensions team
Source code
github.com/gemini-cli-extensions/security

How we tested it

We installed it on an empty test computer on 12 Oct 2026. Partly tested: installed in a clean test system, but its main features need an account or key we did not use.

Test level

Gemini CLI was not installed in the sandbox and no model call was made. The install and the scan were not tested.

Technical details of the test
Date
12 Oct 2026
Method
Cloned the repository in a clean container with no account. The extension file gemini-extension.json is valid JSON and the repository holds 3 skill files that all have a name and a description. We did not install it in Gemini CLI.

Checked again on 12 Oct 2026

Alternatives

  • snyk-agent-scan: scans your installed skills and MCP servers, not your own code.
  • trail-of-bits-skills: security review skills for Claude Code and Codex. They suit people who do not use Gemini CLI.
  • voltagent-quality-security-agents: a pack of reviewer agents for Claude Code, including a security auditor.

FAQ

Does it work with Claude Code or Codex? No. It is an extension for Gemini CLI only.

Does it replace a security audit? No. The README calls the report a first-pass analysis. Combine it with other tools and with human review.

Can I use it on every file, not only the changes? Yes. Ask in plain words, for example to analyse all files in one folder. Name the files to skip.

Does it fix the problems? The command writes a report. You can then ask Gemini to explain a finding or to change the code. Read each change before you accept it.

Is it free? The extension uses the Apache-2.0 licence. Your Gemini CLI account and its limits still apply.

Sources