When a folder with a repository's name already exists under the target, gclo pulls it through whatever origin that folder has. It never checks that the folder is a clone of the repository the listing returned, so:
a same-named folder from another organization, a fork, or another host is reported Updated although the listed repository was not synced;
the git transport is not tied to the host the listing came from.
The WSL recovery clone has the same looseness: its organization and repository arguments are not checked to be single path segments, and its credential setup is not tied to the clone URL's host.
Scope
IGitClient.FetchAndPullAsync takes the expected clone URL. A folder whose origin names a different repository fails its row with a message that says what the folder holds and what was expected; nothing is fetched.
Fetches use the listed URL; credentials are offered only to that URL's host over HTTPS.
WslCloner: validate the organization and repository as single segments, require an HTTPS URL, scope the credential helper to the URL's host, and check an existing destination's origin before pulling.
Reject an organization name that is not a single name segment before any request is made.
Threat model updated in the same change.
Acceptance
Tests: a folder with a different origin fails and is not fetched; an SSH-form origin of the same repository still syncs; credentials are refused for any other host or for HTTP; WSL argument and script checks.
100% line coverage holds; zero warnings; format clean.
## Problem
When a folder with a repository's name already exists under the target, gclo pulls it through whatever `origin` that folder has. It never checks that the folder is a clone of the repository the listing returned, so:
- a same-named folder from another organization, a fork, or another host is reported **Updated** although the listed repository was not synced;
- the git transport is not tied to the host the listing came from.
The WSL recovery clone has the same looseness: its organization and repository arguments are not checked to be single path segments, and its credential setup is not tied to the clone URL's host.
## Scope
- `IGitClient.FetchAndPullAsync` takes the expected clone URL. A folder whose `origin` names a different repository fails its row with a message that says what the folder holds and what was expected; nothing is fetched.
- Fetches use the listed URL; credentials are offered only to that URL's host over HTTPS.
- `WslCloner`: validate the organization and repository as single segments, require an HTTPS URL, scope the credential helper to the URL's host, and check an existing destination's origin before pulling.
- Reject an organization name that is not a single name segment before any request is made.
- Threat model updated in the same change.
## Acceptance
- Tests: a folder with a different origin fails and is not fetched; an SSH-form origin of the same repository still syncs; credentials are refused for any other host or for HTTP; WSL argument and script checks.
- 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
When a folder with a repository's name already exists under the target, gclo pulls it through whatever
originthat folder has. It never checks that the folder is a clone of the repository the listing returned, so:The WSL recovery clone has the same looseness: its organization and repository arguments are not checked to be single path segments, and its credential setup is not tied to the clone URL's host.
Scope
IGitClient.FetchAndPullAsynctakes the expected clone URL. A folder whoseoriginnames a different repository fails its row with a message that says what the folder holds and what was expected; nothing is fetched.WslCloner: validate the organization and repository as single segments, require an HTTPS URL, scope the credential helper to the URL's host, and check an existing destination's origin before pulling.Acceptance