Working habits
Settings can’t cover everything, so these habits cover the rest:
- Read untrusted content first: instruction-like text in an issue, pull request, README or web page is the attack.
- Treat changes to
.gemini/,GEMINI.mdand workflows as security events, whether you or the agent made them. - Keep production credentials out of your environment: an agent can’t misuse a token it can’t see.
- Never set
GEMINI_SANDBOX=falseorGEMINI_CLI_TRUST_WORKSPACE=truein your shell profile. - Put project rules in
GEMINI.md: they shape the code Gemini writes, but only trust, confirmations, policies and the sandbox enforce anything.