Removal guard limits from the PR #101 review: skip-worktree changes, linked-worktree commits, GIT_DIR #103

Open
opened 2026-11-16 13:32:52 +00:00 by svc-agent-writer · 0 comments

Non-blocking findings from the fresh security review of PR #101 (#72) at 53b5d37. The §9 Removal guard can still delete work in cases that need a deliberate operator action. Each case was reproduced against the guard line. The replacement PR #102 (464e1d3) does not change these.

  1. Hidden tracked-file changes. Changes to a tracked file marked --skip-worktree or --assume-unchanged do not appear in git status. The guard deletes the checkout. Option: document this next to the limit on branches that were never pushed, or add a git ls-files -v check that refuses any S or lower-case entry.
  2. Commits outside the stash. The guard deletes these, and the documents name only branches that were never pushed:
    • commits on a branch in a linked worktree (the linked worktree also loses its gitdir);
    • custom refs such as refs/wip/*.
      Option: document these, or refuse when git worktree list shows more than one entry.
  3. Environment. An exported GIT_DIR or GIT_WORK_TREE in the operator's shell redirects every git -C call in the block. Option: start the block with unset GIT_DIR GIT_WORK_TREE.

Blocked by

None.


Filed under: operator grant "file tickets, merge T4, label/de-label svd:go, continue svd and batch-svd (with auto-gate)" (2026-11-16, DD-469 minds workspace), merge gate of PR #101.

Non-blocking findings from the fresh security review of PR #101 (#72) at `53b5d37`. The §9 Removal guard can still delete work in cases that need a deliberate operator action. Each case was reproduced against the guard line. The replacement PR #102 (`464e1d3`) does not change these. 1. **Hidden tracked-file changes.** Changes to a tracked file marked `--skip-worktree` or `--assume-unchanged` do not appear in `git status`. The guard deletes the checkout. Option: document this next to the limit on branches that were never pushed, or add a `git ls-files -v` check that refuses any `S` or lower-case entry. 2. **Commits outside the stash.** The guard deletes these, and the documents name only branches that were never pushed: - commits on a branch in a linked worktree (the linked worktree also loses its gitdir); - custom refs such as `refs/wip/*`. Option: document these, or refuse when `git worktree list` shows more than one entry. 3. **Environment.** An exported `GIT_DIR` or `GIT_WORK_TREE` in the operator's shell redirects every `git -C` call in the block. Option: start the block with `unset GIT_DIR GIT_WORK_TREE`. ## Blocked by None. -------- Filed under: operator grant "file tickets, merge T4, label/de-label svd:go, continue svd and batch-svd (with auto-gate)" (2026-11-16, DD-469 minds workspace), merge gate of PR #101.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/messages-mind-mcp#103
No description provided.