{"version":"2.1.331","anchor":"git-commands-for-unattended-watch-refuse-risky-repo-config-a","canonical_anchor":"git-commands-for-unattended-watch-refuse-risky-repo-config-a","heading":"Locked-down git environment for an unattended watch","tier":"notice","area":"Watches","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/git-commands-for-unattended-watch-refuse-risky-repo-config-a","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Locked-down git environment for an unattended watch\n\nNew code runs git and gh for an unattended watch in a hardened environment that refuses risky repository settings and unsafe PATH entries\n\n**Unclear.** It is not clear which feature runs these unattended watches or whether it is available to readers yet.\n\n**What**\n\nNew code prepares a locked-down environment for running `git` and `gh` (GitHub's command-line tool) during what its messages call \"an unattended watch\", meaning a run with no person present. It:\n\n- Refuses repository-local git settings such as aliases, hooks, `includeIf` and `include.path`, with messages like \"this repository's own git settings include another file (include.path)\"\n\n- Checks `PATH`, the list of folders searched for programs, and refuses entries that can be written to, including folders inside the checkout or the temp folder\n\n- Forces `GIT_ALLOW_PROTOCOL`, where earlier Claude Code only removed it from the environment it passes to git\n\n- Clears environment variables that carry credentials\n\n- Reads tokens such as `GITLAB_TOKEN` and `AWS_SECRET_ACCESS_KEY`, which the finding took to be for hiding them from output\n\nOne of the path checks is chosen by the switch `bot_protected_tengu_amber_marten`, called with `{safe:!0}`. Nothing has been read about `tengu_amber_marten`, and no code was found that starts the watch.\n\n**Why**\n\nA repository's own git settings and a tampered `PATH` can make git run unexpected programs. Refusing them matters most when nobody is watching the run, such as a watcher for pull requests or CI that works on code from others.\n\n- Area: Watches\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}