Artifacts Associated With Ticket 74f040e029
Ticket change [673eccd3a4] (rid 9345) by jva on 2026-09-16 18:17:49:
- Untracked field cmimetype: "text/x-markdown"
- comment initialized to:
Found during Jan's e2e campaign (jva), 2026-09-16, build 0.1.0-beta+4e516ed06124..dd4619ef72b9. Full write-up with numbered entries: https://zeitforge.app/r/jva/dantest-sandbox/doc/trunk/GOTCHAS.md Repro: repo.add create:true; `fossil clone https://zeitforge.app/r/<repo>` with no credentials; `fossil user default anonymous`; add a file; `fossil commit` (autosync). The check-in lands on trunk as user anonymous. The repo's anonymous category is mnc3C8 (no i) and the settings page says 'Check-in lets someone push', yet the sync gate never consulted the letters. RFC 0001 s7: 'a repo with zero sync users pushes anonymously (local single-user default)'. Stock fossil 2.28 defaults are nobody=gjorz, anonymous=hz, so anonymous push is an admin opt-in there. Suggested fix: when a repo has no sync users, fall back to the category letters (i on nobody/anonymous) instead of open.
- priority initialized to: "High"
- severity initialized to: "Severe"
- status initialized to: "Open"
- subsystem initialized to: "oltp"
- title initialized to:
Anonymous fossil push accepted on a freshly created public repo (G-32)
- type initialized to: "Code_Defect"
Ticket change [f6ddf5856a] (rid 9362) by zeitgeist on 2026-09-16 18:38:56:
- icomment:
Triage (zeitgeist): CONFIRMED as the most serious of the campaign, and it groups with b112b205 and dc748de1 — one gate, failing in both directions. The sync gate is not reading the repository's capability letters. Here it is too permissive: anonymous holds mnc3C8 with no i, and a push lands anyway. In b112b205 it is too restrictive: a private repository refuses its own owner. In dc748de1 a mirrorable=false left by a partial update made xfer answer 404 to everyone. Three symptoms, one place to look: whatever decides xfer answers from repository state (public/private/mirrorable) and never consults the caller's letters. Fixing one without the others moves the bug rather than ends it. This is the security item of the eleven: unauthenticated WRITE access to a public repository.
- mimetype: "text/x-markdown"
- icomment:
Ticket change [19428b1987] (rid 9457) by zeitgeist on 2026-09-16 23:08:09:
- icomment:
Evidence, after the fix landed: this hole had two victims already, and neither noticed. Both agent sessions working on quarry today — zeitgeist (this one) and the session with jva — pushed every landing to this repository over xfer WITHOUT AUTHENTICATING. Neither of us holds a sync_user row; we simply pushed and it worked, all day, through the same gate that was accepting anonymous fossil pushes. It surfaced the moment the fix deployed (ff6fbc37f4fd): the next push answered "the peer refused: not authorized to write", and it took a Keychain-held sync secret and an explicit --user to get back in. That is a better argument for the fix than the hypothetical stranger in the original report. The unauthenticated writers were not attackers probing the forge; they were the two accounts doing the most work on it, and the gate never asked either of them who they were. One correction to my earlier triage comment on this ticket: I grouped b112b205 under "one gate, failing in both directions". The session that fixed this one says the sync gate never consults capability letters at all — Gated(repo) takes only a repository and answers one question, "must a push authenticate here", and everything after it is the sync_user table. So b112b205 is NOT fixed by what landed here, and my one-gate framing was too tidy. Its root is more likely the same account/sync-path disconnect described in the new ticket below.
- mimetype: "text/x-markdown"
- icomment:
Ticket change [33b5d1da9b] (rid 9924) by zeitgeist on 2026-09-17 21:30:00:
- icomment:
Verified in production, from the forge journal rather than from a test: an unauthenticated push attempt on 2026-09-17 at 13:48:43Z was refused and logged as `xfer: dantest-sandbox: push rejected (user "")`, and jva quoted the refusal text back from the client side ('anonymous push is not accepted here: push with --user and a push credential'). Gated() now asks the capability letters and only the letters: an unauthenticated pusher is a signed-out visitor, who holds the `nobody` category alone, and stock fossil ships nobody=gjorz with no i. It also fails closed without a special case, since a database that cannot answer yields empty caps and empty caps hold no i. Two things worth recording because they were the expensive part. First, the original fix closed this door without checking that anybody else still had one, which locked every writer out of 23 of 24 repositories for eleven hours (786ab6c5). Second, the test that shipped with it asserted only that a stranger is refused; a gate has two directions, and a test that pushes on one of them is not a test of the gate. Both directions are now asserted. - mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [0024ed2db0] (rid 9928) by zeitgeist on 2026-09-17 21:34:33:
- icomment:
Fixed. Anonymous push is an opt-in through the letters, and the gate fails closed. The report named the cause exactly: "the sync gate never consulted the letters". It did not. Gated(repo) only decided WHETHER to authenticate; the authoriser was the sync_user table, which is CLI-provisioned with no UI anywhere, so the gate was disconnected from both accounts and capability letters. A freshly created public repository therefore accepted a push as anonymous while its own settings page said check-in was required. Landing 0baba6ca: the gate consults the letters and fails closed, guarded by TestAnonymousPushIsAnOptInThroughTheLetters — a repository whose nobody category grants i may accept an anonymous push, and one that does not may never. The refusal a client now gets says what is missing: "anonymous push is not accepted here: push with --user and a push credential". Two related landings went with it: af09dd99, so an account the letters let check in can actually push, and e5ba9956, a push credential a person can mint and revoke. 786ab6c5 covers those and is closed too.
- mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [525410471f] (rid 12575) by zeitgeist on 2026-09-24 00:57:41:
- Untracked field number: "142"