-
Notifications
You must be signed in to change notification settings - Fork 44
api(encrypted): encrypted-blob and withheld-paths routes skip the quarantine gate #499
Copy link
Copy link
Open
Labels
crate:nodegitlawb-node — the serving node and REST APIgitlawb-node — the serving node and REST APIkind:securityVulnerability fix or hardeningVulnerability fix or hardeningsev:highMajor break or real security/trust risk, no easy workaroundMajor break or real security/trust risk, no easy workaroundsubsystem:apiNode REST API request/response surfaceNode REST API request/response surfacesubsystem:encryptionEncrypted subtrees, recipient blinding, key zeroizationEncrypted subtrees, recipient blinding, key zeroizationsubsystem:visibilityPath-scoped visibility and content withholdingPath-scoped visibility and content withholding
Description
Activity
Metadata
Metadata
Assignees
Labels
crate:nodegitlawb-node — the serving node and REST APIgitlawb-node — the serving node and REST APIkind:securityVulnerability fix or hardeningVulnerability fix or hardeningsev:highMajor break or real security/trust risk, no easy workaroundMajor break or real security/trust risk, no easy workaroundsubsystem:apiNode REST API request/response surfaceNode REST API request/response surfacesubsystem:encryptionEncrypted subtrees, recipient blinding, key zeroizationEncrypted subtrees, recipient blinding, key zeroizationsubsystem:visibilityPath-scoped visibility and content withholdingPath-scoped visibility and content withholding
authorize_repo_read(crates/gitlawb-node/src/api/mod.rs:54-56) drops a quarantined repo before the visibility gate, so a quarantined mirror is hidden from every reader as if it did not exist. The three encrypted-blob handlers (api/encrypted.rs:21-31, 48-58, 84-93) andwithheld_paths(api/visibility.rs:213-229) hand-roll the gate withget_repo+visibility_checkand never callis_repo_quarantined.Impact: a quarantined mirror's OID/CID index, and the full ciphertext of every withheld blob via
GET .../encrypted-blob/{oid}, are still served, while clone,/ipfs/{cid}and everyauthorize_repo_readroute return 404.Repro:
GET /api/v1/repos/{owner}/{repo}/encrypted-blobsagainst a quarantined mirror returns 200 with data.Fix: route these handlers through
authorize_repo_read, or add the quarantine check to the hand-rolled gate. Per AGENTS.md, add deny-path tests proving the quarantined repo now 404s on each.Found in the Oct 2 2026 audit (A2) at bfc44f9.