fix(docker): Windows paths not being converted into linux while being run in WSL#366
Merged
junaid2005p merged 14 commits intomainfrom Apr 13, 2026
Merged
fix(docker): Windows paths not being converted into linux while being run in WSL#366junaid2005p merged 14 commits intomainfrom
junaid2005p merged 14 commits intomainfrom
Conversation
| FROM alpine:3.21 AS downloader | ||
|
|
||
| RUN apk add --no-cache ca-certificates curl jq | ||
| RUN apk add --no-cache ca-certificates curl jq tar |
Contributor
There was a problem hiding this comment.
jq installed but no longer used
jq was needed to parse the GitHub API response when auto-fetching the latest version. Since version auto-detection was removed, jq is no longer used anywhere in this stage and can be dropped to keep the image lean.
Suggested change
| RUN apk add --no-cache ca-certificates curl jq tar | |
| RUN apk add --no-cache ca-certificates curl tar |
Prompt To Fix With AI
This is a comment left during a code review.
Path: docker/Dockerfile
Line: 3
Comment:
**`jq` installed but no longer used**
`jq` was needed to parse the GitHub API response when auto-fetching the latest version. Since version auto-detection was removed, `jq` is no longer used anywhere in this stage and can be dropped to keep the image lean.
```suggestion
RUN apk add --no-cache ca-certificates curl tar
```
How can I resolve this? If you propose a fix, please make it concise.…ath projection fails
… root on non-Windows hosts
SuperCoolPencil
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
This PR fixes Windows absolute paths (drive letters and UNC) sent by WSL clients not being mapped to the server-side Linux download directory. It introduces
IsWindowsAbsPath,MapWindowsPathToDefaultDir, andmapClientWindowsPathwith segment-name matching and..traversal rejection, and adds corresponding tests. The change is correct and addresses the previously raised silent-fallthrough concern.The PR bundles several unrelated improvements — a Docker multi-stage build refactor with a non-root user, updated
compose.yml, and a new CI tag-based workflow trigger — alongside the core path fix; these should ideally be separate PRs per the project's contribution guidelines.Confidence Score: 5/5
Safe to merge — all remaining findings are P2 style/test suggestions with no blocking correctness or security issues.
The core path-mapping logic is correct, traversal attacks are rejected in MapWindowsPathToDefaultDir, and the previously raised silent-fallthrough concern is addressed by the new fallback mechanism. All open comments are non-blocking P2 improvements.
docker/compose.yml — the user field may silently default to 1000:1000 in most environments.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Client sends DownloadRequest] --> B{IsWindowsAbsPath?} B -- No --> C{RelativeToDefaultDir?} B -- Yes --> D[mapClientWindowsPath] C -- Yes --> E[Join baseDir + reqPath] C -- No --> F[EnsureAbsPath reqPath] D --> G{MapWindowsPathToDefaultDir matches?} G -- Yes --> H[Return baseDir/suffix] G -- No --> I{shouldFallbackUnmappedWindowsPath?} I -- true --> J[Return filepath.Clean baseDir] I -- false --> K[Return empty, fall through] H --> L[resolveOutputDir returns path] J --> L E --> L F --> L K --> CPrompt To Fix All With AI
Reviews (8): Last reviewed commit: "fix(utils): reject parent traversal segm..." | Re-trigger Greptile
Context used: