Repository navigation
fix(ci): verify cosign signature on seed image in rebuild-rpms - #180
mrbobbytables wants to merge 1 commit into
Conversation
Verify the pulled ghcr.io/<owner>/utah-packages:latest seed image against the workflow's keyless OIDC identity before extracting RPMs into the repository. Verify against the exact pulled digest to prevent tag mutation, add a unit test verifying the seed verification step, and document triage guidance in the build-failure-triage skill. Fixes projectbluefin#173 Assisted-by: Gemini 3.8 Flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
castrojo
left a comment
There was a problem hiding this comment.
Substantive review:
- Security hardening: In rebuild-rpms.yml publish job, downloads and checksum-verifies cosign v2.4.1 binary and performs keyless cosign verification against the pulled image digest and main branch OIDC identity before container extraction.
- Test Enforcement: Adds test_seed_step_verifies_cosign_signature in tests/test_atomic_publish.py to assert cosign verification.
- Validation: Factory contract, validate.py, and unittest suite pass without errors.
- Outstanding: CI rebuild matrix jobs are currently queued/running; awaiting CI completion and independent peer review (+2).
|
Closing to consolidate the queue on the merged #178 full-factory candidate. The branch is retained; please re-open or submit a fresh, rebased PR after that build establishes the current baseline. |
There was a problem hiding this comment.
correctness
- (low)
cosign verifyin the seed step runs with no registry credentials: the step'spodman login(.github/workflows/rebuild-rpms.yml:572) writes podman's auth file, but cosign reads the Docker config — the quirk this same workflow documents and works around withDOCKER_CONFIGon the sign step (rebuild-rpms.yml:706–709, 738–744). It works today only because the GHCR package is publicly readable (verified anonymously). If the package ever goes private, the publish job hard-fails at verify with an auth error that the new SKILL.md triage row (line 160) misclassifies as tampering. Consider settingDOCKER_CONFIG+--authfileon this step the same way the publish/sign steps do.
Verified live at head 57fcdbe: the current :latest digest's cosign cert SAN is exactly https://github.com/projectbluefin/utah-packages/.github/workflows/rebuild-rpms.yml@refs/heads/main with issuer https://token.actions.githubusercontent.com, so the pinned regexp matches and the next main publish won't brick. tests/test_atomic_publish.py (10 tests) passes at head.
No findings from: security, intent-alignment, style, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
Summary
In
.github/workflows/rebuild-rpms.yml, thepublishjob's step "Seed repository from the last published factory image" pulledghcr.io/<owner>/utah-packages:latestand extracted its RPMs intorepository/without verifying the image signature or provenance attestation.This change:
^https://github.com/${{ github.repository }}/\.github/workflows/rebuild-rpms\.yml@refs/heads/main$) and certificate issuer before creating the container or copying RPMs out of it.ghcr.io/<owner>/utah-packages@<digest>).tests/test_atomic_publish.pyasserting that the seed step verifies the cosign signature against OIDC parameters.cosign verifyfailure classification and triage guidance in.agents/skills/build-failure-triage/SKILL.md.Fixes #173
— hive: backend=copilot model=gemini-3.8-flash
🐝 Hive Agent:
contributor| SHA:57fcdbe