feat: WSL 2.9.3 support, wslc cleanup, and .wslconfig experimental sections (v1.9.0) - #20
Open
gvtret wants to merge 3 commits into
Open
feat: WSL 2.9.3 support, wslc cleanup, and .wslconfig experimental sections (v1.9.0)#20gvtret wants to merge 3 commits into
gvtret wants to merge 3 commits into
Conversation
added 3 commits
June 26, 2026 13:47
Addresses five security findings from an audit of the WSL command-execution
layer, plus a rendering-consistency fix:
1. Command injection via distro name (detectTools) — replaced the lone
execSync shell-string with execFileSync('wsl', [...]).
2. Path injection in disk scan (scanDiskUsage, runs as root) — the treemap
target path is now shell-quoted via a new shellQuote helper.
3. Predictable temp-script names — helper scripts (several run as root in WSL)
now use random filenames via uniqueTempPath, closing a local TOCTOU/symlink
race and avoiding concurrent collisions.
4. Electron navigation hardening — added setWindowOpenHandler and a
will-navigate guard in main.js.
5. runWslCommand executable allowlist — refuses any command whose executable
isn't `wsl`.
Also: fail-log rendering now uses escapeHtml consistently.
Adds tests/security.test.js (11 regression tests). Full suite: 191 passing.
This branch also carries in-progress reliability work bundled by request:
UTF-16 output decoding, transient WSL-service-timeout retry, and registry-based
VHDX discovery.
Helper scripts are unlinked when their process closes, but an orphaned WSL
process can leave one behind; with random names these would slowly accumulate.
Adds sweepTempScripts() — removes wsl-cleaner-*.{sh,ps1,log} older than 1h from
the temp dir — and calls it once on app startup.
Adds 4 regression tests (age threshold, ext filtering, foreign-file safety,
missing-dir tolerance). Full suite: 195 passing.
…ctions (v1.9.0) Add WSL Containers (wslc) prune task, Health dashboard card, and WSL version detection with UTF-16/locale fallback. Fix .wslconfig editor to write experimental keys under [experimental], add Consomme networking mode, and correct wslc-prune command flags. Includes backward-compat tests and vscode-old-bins/git-gc fixes. 225 tests passing.
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.
Summary
Test plan
pm test\ (225 passing)
pm run build\ produces \WSL Cleaner Setup 1.9.0.exe\
See \docs/MR-wsl-2.9.3-support.md\ for full details.