A replayed older signed catalogue is accepted #243
Notifications
Due Date
No due date set.
Blocks
#1305 Store
sam/archie
Reference: sam/archie#243
Reference in new issue
Block a user
The catalogue signature covers only the package list, so a registry or network attacker can serve an older validly signed catalogue and pin outdated package digests. Done when the catalogue carries a signed issue time or sequence and archie-core refuses one older than the newest it has seen.
Imported from beads
archie-core-em7s.12· GitHub #1503 · type task · priority P2 · created 2026-10-05Triaged: no code change is needed for this. No code change: the work this issue asks for is already in the tree at HEAD (
031291a, the same commit as refs/heads/main).Evidence, in the order the acceptance criteria read:
Cataloguein internal/domain/storepkg/catalogue.go hasIssuedAt time.Timejson:"issued_at"``, andValidate()refuses a zero issue time ("catalogue has no issue time"). The signature is over the layer bytes anddecodeCataloguedecodes exactly those bytes, so issued_at is covered by the ed25519 signature and cannot be stripped or altered (internal/infrastructure/signedoci/signedoci.goVerify).FreshCatalogueSource.FetchreturnsErrCatalogueStalewhenIssuedAtis before the newest accepted issue time, and only after the wrapped source's signature verification has succeeded.FileFreshnesskeeps a per-source high-water mark as an atomically written JSON file underMarkPath($XDG_STATE_HOME///.json), never lowers it, and fails closed if the file does not parse.Catalogue(source)returnsFreshCatalogueSource{OCICatalogue, FileFreshness{MarkPath("catalogue", source.Reference)}}; internal/app/statestore/catalogue.go:25-47 routes both the default and the configured catalogue through it, and server.go:277 puts it on the storepkg Service. Every catalogue consumer (webui extensions list/install, InstallFromCatalogue, the auto-update loop in domain/storepkg/update.go) goes through Service.ListCatalogue, so there is no unfreshened path.What I did not verify: I could not run
go testin this read-only session, so I am reporting the tests' content, not their green state; and.githas only packed objects, so I confirmed via the ref files that HEAD and main are the same commit rather than reading the commit log.Two things a reviewer should know, neither of which is a change to archie-core: no catalogue publisher exists in this repo, so whatever publishes the official catalogue must now include
issued_ator installs will fail closed; and CHANGELOG.md [Unreleased] has no entry for this, unlike the equivalent release-side protection noted at line 88. If this issue is still tracked as open, the right action is to close it (optionally with a changelog line), not to start a workflow.