Repository navigation
feat(catalog): check release inputs and verify signed community releases - #19
Merged
Merged
Conversation
update-catalog now validates the repository and tag before building any request URL, looks the repository up in approved-plugins.json before fetching, refuses drafts, prereleases, mismatched tags, older versions, and asset URLs outside the release, and reads manifest.json at one commit. Releases that carry plugin.sigstore.json are verified with gh attestation verify against either Silo's shared release workflow or a workflow in the plugin's own repository run from the release tag, and the entry records bundle_url. Once an entry is signed, unsigned releases of that plugin are refused. A manual run can roll back with allow_rollback. The update workflow drops its concurrency group, gives the workflow token no permissions, pins actions by SHA, and rebuilds on the current main for each push attempt. Ports Silo-Server/silo-plugins#21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. A signed release now must be signed by Silo's shared release workflow, checked with an exact --cert-identity. A plugin may be signed by a workflow in its own repository only when its approved-plugins.json entry names that file in the new optional signer_workflow field; the catalog then accepts exactly that workflow run from the release tag, and only for a commit GitHub reports as on the repository's default branch. check-catalog validates the field. No entry sets it, so every plugin requires the shared workflow. Signed entries now record each binary's SHA-256 in binaries.<platform>.checksum, computed from the file gh verified, so the listed bytes stay pinned if release assets change. Unsigned entries are unchanged. Binary asset names must have lowercase alphanumeric os and arch parts, so plugin-linux-amd64.zip is no longer read as a binary. The private Sigstore instance test now fails on the issuer check, and new tests cover the manifest plugin ID, a signed release without binaries, the download size cap, annotated tag resolution, and the signer rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Related issue: N/A (maintainer-directed; ports Silo-Server/silo-plugins#21)
The community catalog tells Silo servers which plugin binaries to download, and servers update plugins unattended.
update-catalogbuilds an entry from whatever repository and tag arepository_dispatchnames. It put the tag into the release and manifest request URLs without checking its form, so a crafted tag could make those requests resolve to another repository's release. It also took asset URLs as returned, let an older release replace the listed one, readmanifest.jsonat a tag that can be moved, and had no way to record or check a release signature. The official catalog fixed the same problems in Silo-Server/silo-plugins#21.Approach
update-catalognow refuses a release unless all of these hold, and writesmanifest.jsononly after the last check:tag_nameequals the requested tag.approved-plugins.json, spelled exactly as there. The tool resolves the plugin ID from the registry before any request, and the release'smanifest.jsonmust name that ID. The registry stays the binding between plugin ID and repository; entries still carryapproval,PruneUnapprovedstill runs on every write, andcheck-catalogis unchanged.checksums.txt,plugin.sigstore.json) is exactly that release's download URL for that asset. Other assets, such as the tailscale plugin's.ziparchives, are ignored.workflow_dispatchrun can setallow_rollback; a dispatch payload cannot.manifest.jsonis read at one commit: the commit in the signing certificate for a signed release, or the commit the tag resolves to (following annotated tags) for an unsigned one.plugin.sigstore.json, every binary must passgh attestation verifyand every binary must name the same commit. The tool also requires the public-good Sigstore issuer and a transparency-log entry, whichghalone does not.plugin-<os>-<arch>with lowercase alphanumeric parts, soplugin-linux-amd64.zipis not read as a binary.Signing identity works the same way as the official catalog by default: the certificate must name Silo's shared workflow,
https://github.com/Silo-Server/.github/.github/workflows/plugin-release.yml@refs/heads/main, checked with an exact--cert-identity. A community plugin may instead be signed by a workflow in its own repository, but only when itsapproved-plugins.jsonentry names that file in a new optionalsigner_workflowfield (a plain.ymlor.yamlfile name). The catalog then accepts exactlyhttps://github.com/<repo>/.github/workflows/<signer_workflow>@refs/tags/<tag>, stops accepting the shared workflow for that plugin, and requires the signed commit to be on the repository's default branch: GitHub's compare API, with the default branch looked up from the repository, must report the commit as identical or behind. Setting the field is an approval decision, documented in APPROVAL_POLICY.md;check-catalogvalidates its format. This pull request does not set it on any entry, so every plugin currently needs the shared workflow.For both signers,
--repois the approved repository. With--bundle,--repochecks the certificate's source repository, not the signer's, so the shared workflow is accepted only when it built the approved repository. The issuer,--source-ref=refs/tags/<tag>,--deny-self-hosted-runners, and SLSA provenance v1 are always required.Signed entries gain a package-level
bundle_urlnext tochecksums_url, and each binary gainschecksum: the SHA-256 of the fileghverified. Silo servers prefer that value overchecksums_url, so the listed bytes stay pinned even if release assets are replaced later. Unsigned entries are unchanged. Unsigned releases stay accepted for a plugin whose entry has nobundle_url; once an entry is signed, an unsigned release of that plugin is refused.update-catalog.ymldrops its concurrency group, gives the workflow token no permissions (CATALOG_PUSH_TOKENpushes), passes payload values throughenv:, and pinsactions/checkoutandactions/setup-goby commit SHA at the v6 releases the workflow already used. Each push attempt resets to the currentmain, reruns the update, and runscheck-catalog. That replaces the oldgit pull --rebase.README.md documents the rules and what each kind of signer proves. CONTRIBUTING.md is new, since the repository had no contribution guide.
Validation
go test ./...,go vet ./...,go build ./...,go run ./cmd/check-catalog(all withGOWORK=off): pass.gofmt -l .: no output.actionlint1.7.12: no findings.gharguments for both signers, the output check, and thesigner_workflowformat. Signer tests cover the default (shared only), a registry-declared workflow, another workflow file, a branch ref, another tag, another repository, and, through a stubbed GitHub lookup, a commit ahead of or diverged from the default branch. The private Sigstore instance case was confirmed to fail when the issuer check is disabled.Silo-Community/silo-plugins-requests-arrwasrequests-seerr's. After the change, the same input is refused before any request.requests-arrv0.1.11,requests-seerrv0.2.1,tailscalev0.2.2,watchprovider-scrobv0.3.1) is a no-op. With-allow-rollback, each entry is rebuilt and the catalog copy is byte-identical tomanifest.json.requests-arrv0.1.10 is refused as older.Silo-Server/silo-plugin-metadata-tmdbv1.2.30 linux/amd64 binary against its bundle, and the output check returned its commit.ghrefused the same bundle with own-workflow arguments, with another repository, and with another tag.update-catalogitself refuses that release because the repository is not in the approval registry.Risks
permissions: {}, theallow_rollbackinput, the retry loop) have not run on Actions.requests-arrv0.1.11 andrequests-seerrv0.2.1 tags point at a commit one ahead ofmain. If either plugin is later given asigner_workflowwithout changing how it tags releases, its signed releases will be refused by the default-branch rule.manifest.json, so removing a plugin from the registry takes effect on the next real update, not on a re-run of a listed release.Checklist
AI Disclosure
🤖 Generated with Claude Code