You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[reviewer] Review backlog (security): standbyAcked also survives the listener-removing disconnect paths that bypass the ws close handler #16466
Blocked on PR #16465. This finding came from reviewing PR #16465 and is about code that PR is changing. Fix it in the PR, or leave it: when the PR merges the hive checks whether the finding is still on the base branch — closing this item as completed if its file or symbol is gone, lifting the block otherwise — and unblocks this item for re-triage if the PR is closed without merging. Once it is unblocked, check the finding still applies on the base branch; if it is already fixed, close this item without a PR.
Filed from an out-of-scope finding in the Hive review of PR #16465.
PR: #16465 (#16465)
Perspective: security
Severity: low (P3)
Finding: standbyAcked also survives the listener-removing disconnect paths that bypass the ws close handler
Evidence: bin/contributor-relay.js:2701
The PR clears hub.standbyAcked in the ws 'close' handler (bin/contributor-relay.js:10181), satisfying #16463. Two other teardown paths never run that handler because they call hub.ws.removeAllListeners() first: the profile-switch disconnect (bin/contributor-relay.js:2695-2703, which resets authenticated/readyOutstanding and bumps connectGeneration) and the TLS host-mismatch redial (bin/contributor-relay.js:1561-1580, which resets authenticated then calls connectHub directly; connectHub at 10103 also removeAllListeners+terminate on the old socket). On those paths hub.standbyAcked stays true from the previous connection, so after re-auth a hub that no longer advertises standby_v1 (declareStandby early-returns at 9505-9508 without any standby_ack) would still pass the standbyPush gate at 9734. Same trust-boundary shape as the fixed close-handler case; the peer is the same authenticated hub URL, so impact is low. Remedy: reset hub.standbyAcked = false alongside hub.authenticated = false at 2701 and 1563.
Same file as #16463: both cite bin/contributor-relay.js, but this finding does not match that issue's symbol, line range or category, so it was filed separately instead of folded in.
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.
Unblocked: #16465 is no longer open. This issue is actionable again.
Already fixed on v6 by #16465 (merged as 0ed03ff97f52a8d5bb14f030196cab2980e4eeff). That commit addressed this finding inside the PR before merge: hub.standbyAcked = false is now reset alongside hub.authenticated = false on both listener-removing teardown paths the finding named — the TLS host-mismatch redial (bin/contributor-relay.js:1564) and the profile-switch disconnect (bin/contributor-relay.js:2706) — in addition to the ws close handler (:10186), with coverage in bin/contributor-relay.test.js.
Unblocked: #16465 merged and the finding's file is still on the base branch. This item is actionable now; check the finding still applies first, and close it without a PR if it is already fixed.
Activity
hivecommons-hive commentedon Nov 3, 2026
Same file as #16463: both cite
bin/contributor-relay.js, but this finding does not match that issue's symbol, line range or category, so it was filed separately instead of folded in.filed by Hive review backlog
hivecommons-hive commentedon Nov 3, 2026
Still present at 1b4a458 (style).
hivecommons-hive commentedon Nov 3, 2026
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.
Unblocked: #16465 is no longer open. This issue is actionable again.
Already fixed on
v6by #16465 (merged as0ed03ff97f52a8d5bb14f030196cab2980e4eeff). That commit addressed this finding inside the PR before merge:hub.standbyAcked = falseis now reset alongsidehub.authenticated = falseon both listener-removing teardown paths the finding named — the TLS host-mismatch redial (bin/contributor-relay.js:1564) and the profile-switch disconnect (bin/contributor-relay.js:2706) — in addition to the wsclosehandler (:10186), with coverage inbin/contributor-relay.test.js.Verified against current
v6:Closing as not planned (no further change needed).
🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:0ed03ff— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
hivecommons-hive commentedon Nov 3, 2026
Unblocked: #16465 merged and the finding's file is still on the base branch. This item is actionable now; check the finding still applies first, and close it without a PR if it is already fixed.