{"version":"2.1.332","anchor":"git-read-sandbox-hardening","canonical_anchor":"git-read-sandbox-hardening","heading":"Git reads now run in a locked-down environment","tier":"internal","area":"Git","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/git-read-sandbox-hardening","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### Git reads now run in a locked-down environment\n\nClaude Code now reads from git in a restricted environment and refuses when git could be pointed at another folder\n\n**What**\n\nClaude Code now prepares a restricted environment for the git commands it uses to read repositories:\n\n- `GIT_QUARANTINE_PATH` is set\n\n- `GIT_OPTIONAL_LOCKS=0` is set, so reading does not take optional locks on the repository\n\n- `core.alternateRefsCommand` is emptied, so it cannot run a program\n\n- alternates, git's way of borrowing objects from other repositories, are checked, along with the repository's layout\n\nIf git could be made to use another folder as the repository, Claude Code refuses with a message saying so.\n\n**Why**\n\nThis protects you against repositories set up to make git do something harmful when Claude Code reads from them.\n\n- Area: Git\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}