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
- Seedance 2.0 unlimited for $5: Dreamina CLI lets your agent run video generation end-to-end — Aiden_Tech_Ai · 2026-11-30
- Business-prose model open-sourced: trained on a single 96GB GPU, all quant formats in one repo — IridiumEagle · 2026-11-30
- Devs say vibe-coding workflow is draining the joy of programming — weskambale · 2026-11-30
- Slipwing: Open-Source Windows MCP Server Lets Agents Drive Chrome and Desktop Apps in the Background — Sudden_Analysis8617 · 2026-11-30
- ByteDance's TRAE launches TRAE Bao: a cloud-based coding assistant you control from your phone — xiaohu · 2026-11-30
- 19 GitHub Actions Runner Providers Benchmarked: Speed and Cost, Updated Weekly — DanielLockyer · 2026-11-30