Skip to content

feat: add Windows support - #16

Open
dcoffi wants to merge 1 commit into
perplexityai:mainfrom
dcoffi:windows-support-pr
Open

feat: add Windows support#16
dcoffi wants to merge 1 commit into
perplexityai:mainfrom
dcoffi:windows-support-pr

Conversation

@dcoffi

@dcoffi dcoffi commented May 24, 2026

Copy link
Copy Markdown

Summary / Resumen

This PR adds full Windows support to Bumblebee. All changes are backward-compatible — existing macOS and Linux behavior is unchanged.


What was added for Windows / Qué se agregó para Windows

Rutas de configuración MCP (Claude, Cursor, VS Code):

  • %APPDATA%\Claude\claude_desktop_config.json — Claude Desktop
  • %APPDATA%\Cursor\User\globalStorage — Cursor MCP settings
  • %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev — Cline (VS Code extension)

Extensiones de navegador:

  • Chrome, Edge, Brave, Vivaldi (Chromium) via %LOCALAPPDATA%\<browser>\User Data
  • Opera via %APPDATA%\Opera Software\Opera Stable
  • Firefox, LibreWolf, Waterfox via %APPDATA%\Mozilla\Firefox\Profiles

Paquetes globales del sistema:

  • Python: %LOCALAPPDATA%\Programs\Python\Python*\Lib\site-packages
  • npm: %APPDATA%\npm\node_modules
  • Ruby: C:\Ruby*\lib\ruby\gems
  • Go: %GOPATH%\pkg\mod (default: %USERPROFILE%\go\pkg\mod)

--all-users en Windows:

  • Enumera C:\Users\* filtrando cuentas de servicio: Default, Public, All Users, $WinREAgent, etc.

Bug fixes para cross-platform:

  • filepath.Join(C:, Users) retorna C:Users (ruta relativa) en Windows — corregido usando drive + sep + Users
  • Tests: setTestHome() ahora setea tanto HOME como USERPROFILE en Windows
  • scanner_test.go: usa filepath.ToSlash() para comparar paths con strings.Contains

goreleaser:

  • Agrega targets windows/amd64 y windows/arm64
  • Formato de release para Windows: .zip (en lugar de .tar.gz)

Documentación:

  • GUIA_BUMBLEBEE.md y GUIA_BUMBLEBEE.pdf: guía paso a paso en español para Windows, Linux y macOS

Test plan

  • go test ./... passes on Windows (all 19 packages)
  • bumblebee selftest returns selftest OK on Windows
  • bumblebee roots --profile baseline lists Windows paths (AppData, Chrome, Edge, VS Code extensions)
  • bumblebee scan --profile baseline produces valid NDJSON on Windows
  • go test ./... still passes on Linux/macOS (no regression)
  • goreleaser builds bumblebee_windows_amd64.zip and bumblebee_windows_arm64.zip

Notes

  • os.UserHomeDir() already returns C:\Users\<user> on Windows via USERPROFILE — no change needed
  • VS Code/Cursor/Windsurf extensions use ~\.vscode, ~\.cursor, ~\.windsurf on Windows too — already covered by existing home-relative paths
  • The critical filepath.Join(C:, Users) bug returns C:Users (relative path on drive C) on Windows — fixed with explicit separator

Generated with Claude Code

- Add case windows to all runtime.GOOS switches in cmd/bumblebee/roots.go
- Windows MCP configs: %APPDATA%\Claude, Cursor, VS Code/Cline
- Windows browsers: Chrome, Edge, Brave, Vivaldi, Opera, Firefox, LibreWolf
- Windows Python site-packages via LOCALAPPDATA\Programs\Python\Python*
- Windows npm global modules via %APPDATA%\npm\node_modules
- Windows Ruby gems via C:\Ruby*\lib\ruby\gems
- Windows Go module cache via %GOPATH%\pkg\mod (default %USERPROFILE%\go)
- --all-users expansion via C:\Users (filters Default, Public, service accounts)
- Fix filepath.Join drive-letter bug: use drive+sep+Users not filepath.Join(drive,Users)
- Fix cross-platform tests: setTestHome() sets both HOME and USERPROFILE on Windows
- Fix scanner_test.go path separator: use filepath.ToSlash() for Contains checks
- goreleaser: add windows/amd64 and windows/arm64 targets with zip format
- Add GUIA_BUMBLEBEE.md + GUIA_BUMBLEBEE.pdf: Spanish beginner guide (Windows/Linux/macOS)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dcoffi

dcoffi commented May 24, 2026

Copy link
Copy Markdown
Author

Binarios pre-compilados disponibles para la comunidad

