Skip to content

fix: Homebrew 6.0+ compatibility, startup Keychain prompts, and WebView timezone offset parsing - #152

Merged
msitarzewski merged 2 commits into
msitarzewski:mainfrom
fallenmaverick:fix/homebrew-6.x-keychain-timezone
Jul 17, 2026
Merged

msitarzewski merged 2 commits into
msitarzewski:mainfrom
fallenmaverick:fix/homebrew-6.x-keychain-timezone

Conversation

@fallenmaverick

Copy link
Copy Markdown
Contributor

This pull request resolves three distinct classes of bugs affecting both the Svelte/Tauri desktop app and the Swift native SwiftUI wrapper:

1. Homebrew 6.0+ Built-in brew vulns Compatibility

  • Issue: The original codebase assumed brew-vulns was always installed as a standalone formula (homebrew/brew-vulns/brew-vulns). In Homebrew 6.0+, the vulns subcommand has been integrated natively into core Homebrew, and the standalone tap/formula has been deprecated and deleted. As a result, detection probes (brew --prefix brew-vulns) failed, and clicking "Install" attempted to fetch a deleted formula, failing indefinitely.
  • Fix:
    • Updated detection logic on both the Rust (check_brew_vulns_installed) and Swift (isBrewVulnsInstalled) backends to check brew help vulns as a fallback when the legacy prefix check fails.
    • Changed the installation command/remediation to brew update instead of brew install homebrew/brew-vulns/brew-vulns since the subcommand is natively bundled with current Homebrew.
    • Updated validate_formula_name in both Rust and Swift to accept 2-segment tap-qualified formula names (e.g., user/formula like anomalyco/opencode), which are fully valid.

2. Intrusive Startup macOS Keychain Prompts

  • Issue: On app launch, github.loadStatus() was called eagerly. If a user had not configured credentials or was not authenticated, macOS would trigger an intrusive Keychain access prompt on launch.
  • Fix: Added a persistent brew-browser:github:signed-in flag in localStorage when a user successfully authenticates. Eager startup check calls to github.loadStatus() are now gated on this flag, preventing Keychain checks on startup for unauthenticated users.

3. Last Scan "59 Minutes / 1 Hour Ago" WebView Parsing Bug

  • Issue: Under WebKit (macOS Tauri webview), parsing ISO-8601 date strings with nanosecond precision (e.g., "2026-07-16T16:50:00.123456789Z" returned by the Rust backend) has a timezone parsing bug where it fails or ignores the Z suffix and parses the time in the host system's local timezone. This resulted in the relative scan time showing as exactly "59 minutes ago" or "1 hour ago" immediately after a successful scan.
  • Fix: Added a parseIsoDate utility helper in Svelte (vulnerabilities.svelte.ts) to truncate timestamps to standard millisecond-precision before parsing them into JavaScript Date objects.

4. Process Environment Fix for SwiftUI Subprocesses

  • Issue: In the Swift native app wrapper, VulnsService spawned its subprocesses (like check and scan commands) without inheriting the correct Homebrew environment (specifically missing $HOME), causing brew to fail to execute correctly under launchd GUI app bundle contexts.
  • Fix: Set process.environment = BrewService.brewEnvironment() in VulnsService.run to align environment variables consistently with the rest of the native app.

@fallenmaverick

Copy link
Copy Markdown
Contributor Author

Deleting the branch as merged already!

@fallenmaverick
fallenmaverick deleted the fix/homebrew-6.x-keychain-timezone branch July 17, 2026 18:52
msitarzewski added a commit that referenced this pull request Jul 20, 2026
…linuxbrew-path

fix: native Keychain-prompt parity + Linuxbrew PATH (follow-up to #152)
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.

2 participants