Skip to content

security: cosign sign release tarballs, Docker image, and CycloneDX SBOM#518

Open
BryanFRD wants to merge 1 commit into
mainfrom
feat/sign-and-sbom-release
Open

security: cosign sign release tarballs, Docker image, and CycloneDX SBOM#518
BryanFRD wants to merge 1 commit into
mainfrom
feat/sign-and-sbom-release

Conversation

@BryanFRD
Copy link
Copy Markdown
Contributor

Closes #510. Independent of the Rust PR queue (#505 / #516 / #517) — only touches the publish workflow + docs.

What ships now

  • The 5 platform tarballs each get `.sig` + `.crt` sidecars attached to the GitHub Release
  • The Docker image `ghcr.io/ferrlabs/ferrflow:vX.Y.Z` gets a Sigstore signature recorded in GHCR + Rekor
  • A signed CycloneDX SBOM (`sbom.cdx.json` + sidecars) for downstream supply-chain scanners

How

Keyless Sigstore — no private keys to manage. The signing identity is the workflow's OIDC token, recorded in the public Rekor log. Verification:

```bash
cosign verify-blob
--certificate ferrflow-linux-x64.tar.gz.crt
--signature ferrflow-linux-x64.tar.gz.sig
--certificate-identity-regexp "https://github.com/FerrLabs/FerrFlow/.*\"
--certificate-oidc-issuer https://token.actions.githubusercontent.com
ferrflow-linux-x64.tar.gz
```

Full user-facing guide in `docs/verifying-releases.md`.

Cost

  • +30s for the cosign signing steps
  • +1.5 min for `cargo install cargo-cyclonedx` first time (cache later if it becomes annoying)
  • SBOM size: ~50-200 KB

Test plan

  • Next release: verify the GitHub Release page has the `.sig`/`.crt` sidecars next to each tarball
  • `cosign verify-blob` succeeds locally on the downloaded files
  • `cosign verify ghcr.io/ferrlabs/ferrflow:vX.Y.Z` succeeds
  • `sbom.cdx.json` parses as valid CycloneDX (grype / trivy can read it)

Closes #510.

## What's signed

- The 5 platform tarballs (linux-x64/arm64, darwin-x64/arm64, win32-x64)
  → .sig + .crt sidecars attached to the GitHub Release
- The Docker image (ghcr.io/ferrlabs/ferrflow:latest + :vX.Y.Z)
  → Sigstore signature recorded in GHCR + Rekor
- CycloneDX SBOM (sbom.cdx.json) → also signed via cosign

## How

All keyless. The signing identity is the GitHub Actions OIDC workload
identity:
  https://github.com/FerrLabs/FerrFlow/.github/workflows/publish.yml@refs/tags/vX.Y.Z
recorded in the public Rekor transparency log. No private keys to
manage or rotate.

## Verification

Documented in docs/verifying-releases.md with copy-paste commands for
cosign verify-blob (tarballs + SBOM) and cosign verify (Docker).

## Cost

- +30s on the release workflow for the signing step
- +1.5 min for cargo install cargo-cyclonedx (one-shot; could be cached
  via taiki-e/install-action if it becomes annoying)
- SBOM size ~50-200 KB depending on dep count

## Why this matters

Several compliance-focused customers asked for either SLSA provenance
(already there via attest-build-provenance) or Sigstore signatures.
This closes the second leg cheaply. SBOMs are increasingly a hard
intake gate for vulnerability scanners (Grype, Trivy, JFrog Xray).
Copilot AI review requested due to automatic review settings May 24, 2026 12:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: fa4ad9c Previous: 0b5fe57 Ratio
changelog/build_50 6817 ns/iter (± 94) 7955 ns/iter (± 147) 0.86
changelog/build_500 60871 ns/iter (± 1690) 68596 ns/iter (± 1303) 0.89

This comment was automatically generated by workflow using github-action-benchmark.

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.

security: cosign signing for release artifacts + Docker image, SBOM in tarball

2 participants