Mientras el PR es revisado, dejamos los binarios listos para descargar sin necesidad de instalar Go:

Release: https://github.com/dcoffi/bumblebee/releases/tag/v0.1.1-community

El ZIP incluye binarios para las 3 plataformas:

Plataforma Archivo
Windows 64-bit (Intel/AMD) windows/bumblebee.exe
Windows 64-bit (ARM) windows/bumblebee_arm64.exe
Linux 64-bit (Intel/AMD) linux/bumblebee_amd64
Linux 64-bit (ARM) linux/bumblebee_arm64
macOS Apple Silicon (M1/M2/M3/M4) macos/bumblebee_apple_silicon
macOS Intel macos/bumblebee_intel

También incluye el catálogo threat_intel/ y una guía paso a paso en español (GUIA_BUMBLEBEE.pdf).

VirusTotal: 1/67 — falso positivo de DeepInstinct (conocido en binarios Go multi-plataforma). 66/67 motores lo marcan como limpio.

@austinconnor

Copy link
Copy Markdown

I already have two open PR's open #3 and #4. These effectively add windows support.

@jonashilmersson

Copy link
Copy Markdown

I already have two open PR's open #3 and #4. These effectively add windows support.

Nice job, when will these two PR's be merged?

@austinconnor

Copy link
Copy Markdown

I already have two open PR's open #3 and #4. These effectively add windows support.

Nice job, when will these two PR's be merged?

Looks like never, they plan on doing a windows update on their own...

@jonashilmersson

Copy link
Copy Markdown

I already have two open PR's open #3 and #4. These effectively add windows support.

Nice job, when will these two PR's be merged?

Looks like never, they plan on doing a windows update on their own...

Ok, let's hope for a quick solution to this.

Niicolaa pushed a commit to Niicolaa/bumblebee that referenced this pull request Aug 4, 2026
Adds Windows to the supported endpoint set so baseline/project scans
discover MCP configs (%APPDATA%\Claude, Continue), Chromium-family
extensions (Chrome/Edge/Brave/Chromium/Vivaldi/Arc under
%LOCALAPPDATA%), and Firefox-family profiles (%APPDATA%\Mozilla\...).
isBroadHomeRoot now recognises Windows drive roots and bare
<drive>:\Users[\<name>] homes. Endpoint UID stays empty on Windows
rather than emitting "-1" when user.Current fails. setHomeDir test
helper sets HOME/USERPROFILE/APPDATA/LOCALAPPDATA together so existing
home-based tests run on all three platforms. CI matrix gains
windows-latest and goreleaser builds windows amd64/arm64 zip archives.

