What
A git worktree is an extra checkout of a repository in another folder. Its .git is a small pointer file saying where the real git data lives. The sandbox, the walled-off area that limits what commands can read and write, now treats these pointer files more carefully:
- Pointer files are read with
O_NOFOLLOW, so a symbolic link (a file that points to another file) is not followed. - The
gitdirandworktreespaths are compared to check that they name the same folder. - When the paths do not spell the real ones, a warning is logged that points you to
git worktree repair. - A refusal of a path that goes through a per-process name is also recorded.
- The sandbox setup tracks a new
worktreePointerReadHardeningAppliedstate, with abuiltConfigWorktreePointersHardenedcache, alongside the existing worktree and common-dir.gitguards. It appears to add another rule that blocks reading worktree pointer files.
The finding's title also mentions small glab and AWS tweaks, which it does not describe.
Why
This tightens the sandbox against link tricks aimed at worktree git data. If you use worktrees and see a warning about paths that do not match, running git worktree repair fixes the pointer files.