Add WSL locations to index#59
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Windows Subsystem for Linux (WSL) home-directory discovery so Bagel’s file index (and downstream secret scanning) can include Linux homes accessible from a Windows host, gated by a new file_index.scan_wsl config flag.
Changes:
- Introduces a new
pkg/wslpackage to enumerate registered WSL distros (Windows) and generate UNC roots for their/homeand/rootdirectories. - Adds
scan_wsltoFileIndexConfigwith a default oftrue, and appends discovered WSL base dirs during file-index construction. - Adds unit tests for UNC candidate ordering and Docker Desktop distro skipping.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/wsl/wsl.go | Defines UNC root candidates and filtering for system/internal distros. |
| pkg/wsl/wsl_windows.go | Implements Windows registry-based distro discovery and UNC reachability probing. |
| pkg/wsl/wsl_other.go | Provides non-Windows no-op stub for WSL discovery. |
| pkg/wsl/wsl_test.go | Adds unit tests for UNC candidate ordering and distro skip logic. |
| pkg/models/config.go | Adds ScanWSL to file index configuration model. |
| pkg/config/config.go | Sets default file_index.scan_wsl to true. |
| pkg/collector/collector.go | Appends WSL-discovered home roots to the file index base directories when enabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fproulx-boostsecurity
approved these changes
Jun 17, 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.
No description provided.