Skip to content

fix(linux): drop unmaintained dbus-next so installs no longer pull critical advisories - #148

Merged
mohak34 merged 2 commits into
mainfrom
fix/drop-vulnerable-dbus-deps
Oct 24, 2026
Merged

mohak34 merged 2 commits into
mainfrom
fix/drop-vulnerable-dbus-deps

Conversation

@mohak34

@mohak34 mohak34 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Installing @mohak34/opencode-notifier@1.1.0 into an empty project makes npm audit report critical form-data and tar advisories. They come from dbus-next@0.10.2 (the Linux D-Bus notification fallback), unmaintained since 2022: its optional usocket dependency pulls node-gyp@7, which pulls request, form-data@2.3.3 and tar@6.2.1. That chain only runs at install time to compile a native addon, but every user's audit flags it and upstream will never fix it.

This swaps dbus-next for @particle/dbus-next, a maintained fork with the same API that drops usocket. The code change is the import specifier in src/notify-linux.ts, the test fixture daemon, one test, and the build's --external flag. No behavior or config changes.

Hit every surface:

  • Hosts: V1 and V2 both reach the D-Bus fallback through src/notify-linux.ts; nothing host-specific changed.
  • Platforms: Linux D-Bus fallback only. macOS, Windows and WSL paths are untouched.
  • Focus backends, channels, config: not affected.
  • Docs: CHANGELOG entry under Unreleased. No README change, nothing user-facing to configure.

Checked (Linux, headless):

  • bun run typecheck and bun run build pass; both dist/ entry points keep the fork as an external import.
  • bun test: 257 pass, 1 skip, 0 fail, identical to main. The D-Bus tests run a private dbus-run-session with the fixture notification daemon, so the fork is exercised end to end.
  • npm pack, installed the tarball into an empty project: npm audit went from critical and high to 3 moderate. It also imports under Node.
  • The remaining moderates are uuid via node-notifier@10. node-notifier 11 removes it but changes macOS behavior (icons ignored, permission prompt again), so that is left for a separate change after testing on a Mac.

Not checked: a real desktop notification daemon (GNOME, KDE) on a live session, macOS, Windows.

Review: 1 round by GPT-6.1 Sol (API compatibility of the fork vs dbus-next 0.10.2 including the private socket unref, fd passing, dist externals, advisories on the new tree). No findings.

Generated with Claude Code using Claude Opus 5.5

mohak34 and others added 2 commits October 24, 2026 03:07
…op vulnerable deps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mohak34
mohak34 merged commit f7ef977 into main Oct 24, 2026
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.

1 participant