Skip to content

security: sign release artifacts with keyless cosign + SLSA provenance (#104)#105

Merged
scttfrdmn merged 3 commits into
mainfrom
feat/cosign-signing
Jul 22, 2026
Merged

security: sign release artifacts with keyless cosign + SLSA provenance (#104)#105
scttfrdmn merged 3 commits into
mainfrom
feat/cosign-signing

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Part of the suite-wide supply-chain effort (spore-host#344). Signs the downloadable CLI artifacts, which previously shipped with checksums.txt only (corruption detection, not publisher authentication).

What

  • .goreleaser.yaml — a signs: block runs keyless cosign sign-blob --bundle over checksums.txt. Because that file lists the SHA-256 of every archive/package, one signature transitively authenticates the whole release. Keyless uses the release workflow's GitHub OIDC identity via Fulcio/Rekor — no long-lived key to manage or leak. Publishes checksums.txt.bundle.
  • release.yaml — installs cosign (pinned cosign-installer), adds attestations: write, and adds actions/attest-build-provenance over checksums.txt for SLSA build provenance. (id-token: write was already present.)

cosign 3.x note

cosign 3.x emits the modern Sigstore bundle (--bundle, bundling signature + Fulcio cert + Rekor entry) and no longer supports the old --output-signature/--output-certificate flags. The signs: block uses --bundle accordingly — same lesson as the spored KMS work.

Verified locally (end-to-end)

Using a key-based stand-in for the OIDC-only piece:

  • GoReleaser invokes cosign and writes dist/checksums.txt.bundle
  • cosign verify-blob --bundle …Verified OK
  • a tampered checksums.txtrejected (invalid signature) ✓
  • goreleaser check valid (only the pre-existing brews deprecation, untouched)

Takes effect from the next tagged release. Closes #104.

find had no --show-price — only the deprecated search (which #44 merged into
find) and the spot-centric spot command exposed pricing, so the canonical
'what does this cost' question couldn't be answered with the canonical search
command. Add --show-price to find, populating the on-demand $/hr column via
awsClient.OnDemandPrice (SageMaker ml.* keeps its management-premium rate).
Composes with --regions. Default output is unchanged (no price column).

Mirrors the old search behavior. Test: TestFindCommand_Flags asserts the flag;
docs-gen/find.md regenerated (drift gate).

Closes #50
#104)

Signs checksums.txt with keyless cosign (Sigstore) using the release
workflow's GitHub OIDC identity — no long-lived key. Since checksums.txt
lists every artifact's SHA-256, one signature transitively authenticates the
whole release: verify the bundle, then each file against checksums.txt.

- .goreleaser.yaml: signs: block → cosign sign-blob --bundle (cosign 3.x
  emits the modern Sigstore bundle; the old --output-signature/-certificate
  flags are gone). Publishes checksums.txt.bundle.
- release.yaml: install cosign (pinned installer), add id-token +
  attestations permissions, add actions/attest-build-provenance over
  checksums.txt for SLSA provenance.

Validated locally end-to-end (key-based stand-in for the OIDC-only piece):
GoReleaser invokes cosign, writes the bundle, cosign verify-blob --bundle
returns Verified OK, and a tampered checksums.txt is rejected. Takes effect
from the next tagged release. Refs spore-host#344.

Closes #104
Trivy flagged google.golang.org/grpc v1.80.0/v1.81.1 (indirect) for
GHSA-hrxh-6v49-42gf (HIGH). Repo-wide advisory-DB finding, folded into this
signing PR to keep it green.
@scttfrdmn
scttfrdmn merged commit 02626df into main Jul 22, 2026
5 checks passed
@scttfrdmn
scttfrdmn deleted the feat/cosign-signing branch July 22, 2026 04:04
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/find.go 11.11% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sign release artifacts with cosign/OIDC (+ SLSA provenance)

1 participant