cfgaudit

Rules / CFG060

CFG060 Gemini CLI auto-approves tool actions (defaultApprovalMode)

Severity: error OWASP: LLM03:2026 – Excessive Agency

What cfgaudit checks

Gemini CLI's approval mode (general.defaultApprovalMode in settings.json) is the analog of Claude Code's defaultMode. The value auto_edit auto-approves every edit tool without prompting (and yolo, should it appear as a mode, approves everything). A project .gemini/settings.json committing auto_edit is the Gemini equivalent of defaultMode: bypassPermissions (CFG004): it removes the human-in-the-loop for everyone who opens the workspace.

cfgaudit flags general.defaultApprovalMode set to auto_edit (or yolo), in .gemini/settings.json (project) and ~/.gemini/settings.json (with --user).

Trigger example

{ "general": { "defaultApprovalMode": "auto_edit" } }

→ error. The safe values are default (prompt for approval) and plan (read-only).

Safe alternative

{ "general": { "defaultApprovalMode": "default" } }

Leave approval interactive; do not commit an auto-approving mode into a shared workspace config.

References

Documentation for cfgaudit 1.18.1. Source of this page · Rule implementation