Repository navigation
Description
Every issue is stored as a ref pointing directly at a blob. git/issues.rs:49-51 writes the issue
JSON with hash-object --stdin -w and then update-ref refs/gitlawb/issues/{issue_id} <hash>.
The visibility walk refuses to proceed over it. git/visibility_pack.rs:335-341 enumerates every ref
with no pattern and no namespace exclusion (for-each-ref --format=%(refname)), and :390-395 bails
on anything that is not a commit:
if *kind != "commit" {
anyhow::bail!("ref {refname} resolves to a {kind}, not a commit; refusing to produce a partial (under-withheld) set")
}blob_paths calls that first (:427), so the entire walk aborts.
Two consequences, and the second is the quiet one
- Serve path:
api/repos.rs:1379-1439maps the error throughgit_service_app_errorto
AppError::Git, which is HTTP 500. Every filtered clone or fetch of that repo fails, permanently. - Push path:
api/repos.rs:96-111swallows the same error toNone, which lands on
(false, None), meaningannounce=false. No gossip, no peer notify, no Arweave anchor, on every
subsequent push, with no error surfaced anywhere.
Only repos carrying a path-scoped visibility rule are affected; has_path_scoped_rule short-circuits
the rest (repos.rs:1379, repos.rs:70).
Measured, not assumed
At git level, reproducing the exact pair assert_all_refs_are_commits zips at :381:
$ H=$(printf '{"id":"x"}' | git hash-object --stdin -w)
$ git update-ref refs/gitlawb/issues/abc $H
$ git for-each-ref --format='%(refname)' | sed 's/$/^{}/' | git cat-file --batch-check='%(objecttype)'
refs/gitlawb/issues/abc -> blob
refs/heads/main -> commit
So the != "commit" bail fires. Stated plainly: the Rust-level unit probe against a fixture repo was
written but its cold build did not finish, so that half is not-run. The git behavior above plus the
straight-line bail is the evidence.
Reachability
POST /api/v1/repos/{owner}/{repo}/issues (server.rs:104, signature plus rate limit). Its only gate
is authorize_repo_read(..., "/") (api/issues.rs:46), so any self-registered DID that can read the
repo can do it, which for a public repo with path-scoped rules is anyone. It also fires with no
attacker at all: the owner filing an issue on their own repo breaks it the same way.
Is the guard intended?
The fail-closed guard itself is deliberate and came from #42 (closed), and
visibility_pack.rs:1965 fails_closed_when_a_ref_cannot_be_traversed pins it for a blob ref under
refs/heads/. But #42 was about repo content reachable only through an unwalked namespace. Nothing in
it anticipated that we write our own metadata refs straight at blobs. An issue blob has no tree path,
so no path rule can classify it either way; refusing the walk withholds nothing and only denies
service.
So this is a false-denial availability bug, not a leak. The withheld set is never under-computed.
Fix direction
Exclude refs/gitlawb/ from assert_all_refs_are_commits, and keep failing closed for refs/heads,
tags, and notes. Worth documenting in the same change that objects reachable only through
refs/gitlawb/* are then packed unfiltered, which is the existing intent: their visibility is the
repo-level read gate that already ran.
Activity
beardthelion commentedon Nov 17, 2026
Fixed in #558. The visibility walk exempts
refs/gitlawb/issues/*andrefs/gitlawb/requests/*, so an issue ref no longer 500s filtered clones or stops replication announce.