Tracks perplexityai#2; implemented from scratch rather than
adopting any of the open upstream PRs (#4, perplexityai#16, perplexityai#30).
Niicolaa pushed a commit to Niicolaa/bumblebee that referenced this pull request Aug 4, 2026
Audited the earlier Windows work against the four upstream attempts
(#3, #4, perplexityai#16, perplexityai#30) and found five things it got wrong or missed. Two of
them would have made CI red on the windows-latest runner that the same
change added to the matrix.

CI-breaking:

  - The selftest step had no `shell: bash`. windows-latest defaults to
    PowerShell, where invoking the extensionless build output does not
    work as it does in a POSIX shell. The gofmt step already pinned
    bash; this one did not.
  - scanner_test.go asserted on literal "/proj/" and "/dup/" substrings
    of source_file, which is a native path. TestEndToEndScan could only
    have passed on Unix.

Correctness:

  - npm and pnpm derived project_path by slash-joining segments after
    an internal filepath.ToSlash, so a Windows record carried
    C:/src/app instead of C:\src\app. This is upstream issue #1
    ("Windows package records should preserve native project paths");
    PR #3 was closed with the note that it would be folded into the
    broader Windows work, and it then was not. Both now convert back
    with filepath.FromSlash, with regression tests.
  - DefaultExcludes had no Windows entries, so a deep sweep of
    %USERPROFILE% descended into AppData/Local/{Temp,Microsoft,Packages}
    and AppData/LocalLow — the Windows analogue of the macOS Library
    subtrees already excluded there.
  - systemRoots returned nil on Windows, missing machine-wide Python
    under %ProgramFiles%\PythonNN\Lib\site-packages; per-user Python
    under %LOCALAPPDATA%\Programs\Python\* was missing too.

Also corrects an over-reach in the preceding ecosystem commit: it added
~/.m2/repository and ~/.gradle/caches as baseline roots, but both are in
walk.DefaultExcludes precisely because they are high-cost dependency
caches, and opening every cached JAR on a 6-hourly profile is exactly
what that exclusion exists to prevent. Those, plus the Pub/Hex/Conan/
Swift caches (which hold no file this scanner parses), are dropped from
baseline; all remain reachable via --root or a deep sweep.

To make the retained ~/.nuget/packages root earn its walk, adds a
.nuspec parser for the global packages folder — installed-state
evidence for NuGet, the analogue of RubyGems' installed *.gemspec. The
per-version directory shape is required so an authoring .nuspec in a
source tree, whose <version> is often a $token$, is not read as an
install.
Niicolaa pushed a commit to Niicolaa/bumblebee that referenced this pull request Aug 4, 2026
Follow-up to the initial Windows support, from reviewing the earlier
upstream Windows attempts (#3, #4, perplexityai#16, perplexityai#30). Two of these would have
made CI red on the windows-latest runner the previous commit added.

CI-breaking:

  - The selftest step had no `shell: bash`. windows-latest defaults to
    PowerShell, where invoking the extensionless build output does not
    work as it does in a POSIX shell. The gofmt step already pinned
    bash; this one did not.
  - scanner_test.go asserted on literal "/proj/" and "/dup/" substrings
    of source_file, which is a native path, so TestEndToEndScan could
    only have passed on Unix. Now normalized before matching.

Correctness:

  - npm and pnpm derived project_path by slash-joining segments after an
    internal filepath.ToSlash, so a Windows record carried C:/src/app
    instead of C:\src\app. This is issue #1 ("Windows package records
    should preserve native project paths"); PR #3 was closed with the
    note that it would be folded into the broader Windows work, and it
    then was not. Both now convert back with filepath.FromSlash, with
    regression tests.
  - DefaultExcludes had no Windows entries, so a deep sweep of
    %USERPROFILE% descended into AppData/Local/{Temp,Microsoft,Packages}
    and AppData/LocalLow — the Windows analogue of the macOS Library
    subtrees already excluded there.
  - systemRoots returned nil on Windows, missing machine-wide Python
    under %ProgramFiles%\PythonNN\Lib\site-packages, and per-user Python
    under %LOCALAPPDATA%\Programs\Python\* was missing as well.
Niicolaa pushed a commit to Niicolaa/bumblebee that referenced this pull request Aug 4, 2026
Adds Windows to the supported endpoint set so baseline/project scans
discover MCP configs (%APPDATA%\Claude, Continue), Chromium-family
extensions (Chrome/Edge/Brave/Chromium/Vivaldi/Arc under
%LOCALAPPDATA%), and Firefox-family profiles (%APPDATA%\Mozilla\...).
isBroadHomeRoot now recognises Windows drive roots and bare
<drive>:\Users[\<name>] homes. Endpoint UID stays empty on Windows
rather than emitting "-1" when user.Current fails. setHomeDir test
helper sets HOME/USERPROFILE/APPDATA/LOCALAPPDATA together so existing
home-based tests run on all three platforms. CI matrix gains
windows-latest and goreleaser builds windows amd64/arm64 zip archives.

Tracks perplexityai#2; implemented from scratch rather than
adopting any of the open upstream PRs (#4, perplexityai#16, perplexityai#30).
Niicolaa pushed a commit to Niicolaa/bumblebee that referenced this pull request Aug 4, 2026
Follow-up to the initial Windows support, from reviewing the earlier
upstream Windows attempts (#3, #4, perplexityai#16, perplexityai#30). Two of these would have
made CI red on the windows-latest runner the previous commit added.

CI-breaking:

  - The selftest step had no `shell: bash`. windows-latest defaults to
    PowerShell, where invoking the extensionless build output does not
    work as it does in a POSIX shell. The gofmt step already pinned
    bash; this one did not.
  - scanner_test.go asserted on literal "/proj/" and "/dup/" substrings
    of source_file, which is a native path, so TestEndToEndScan could
    only have passed on Unix. Now normalized before matching.

Correctness:

  - npm and pnpm derived project_path by slash-joining segments after an
    internal filepath.ToSlash, so a Windows record carried C:/src/app
    instead of C:\src\app. This is issue #1 ("Windows package records
    should preserve native project paths"); PR #3 was closed with the
    note that it would be folded into the broader Windows work, and it
    then was not. Both now convert back with filepath.FromSlash, with
    regression tests.
  - DefaultExcludes had no Windows entries, so a deep sweep of
    %USERPROFILE% descended into AppData/Local/{Temp,Microsoft,Packages}
    and AppData/LocalLow — the Windows analogue of the macOS Library
    subtrees already excluded there.
  - systemRoots returned nil on Windows, missing machine-wide Python
    under %ProgramFiles%\PythonNN\Lib\site-packages, and per-user Python
    under %LOCALAPPDATA%\Programs\Python\* was missing as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants