chore(whatsapp-bridge): npm audit fix + bump Baileys to patched release (5 of 5 vulns) - #44980
chore(whatsapp-bridge): npm audit fix + bump Baileys to patched release (5 of 5 vulns)#44980capitelist wants to merge 1 commit into
Conversation
egilewski
left a comment
There was a problem hiding this comment.
Recommendation: request changes
I reviewed this against current GitHub main a118b94a856ef80301cb26d16be6d08c0104e0db, PR base d62979a6f34f64f2ed840f159aac66e24d7cad78, and PR head 4b9e113c8b76e6f6e512ffcddb5e2347fb37c407.
Validation:
gh pr checks 44980 --repo NousResearch/hermes-agent: no checks reported, so there is no completed PR-specific failing check to gate on.git fetch --no-tags upstream mainandgit -c maintenance.auto=false -c gc.auto=0 fetch --no-tags upstream +pull/44980/head:refs/remotes/upstream/pr/44980: passed.git rev-list --left-right --count refs/remotes/upstream/main...refs/remotes/upstream/pr/44980:411 104, showing the submitted branch is far behind/diverged from current main.git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr/44980: failed with content conflicts in many current-main files, includingagent/agent_runtime_helpers.py,agent/tool_executor.py,apps/desktop/electron/main.cjs,gateway/run.py,hermes_cli/web_server.py,scripts/release.py,tests/test_tui_gateway_server.py, andtools/transcription_tools.py.git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr/44980: failed on the submitted branch diff.
Finding:
The GitHub PR file list is focused on scripts/whatsapp-bridge/package-lock.json, but the submitted branch itself is stale and does not currently merge into GitHub main. Please rebase/update the branch so the dependency lockfile change can be validated against the current tree; I stopped review at the mergeability gate, so there may be other issues after the branch is made current.
Signed: GPT-5.5-xhigh in Codex
…se (5 of 5 vulns) Resolves all 5 npm audit vulnerabilities in scripts/whatsapp-bridge/. Closes the remaining critical (GHSA-qvv5-jq5g-4cgg) by bumping the @whiskeysockets/baileys pin to the rc.12 release commit, which contains the upstream fix (3beb08e). Transitive vulnerabilities (lockfile only): - protobufjs: bumped to 7.6.4 (was <=7.5.7) [moderate, GHSA-jggg-4jg4-v7c6] - qs: bumped to 6.15.2 (was 6.11.1-6.15.1) [moderate, GHSA-q8mj-m7cp-5q26] - ws: bumped to 8.21.0 (was 8.0.0-8.20.0) [moderate, GHSA-58qx-3vcg-4xpx] - express: bumped to 4.22.2 (was 4.21.0-4.22.1) [transitive via qs] Critical resolved by Baileys pin bump: - @whiskeysockets/baileys 7.0.0-rc12 (was pinned to commit 01047deb, resolving to 7.0.0-rc.9) [critical, GHSA-qvv5-jq5g-4cgg] The advisory-recommended workaround (shouldSyncHistoryMessage: () => false) was evaluated and rejected: Baileys 7.x logs a DANGER warning when history sync is disabled, stating it "PREVENTS BAILEYS FROM ACCESSING INITIAL LID MAPPINGS, LEADING TO INSTABILIY AND SESSION ERRORS". The bridge's allowlist.js relies on those LID mappings for sender identity expansion (lines 36-64), so disabling history sync would break allowlist matching on first connect. The pin bump to rc.12 makes the workaround unnecessary because the fix is included in that release. Verified: - npm audit: 0 vulnerabilities - node --check bridge.js: passes - bridge startup smoke test: starts, listens on :3000, renders QR Reference: tracking issue NousResearch#43814 (consolidated Baileys CVE tracker) Reference: lockfile-only precursor was this PR's earlier revision
4b9e113 to
e7b0193
Compare
egilewski
left a comment
There was a problem hiding this comment.
looks mergeable
Validation:
- Reviewed against current GitHub main
992b9223893453b3b1527b2ba728996ec81e83f2, PR base425e777f54b810b7d762b0a5bbe8372dcf782def, and PR heade7b01934340151416d135a3a744a86c64d243c06. - GitHub's generated merge ref
7c74a288cf201e945d02579758fc225ace8b7edeis parented to current main and the PR head, and its diff against current main is limited toscripts/whatsapp-bridge/package.jsonandscripts/whatsapp-bridge/package-lock.json. npm audit --package-lock-only --jsoninscripts/whatsapp-bridgewent from 7 vulnerabilities on current main to 0 vulnerabilities on this PR's merge ref.npm install --package-lock-only --ignore-scripts --dry-runinscripts/whatsapp-bridgeexited 0 and left the lockfile clean.node --test allowlist.test.mjspassed 5 tests.- CodeRabbit ran against the committed merge-ref diff with
--base upstream/mainand reported no findings.
Signed: GPT-5 in Codex
|
Thanks for the security-focused dependency update and for documenting why the history-sync workaround was unsuitable.
|
Summary
Resolves all 5 npm audit vulnerabilities in
scripts/whatsapp-bridge/— the 4 moderate transitive deps and the 1 critical in@whiskeysockets/baileys. Closes #43814.01047deb(rc.9)1aee6ed6(rc.12)The Baileys bump moves the pin from the pre-fix commit
01047debto the rc.12 release commit1aee6ed6011ef77035c2b072eff478fc5f327809, which is 1 commit ahead of the upstream fix3beb08e(verified via GitHub compare API:ahead_by: 1, behind_by: 0).Why not also apply
shouldSyncHistoryMessage: () => false?The advisory recommends that flag as a workaround. Evaluated and rejected: Baileys 7.x logs a
DANGERwarning when history sync is disabled, stating it "PREVENTS BAILEYS FROM ACCESSING INITIAL LID MAPPINGS, LEADING TO INSTABILIY AND SESSION ERRORS".scripts/whatsapp-bridge/allowlist.jsrelies on those LID mappings for sender identity expansion (lines 36-64), so the workaround would break allowlist matching on first connect. The pin bump to rc.12 makes the workaround unnecessary because the fix is included in that release.Verified
npm installclean (one pre-existing pino peer-dep warning, unrelated)npm auditreports 0 vulnerabilitiesnode --check bridge.jspassesTest plan for reviewer
cd scripts/whatsapp-bridge && npm installnpm audit— expect "found 0 vulnerabilities"node --check bridge.jsnpm start— expect QR render and successful auth