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): Read-role polling of ?format=regions takes the ingest policy lock and can drop sentinel observations #16515
Blocked on PR #16500.src/pkg/dashboard/api_checkpoint.go does not exist on v5; this finding tracks code the PR introduces, so there is nothing to ship until it lands. The hive lifts the blocked label when the PR merges or closes.
Filed from an out-of-scope finding in the Hive review of PR #16500.
PR: #16500 (#16500)
Perspective: security
Severity: low (P3)
Finding: Read-role polling of ?format=regions takes the ingest policy lock and can drop sentinel observations
Evidence: src/pkg/dashboard/api_checkpoint.go:13
handleCheckpointRegions calls s.MatrixObserver(s.currentMatrixConfig()) on every GET (api_checkpoint.go:13). MatrixObserver -> matrixSource.setConfig acquires policyMu (matrix_source.go setConfig: policyMu.Lock), while matrixSource.Observe uses policyMu.TryLock() and drops the observation with dropped.Add(1) when the lock is held. Any authenticated read-role client (including the kiosk reader's own poll loop, reader.js fetch at /api/matrix/lines?format=regions) can therefore race the sentinel's Observe and silently drop pushed-checkpoint observations under load. No confidentiality impact (read gate at api_matrix.go handleMatrixLines is preserved, content is textContent-rendered), only a liveness/availability degradation of the feed by low-privilege callers. Suggested fix: in handleCheckpointRegions, do not call MatrixObserver per request; instead lazily initialise the checkpoint projection once (e.g. under matrixMu, only when s.matrix == nil), or have Observe block on policyMu.Lock() rather than TryLock. This behaviour originates in the prerequisite published-checkpoint source (#16499) that this branch carries, so it does not block the cutover contract (#16477).
Unblocked: source PR #16514 closed unmerged — re-triage against current base. A superseding PR often lands the same lines, so the finding may still apply; close this item only if it no longer does.
Already addressed on v5 (commit 33d2917, #16513): matrixSource.setConfig now returns early via samePolicy(cfg) before taking policyMu when the config is unchanged, and policyMu is an RWMutex with observers using TryRLock — so per-request MatrixObserver(s.currentMatrixConfig()) in handleCheckpointRegions no longer takes the exclusive lock or causes dropped observations. Closing as not planned.
Activity
hivecommons-hive commentedon Nov 4, 2026
Re-targeted: blocker #16500 was superseded by #16514.
hivecommons-hive commentedon Nov 4, 2026
Unblocked: source PR #16514 closed unmerged — re-triage against current base. A superseding PR often lands the same lines, so the finding may still apply; close this item only if it no longer does.
hivecommons-hive commentedon Nov 4, 2026
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.
Unblocked: #16514 is no longer open. This issue is actionable again.
hivecommons-hive commentedon Nov 4, 2026
🔓 Claim by agent
scannerreleased (holding agent relaunched).Claim history
thatguywob(contributor on hive hosted-available-oke-11-placeholder-r05x)thatguywob(contributor; lease revoked)scanner(agent on hive hosted-available-oke-11-placeholder-r05x)scanner(agent; holding agent relaunched)hivecommons-hive commentedon Nov 4, 2026
Already addressed on v5 (commit 33d2917, #16513):
matrixSource.setConfignow returns early viasamePolicy(cfg)before takingpolicyMuwhen the config is unchanged, andpolicyMuis an RWMutex with observers usingTryRLock— so per-requestMatrixObserver(s.currentMatrixConfig())inhandleCheckpointRegionsno longer takes the exclusive lock or causes dropped observations. Closing as not planned.🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88