fix: path traversal + vulnerable dependency updates#18
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
…raversal fixes - Run npm audit fix: update simple-git 3.33.0→3.36.0 (RCE), picomatch 2.3.1→2.3.2 (ReDoS/injection), postcss 8.5.8→8.5.15 (XSS) - Add assertPathWithin() helper in sync.ts to guard directory boundaries - Apply path-traversal guards in syncEntry(): validate source path and glob matches stay within cacheDir, validate glob dest files stay within destPath - Apply same guards in determineState() in status.ts"
Copilot
AI
changed the title
fix: resolve security vulnerabilities (dependency updates + path traversal)
fix: path traversal + vulnerable dependency updates
Jun 5, 2026
Copilot created this pull request from a session on behalf of
madkoo
June 5, 2026 11:09
View session
Owner
|
@copilot Should the package.json get updated too with newer versions ? |
Raises the declared lower bound to match the secure version installed by npm audit fix, so fresh installs cannot resolve a vulnerable release.
Author
Good catch. |
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.
Three high/moderate npm vulnerabilities and two path traversal vectors in source handling.
Dependency updates (
npm audit fix)simple-git3.33.0 → 3.36.0 — RCE (GHSA-hffm-xvc3-vprc); minimum version inpackage.jsonbumped to^3.36.0picomatch2.3.1 → 2.3.2 — High: method injection + ReDoS (GHSA-3v7f-55p6-f55p, GHSA-c2c7-rcm5-vvqj)postcss8.5.8 → 8.5.15 — Moderate: XSS (GHSA-qx2v-qp2m-jg93)Note:
picomatchandpostcssare transitive dependencies and cannot be declared inpackage.json; they are locked to safe versions viapackage-lock.json.Path traversal in
sync.ts/status.tspath.join(cacheDir, entry.source)silently normalises..sequences, so a tampered manifest entry likesource: "../../etc/passwd"resolves outside the cache directory — enabling arbitrary file read/write.Added
assertPathWithin(filePath, containingDir, label)and applied it insyncEntry()anddetermineState():Guards cover: non-glob source path, glob base dir, each glob match, and each computed destination file.
status.tsreturns'missing'on violation rather than throwing, consistent with its existing error-handling pattern.