mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-13 12:57:12 -07:00
883f265234
Hide the "Allow for all future sessions" checkbox during exec tool confirmation unless every command in the input passes a strict allowlist. - Introduce safeCommandAllowlist for read-only utilities (ls, cat, grep, etc.) - Introduce editCommandAllowlist for file-mutating commands, gated behind ApprovalMode.AUTO_EDIT - Use getCommandRoots (Wasm parser) to extract all base executables from piped, chained, and wrapped commands - Fail closed: hide checkbox if parser fails or any command root is unknown - Exclude find/awk/sed from safe list (can execute arbitrary commands) Ref: google-gemini/maintainers-gemini-cli#1578