Folder Trust ships disabled by default — is honoring a cloned repo's .gemini/settings.json (incl. trust:true MCP servers) the intended default posture?

Aperta
#30,388 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
18/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli, security

Direzione di ricerca

The question is a design-posture question about whether Trusted Folders should be on by default, not a code change. Start with the Trusted Folders and configuration reference docs the issue quotes, and check how the CLI loads workspace .gemini/settings.json, .env files and mcpServers trust entries when the feature is disabled. Done means a maintainer answers whether the default is intentional, with a pointer to any prior decision, or the settings docs are updated to state the default posture.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

status/need-triage

I built RepoGrant, an offline verifier that computes the effective authority a repository's agent configuration grants, per tool, under each tool's documented semantics. Part of the work is a pinned audit of the tools' documented defaults (Claude Code, Codex, Cursor, Copilot, Gemini CLI), and one Gemini CLI entry stands out as worth asking about directly.

Per the docs (Trusted Folders):

"The Trusted Folders feature is disabled by default."

With the feature on, an untrusted folder gets a safe mode:

"Workspace settings are ignored: The CLI will not load the .gemini/settings.json file from the project."
"Environment variables are ignored: … not load any .env files"

But because the feature is off by default, by default a cloned repository's .gemini/settings.json and .env are honored — the safe mode only exists once a user has opted in. This composes with one more documented default: an mcpServers entry in that same settings file can set trust: true, which per the configuration reference "bypasses all tool call confirmations for this server". So on a default install, cloning a repo can mean its committed MCP server runs tool calls with no confirmation, and no trust prompt ever appears, because the trust layer itself is opt-in.

For scale: in a field audit of 120 public repositories carrying agent configs (aggregates published in the RepoGrant repo), 26 carried .gemini/settings.json — every one of them in the honored-by-default class on a default install. Neighbouring tools put repo-carried config behind some form of trust decision (e.g. Codex reviews repo hooks per-hash before they run), which is what made this default read as a possible outlier rather than a convention.

Question: is disabled-by-default the intended posture — i.e., is safe mode meant as an opt-in hardening step, with cloned-repo config honored by default? If this was already discussed and decided, a pointer is enough and I'll update RepoGrant's defaults matrix to cite the decision. If it wasn't a deliberate trade-off, the settings documentation may be the cheapest place to surface it.

The full semantics register behind this (verbatim quotes + citations for all five tools) is in the repo: https://github.com/NagaYu/repogrant/blob/main/SEMANTICS.md — happy to be corrected if any of it misreads the docs.

Lingua principale
TypeScript
Stelle
109k
Fork
15k
Merge medio
1g 24m
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google-gemini/gemini-cli

Tutte le issue di google-gemini/gemini-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.