Gemini CLI env sanitization could break every git call; PR restores GIT_CONFIG consistency
Shivansh1980 · ghdev · 2026-08-21
A PR against google-gemini/gemini-cli fixes sanitizeEnvironment() emitting a GITCONFIG environment that git refuses to parse — git aborts on a malformed directive rather than skipping it, so every git invocation through the sanitized environment fails.
Root cause: secret-redaction checks run before the GITCONFIG exemption (locked in by security tests). When a GITCONFIGVALUEn carrying a credential is dropped, its GITCONFIGKEYn and the declared GITCONFIGCOUNT survive, leaving a fatal gap. Realistic triggers: url.<base>.insteadOf rewrites with embedded credentials and http.extraheader bearer tokens; also fires under strict CI sanitization (GITHUBSHA set).
Second path: parseInt on an inherited non-numeric GITCONFIGCOUNT yields NaN, so overrides land on GITCONFIGKEYNaN. Fix touches environmentSanitization.ts and friends.
More from coding & agent
- Open-source AIUsage: one dashboard for quotas, costs and accounts across 12+ AI subscriptions — tom_doerr · 2026-08-21
- Stanford researcher: automated orchestrators are a big unlock, current versions not there yet — anshulkundaje · 2026-08-21
- CopilotKit open-sources OpenBot: AI coworkers that each get their own computer — Roger_M_Taylor · 2026-08-21
- Ornith 1.5 35B Q5 runs locally inside GitHub Copilot on a Mac M3 Max — DanWahlin · 2026-08-21
- Developer ditches MacBook Pro, moves all agentic work to a Linux machine — Rasmic · 2026-08-21
- Building an AI-native email client on Cloudflare Email, Workers and AI Gateway — ritakozlov · 2026-08-21