Skip to contentSecurity for Gemini Development: Three principles
How to control it
Three principles
- Trust deliberately: keep folder trust on, and never trust a workspace in CI that outsiders can change.
- Keep confirmations, and back them with a sandbox: disable YOLO mode, keep
tools.allowed to read-only commands, and turn sandboxing on.
- Treat what Gemini loads as code:
.gemini/, .env, GEMINI.md, MCP entries, hooks and extensions all run or instruct, so review them like a pull request.