Artifacts Associated With Ticket ed5bdd89c39a993313f99f17685d3612081ebc4e
Ticket change [1d66de1326] (rid 3278) by dmestas on 2026-08-28 10:09:44:
- comment initialized to:
Post-merge audit of the RFC 0008 strata (range 2dccc0cb → 04b13673, landed 2026-08-27). Every finding verified against merged trunk; the two MEDIUMs are the actionable core. **MEDIUM 1 — leftover `acct-` handler bypasses the lockout guard.** `internal/web/web.go` (~:12250), `POST /r/{repo}/settings/caps`: rung 4 removed the per-account raw-string inputs from the Settings template but the handler still accepts `acct-*` keys and writes them via `SetCaps` with no `GuardCaps`. An admin session posting a crafted form can remove its own `a` or the last admin's — the exact saves rung 4 promises to refuse. Fix: run the `acct-` branch through `GuardCaps` (refusal → `?e=` redirect), or delete the branch since the UI no longer emits those fields. **MEDIUM 2 — fleet default leaks into repo-less caps resolution.** The API router resolves caps for repo-less ops as `capsFor(user, "")`; `EffectiveCaps(user, "")` reads `CategoryCaps("", …)`, which since rung 5 is the seeded fleet default (`gjorzh2` / `mnc3C`), not fossil stock. Regression: `people.list` (Caps `h`, `GET /api/v1/people`) is now satisfied for signed-out visitors — on an all-private forge, contributor and account names leak. Pre-strata, stock nobody (`gjorz`) lacked `h`, so it took a session. Fix shape: the `""` row is the template new repositories copy, not the empty repo's own categories — resolve repo-less ops against stock (or an explicit fleet-ops string) instead of the `""` row. **LOW — guard not consulted on API/account paths.** `account.grant` / `account.revoke` / `DeleteAccount` reach `SetCaps`/row deletion with no `GuardCaps`; a site admin can demote or delete the last repo admin with no warning. `s`-gated so contained, but inconsistent with the guard's promise. **LOW — migration drops unknown role rows.** `MigrateRolesToCaps` migrates only `read/write/admin` then `DROP TABLE repo_role`; any other value would be lost silently. None exist in practice (old `ParseRole` wrote nothing else); retry-safe via `INSERT OR IGNORE`. **NIT — no charset restriction on account/repo names** (only `max=64`). The live editor's `template.HTMLAttr` is safe today solely because `url.PathEscape` escapes quotes (verified `' → %27`); a name charset or template-built attribute would be sturdier. **NIT (pre-existing, not a strata defect) — `chat.post` is `Anonymous` with no Caps** (`internal/api/register.go` ~:7888, commented v1 decision). Now contradicts RFC 0008's presets, which say chat needs `C` and a sign-in. Deserves its own ticket when chat leaves v1. **Verified as intended (not defects):** the Token-floor change (`MayAt` = signed-in; per-op letters gate the rest, enforced at the router when `capsFor` is wired); the Public-project widening for signed-in accounts (`n c 3 C`) and visitors (`h 2`), documented in the perm-5 landing; route gating on all new endpoints (`gateCap "a"` / site-admin `gateAt`). The compiler's preset tables and `Infer` are covered by unit tests but got no independent re-derivation in this audit. Suggested order: MEDIUM 1 and 2 together as one small landing; LOWs and NITs opportunistic. - priority initialized to: "High"
- severity initialized to: "Important"
- status initialized to: "Open"
- subsystem initialized to: "web"
- title initialized to:
Audit follow-ups from the RFC 0008 permissions strata (two MEDIUMs: acct- guard bypass, fleet-default leak into repo-less caps)
- type initialized to: "Defect"
- comment initialized to:
Ticket change [8a31488453] (rid 3299) by dmestas on 2026-08-28 15:48:47:
- comment changed to:
Fixed on landing perm-fixups → trunk (five checkpointed commits: fleet-default leak, acct- guard bypass, grant/revoke warnings, migration keep, login alphabet). chat.post posture deferred to the chat arc.
- status changed to: "Review"
- comment changed to:
Ticket change [1f3e67cf02] (rid 3307) by dmestas on 2026-08-28 17:21:38:
- comment changed to:
Landing perm-fixups accepted into trunk; all five findings addressed, suite green on the merge.
- resolution changed to: "Fixed"
- status changed to: "Fixed"
- comment changed to:
Ticket change [350f08171e] (rid 12535) by zeitgeist on 2026-09-24 00:54:37:
- Untracked field number: "99"