Path recovery materializes a working tree itself (rename and skip choices for Windows-invalid paths) instead of using a git checkout. That code does its own file writes and deletes, and it is less careful than a checkout:
the list of previously written files in .git\gclo-recovery.json is used as-is to decide what to delete;
a path segment named .git is not treated as invalid;
writes follow existing links in the working tree;
cleanup of a failed clone follows directory links while clearing attributes.
Scope
One internal, fully tested WorkingTree helper for every write and delete the recovery does: the target must resolve inside the working directory, must not be in a .git folder, and must not be reached through a link; an existing file is replaced, never written through.
Validate the recovery file's stored paths when it is loaded; a file that lists a path outside the repository fails with a message that says how to rebuild it.
WindowsPathValidator: .git (any letter case) and its short-name alias are invalid segments, with a suggested replacement.
Cleanup of a failed clone does not follow links.
Threat model updated.
Acceptance
Tests for each rule, including a directory link inside the working tree and a recovery file with a path outside it. 100% line coverage holds; zero warnings; format clean.
## Problem
Path recovery materializes a working tree itself (rename and skip choices for Windows-invalid paths) instead of using a git checkout. That code does its own file writes and deletes, and it is less careful than a checkout:
- the list of previously written files in `.git\gclo-recovery.json` is used as-is to decide what to delete;
- a path segment named `.git` is not treated as invalid;
- writes follow existing links in the working tree;
- cleanup of a failed clone follows directory links while clearing attributes.
## Scope
- One internal, fully tested `WorkingTree` helper for every write and delete the recovery does: the target must resolve inside the working directory, must not be in a `.git` folder, and must not be reached through a link; an existing file is replaced, never written through.
- Validate the recovery file's stored paths when it is loaded; a file that lists a path outside the repository fails with a message that says how to rebuild it.
- `WindowsPathValidator`: `.git` (any letter case) and its short-name alias are invalid segments, with a suggested replacement.
- Cleanup of a failed clone does not follow links.
- Threat model updated.
## Acceptance
Tests for each rule, including a directory link inside the working tree and a recovery file with a path outside it. 100% line coverage holds; zero warnings; format clean.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Path recovery materializes a working tree itself (rename and skip choices for Windows-invalid paths) instead of using a git checkout. That code does its own file writes and deletes, and it is less careful than a checkout:
.git\gclo-recovery.jsonis used as-is to decide what to delete;.gitis not treated as invalid;Scope
WorkingTreehelper for every write and delete the recovery does: the target must resolve inside the working directory, must not be in a.gitfolder, and must not be reached through a link; an existing file is replaced, never written through.WindowsPathValidator:.git(any letter case) and its short-name alias are invalid segments, with a suggested replacement.Acceptance
Tests for each rule, including a directory link inside the working tree and a recovery file with a path outside it. 100% line coverage holds; zero warnings; format clean.