Version 0.39.1 introduces security controls for Gemini CLI in headless mode. When running Gemini CLI in CI (GitHub Actions), operators must determine if workflows operate on trusted or untrusted data.
| Data Trust Level | Required Configuration |
|---|---|
| Fully Trusted Data (repo owners, collaborators) | Set GEMINI_CLI_TRUST_WORKSPACE=true |
| Untrusted Data (issues/PRs from non-collaborators) | Harden workflow, then set environment variable |
For untrusted data processing:
- Use minimal GitHub token permissions (least privilege)
- Prefer minimal tool sets:
list_directory,read_file,grep_search - Allowlist commands only if necessary; avoid dangerous functionality
- Do not rely on
--yolomode without explicit tool allowlists
The patch removes automatic folder trust — folders must be explicitly trusted before loading configuration files.