Skip to content
quarry Artifact [1d66de1326]
Login

Artifact [1d66de1326]

Artifact 1d66de132691859d37fc17589c3e59cb323a843849d9d485784589969db15ffc:

Ticket change [1d66de1326] - New ticket [ed5bdd89c3] Audit follow-ups from the RFC 0008 permissions strata (two MEDIUMs: acct- guard bypass, fleet-default leak into repo-less caps). by dmestas on 2026-08-28 10:09:44.
D 2026-08-28T10:09:44.977
J comment Post-merge\saudit\sof\sthe\sRFC\s0008\sstrata\s(range\s2dccc0cb\s→\s04b13673,\slanded\s2026-08-27).\sEvery\sfinding\sverified\sagainst\smerged\strunk;\sthe\stwo\sMEDIUMs\sare\sthe\sactionable\score.\n\n**MEDIUM\s1\s—\sleftover\s`acct-`\shandler\sbypasses\sthe\slockout\sguard.**\n`internal/web/web.go`\s(~:12250),\s`POST\s/r/{repo}/settings/caps`:\srung\s4\sremoved\sthe\sper-account\sraw-string\sinputs\sfrom\sthe\sSettings\stemplate\sbut\sthe\shandler\sstill\saccepts\s`acct-*`\skeys\sand\swrites\sthem\svia\s`SetCaps`\swith\sno\s`GuardCaps`.\sAn\sadmin\ssession\sposting\sa\scrafted\sform\scan\sremove\sits\sown\s`a`\sor\sthe\slast\sadmin's\s—\sthe\sexact\ssaves\srung\s4\spromises\sto\srefuse.\sFix:\srun\sthe\s`acct-`\sbranch\sthrough\s`GuardCaps`\s(refusal\s→\s`?e=`\sredirect),\sor\sdelete\sthe\sbranch\ssince\sthe\sUI\sno\slonger\semits\sthose\sfields.\n\n**MEDIUM\s2\s—\sfleet\sdefault\sleaks\sinto\srepo-less\scaps\sresolution.**\nThe\sAPI\srouter\sresolves\scaps\sfor\srepo-less\sops\sas\s`capsFor(user,\s"")`;\s`EffectiveCaps(user,\s"")`\sreads\s`CategoryCaps("",\s…)`,\swhich\ssince\srung\s5\sis\sthe\sseeded\sfleet\sdefault\s(`gjorzh2`\s/\s`mnc3C`),\snot\sfossil\sstock.\sRegression:\s`people.list`\s(Caps\s`h`,\s`GET\s/api/v1/people`)\sis\snow\ssatisfied\sfor\ssigned-out\svisitors\s—\son\san\sall-private\sforge,\scontributor\sand\saccount\snames\sleak.\sPre-strata,\sstock\snobody\s(`gjorz`)\slacked\s`h`,\sso\sit\stook\sa\ssession.\sFix\sshape:\sthe\s`""`\srow\sis\sthe\stemplate\snew\srepositories\scopy,\snot\sthe\sempty\srepo's\sown\scategories\s—\sresolve\srepo-less\sops\sagainst\sstock\s(or\san\sexplicit\sfleet-ops\sstring)\sinstead\sof\sthe\s`""`\srow.\n\n**LOW\s—\sguard\snot\sconsulted\son\sAPI/account\spaths.**\s`account.grant`\s/\s`account.revoke`\s/\s`DeleteAccount`\sreach\s`SetCaps`/row\sdeletion\swith\sno\s`GuardCaps`;\sa\ssite\sadmin\scan\sdemote\sor\sdelete\sthe\slast\srepo\sadmin\swith\sno\swarning.\s`s`-gated\sso\scontained,\sbut\sinconsistent\swith\sthe\sguard's\spromise.\n\n**LOW\s—\smigration\sdrops\sunknown\srole\srows.**\s`MigrateRolesToCaps`\smigrates\sonly\s`read/write/admin`\sthen\s`DROP\sTABLE\srepo_role`;\sany\sother\svalue\swould\sbe\slost\ssilently.\sNone\sexist\sin\spractice\s(old\s`ParseRole`\swrote\snothing\selse);\sretry-safe\svia\s`INSERT\sOR\sIGNORE`.\n\n**NIT\s—\sno\scharset\srestriction\son\saccount/repo\snames**\s(only\s`max=64`).\sThe\slive\seditor's\s`template.HTMLAttr`\sis\ssafe\stoday\ssolely\sbecause\s`url.PathEscape`\sescapes\squotes\s(verified\s`'\s→\s%27`);\sa\sname\scharset\sor\stemplate-built\sattribute\swould\sbe\ssturdier.\n\n**NIT\s(pre-existing,\snot\sa\sstrata\sdefect)\s—\s`chat.post`\sis\s`Anonymous`\swith\sno\sCaps**\s(`internal/api/register.go`\s~:7888,\scommented\sv1\sdecision).\sNow\scontradicts\sRFC\s0008's\spresets,\swhich\ssay\schat\sneeds\s`C`\sand\sa\ssign-in.\sDeserves\sits\sown\sticket\swhen\schat\sleaves\sv1.\n\n**Verified\sas\sintended\s(not\sdefects):**\sthe\sToken-floor\schange\s(`MayAt`\s=\ssigned-in;\sper-op\sletters\sgate\sthe\srest,\senforced\sat\sthe\srouter\swhen\s`capsFor`\sis\swired);\sthe\sPublic-project\swidening\sfor\ssigned-in\saccounts\s(`n\sc\s3\sC`)\sand\svisitors\s(`h\s2`),\sdocumented\sin\sthe\sperm-5\slanding;\sroute\sgating\son\sall\snew\sendpoints\s(`gateCap\s"a"`\s/\ssite-admin\s`gateAt`).\sThe\scompiler's\spreset\stables\sand\s`Infer`\sare\scovered\sby\sunit\stests\sbut\sgot\sno\sindependent\sre-derivation\sin\sthis\saudit.\n\nSuggested\sorder:\sMEDIUM\s1\sand\s2\stogether\sas\sone\ssmall\slanding;\sLOWs\sand\sNITs\sopportunistic.
J priority High
J severity Important
J status Open
J subsystem web
J title Audit\sfollow-ups\sfrom\sthe\sRFC\s0008\spermissions\sstrata\s(two\sMEDIUMs:\sacct-\sguard\sbypass,\sfleet-default\sleak\sinto\srepo-less\scaps)
J type Defect
K ed5bdd89c39a993313f99f17685d3612081ebc4e
U dmestas
Z 8800454c842955e0006fbf6cd01f9149