25 of 31 checked automatically

How to use it

  • Once at setup, work through sections A to G.
  • Fix every P1 item before doing any work on company code. P2 items close important gaps; P3 items are good practice.
  • Items with an audit check ID are verified automatically by the Gemini Security Audit. Re-run it monthly and after every upgrade. Items without one are confirmed by hand.
  • Keep the completed checklist with your saved audit report as your assessment record.

A. Installation and identity

#CheckPriorityAudit check
A1Gemini CLI is 0.39.1 or later (CVE-2026-12537), and the Code Assist extension is current.P1I01
A2Work runs under your organisation's Code Assist Standard or Enterprise licence, so its admin controls apply.P1manual
A3On Windows, C:\ProgramData\gemini-cli exists and only administrators can write it.P1W01, W02

B. Sandbox, trust and approvals

#CheckPriorityAudit check
B1Sandboxing is on (tools.sandbox or security.toolSandboxing), with a strict Seatbelt profile or a container on macOS.P1G02
B2Folder trust is on (security.folderTrust.enabled).P1G03
B3security.disableYoloMode is true.P2G04
B4general.defaultApprovalMode is "default", not auto_edit.P2G05
B5tools.allowed lists only read-only commands, never the bare run_shell_command.P1G06
B6The sandbox has no network access, and approvals don't last across sessions.P2G07, G08
B7Gemini Code Assist geminicodeassist.agentYoloMode is off.P1C01

C. Policies and hooks

#CheckPriorityAudit check
C1Policy rules in ~/.gemini/policies/ deny destructive commands and ask before pushes and network commands.P2R01
C2No policy rule allows run_shell_command without a narrow commandPrefix.P1R01
C3No hook downloads or runs remote code.P1H01
C4No alias or export adds --yolo, --skip-trust, GEMINI_SANDBOX=false or GEMINI_CLI_TRUST_WORKSPACE=true.P1S01

D. Extensions: MCP servers and extensions

#CheckPriorityAudit check
D1Every MCP server is approved and pinned to a version.P1M01, M03
D2No MCP server has "trust": true.P1M04
D3Servers that read content outsiders write have read-only scopes, and their secrets come from environment variables.P2M02, M05
D4Extensions are restricted with security.allowedExtensions or blockGitExtensions, and each installed one is reviewed.P2G09, E01, E02

E. Repositories

#CheckPriorityAudit check
E1Before trusting a folder, its .gemini/settings.json is read for sandbox, allowed tools, hooks and trusted MCP servers.P1P01, P02, P03, P04, P05, P06, P07
E2The project .env sets no GEMINI_* variables such as GEMINI_SANDBOX.P1P08
E3GEMINI.md and AGENTS.md are read and checked for hidden Unicode.P1P09, P10
E4Symlinks are listed and none points at .gemini/ or a dotfile.P1P13
E5Repositories that arrive with their own .git/config are checked for program-running keys.P2P14
E6.env files are gitignored.P2P12

F. GitHub Actions

#CheckPriorityAudit check
F1run-gemini-cli is 0.1.22 or later and pinned by commit SHA.P1P11
F2Workflows never run Gemini with --yolo on issues or pull requests from outsiders.P1P11
F3Workflows hold only the permissions and secrets they need.P1manual

G. Working habits

#CheckPriorityAudit check
G1Instruction-like text in issues, pull requests, READMEs and web pages is read by a person before Gemini acts on it.P1manual
G2Changes to .gemini/, GEMINI.md and workflows are treated as security events.P1manual
G3No production credentials in the environment Gemini runs in.P1manual
G4Suspicious agent behaviour is reported to the security team the same day.P2manual

Sources

Informational only, with no guarantee of a vulnerability-free setup, so test every configuration in your own environment. AISecurityLabs.org is independent and not affiliated with Google. Settings change as Gemini CLI evolves, so check them against the reference for your version.