Skip to content

feat(refactor-release): publish release SBOMs - #12869

Draft
DariuszPorowski wants to merge 2 commits into
dp/goreleaser-tag-cutoverfrom
dp/goreleaser-sboms
Draft

feat(refactor-release): publish release SBOMs#12869
DariuszPorowski wants to merge 2 commits into
dp/goreleaser-tag-cutoverfrom
dp/goreleaser-sboms

Conversation

@DariuszPorowski

@DariuszPorowski DariuszPorowski commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Generate SPDX JSON SBOMs for all seven raw rad release binaries with checksum-verified Syft v1.51.1, and attach per-platform SPDX SBOM attestations to the five GoReleaser production images.

Verify the exact CLI SBOM asset set and document structure on draft and published releases. Verify one image attestation per locked production platform before image locking, finalization, and published-release reconciliation. Existing binary names and checksum assets remain unchanged.

This stacked PR depends on #12828.

Draft gate: keep this PR in draft until one RC draft release contains all seven well-formed CLI SBOM assets and valid attestations for every production-image platform.

  • Observe the complete SBOM set on one RC draft release.

Reason for change

PR13 made GoReleaser authoritative for core release artifacts. This additive follow-up uses its native Syft and dockers_v2 integration to expose dependency inventories without creating a parallel publishing path or weakening the existing parity contract.

Fixes #12818

How to test

  • make goreleaser-snapshot GORELEASER_ARGS="--skip=docker" built all 22 targets, generated seven SPDX 2.3 CLI SBOMs, generated no unintended SBOM checksum sidecars, and passed the enhanced output verifier.
  • bash .github/scripts/release-sboms_test.sh
  • bash .github/scripts/release-oci-artifacts_test.sh (14 tests, including missing and malformed image attestations)
  • bash .github/scripts/release-parity-manifest_test.sh
  • node --test .github/scripts/release-assets_test.mjs (15 tests)
  • Full affected release suite, tooling tests, Make graph, ShellCheck, actionlint, Prettier, markdownlint, and Markdown table checks pass.
  • The installer downloaded Syft v1.51.1 and verified all four pinned archive hashes against the upstream checksum file.

The image-attestation path is covered locally with deterministic Buildx fixtures. A real registry publication remains the draft exit criterion above.

File change summary

File Summary of change
.goreleaser.yaml Generate deterministic CLI SPDX assets and enable production-image SBOM attestations while isolating SBOMs from binary checksums.
build/tools.yaml, build/tools.generated.mk, build/tools.mk, build/scripts/install-syft.sh Pin and checksum-verify Syft v1.51.1 on Linux and macOS for amd64 and arm64.
.github/workflows/{goreleaser-snapshot,build-release}.yaml Install Syft, retain generated documents, and gate draft, finalization, and published reconciliation paths on SBOM verification.
.github/scripts/{verify-goreleaser-snapshot,release-assets,release-oci-artifacts,release-parity-manifest}* Validate local and remote SPDX documents, per-platform image attestations, exact asset sets, checksum isolation, and parity classification.
.github/scripts/release-sboms_test.sh, build/test.mk Add a focused SBOM contract suite to the repository test graph.
docs/contributing/contributing-releases/README.md Document SBOM formats, names, locations, and image-attestation inspection.
eng/design-notes/tools/2026-09-goreleaser-stack-review/pr-14-goreleaser-sboms.md Review note for this layer: what changed in review, why, the value, and the impact

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    460 suites  ±0   7m 59s ⏱️ -51s
6 573 tests ±0  6 571 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 874 runs  ±0  7 872 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 3a86a49. ± Comparison against base commit 03b039a.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.77%. Comparing base (03b039a) to head (3a86a49).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           dp/goreleaser-tag-cutover   #12869      +/-   ##
=============================================================
- Coverage                      59.77%   59.77%   -0.01%     
=============================================================
  Files                            778      778              
  Lines                          45916    45916              
=============================================================
- Hits                           27446    27445       -1     
- Misses                         18470    18471       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Functional Tests - upgrade-noncloud

1 tests  ±0   0 ✅ ±0   5m 5s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 3a86a49. ± Comparison against base commit 03b039a.

♻️ This comment has been updated with latest results.

@DariuszPorowski
DariuszPorowski force-pushed the dp/goreleaser-sboms branch 3 times, most recently from a04b9ae to 798f05c Compare August 28, 2026 20:17
@DariuszPorowski DariuszPorowski changed the title feat: publish release SBOMs feat(refactor-release): publish release SBOMs Aug 28, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Functional Tests - cli-noncloud

48 tests  ±0   48 ✅ ±0   11m 39s ⏱️ +16s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 65ee3a7. ± Comparison against base commit 158a1a4.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Functional Tests - corerp-noncloud

190 tests  ±0   188 ✅ ±0   1h 14m 16s ⏱️ + 2m 8s
  3 suites ±0     2 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 65ee3a7. ± Comparison against base commit 158a1a4.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Functional Tests - corerp-cloud

32 tests  ±0   31 ✅ ±0   21m 44s ⏱️ + 2m 28s
 2 suites ±0    1 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 65ee3a7. ± Comparison against base commit 158a1a4.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The release gates accept schema-invalid SPDX documents, and the claimed deterministic output is not currently produced.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds SPDX SBOM generation and release verification for CLI binaries and production images.

Changes:

  • Configures Syft and GoReleaser SBOM generation.
  • Adds release gates and contract tests for SBOM assets and attestations.
  • Documents SBOM discovery and inspection.
File summaries
File Description
.cspellignore Allows the Anchore name.
.goreleaser.yaml Configures CLI and image SBOMs.
.github/scripts/release-assets.mjs Verifies published CLI SBOMs.
.github/scripts/release-assets_test.mjs Tests release SBOM verification.
.github/scripts/release-oci-artifacts.sh Verifies image attestations.
.github/scripts/release-oci-artifacts_test.sh Tests image SBOM validation.
.github/scripts/release-parity-manifest.sh Permits expected SBOM assets.
.github/scripts/release-parity-manifest_test.sh Tests parity classification.
.github/scripts/release-sboms_test.sh Adds SBOM contract tests.
.github/scripts/verify-goreleaser-snapshot.sh Validates generated SBOM output.
.github/workflows/build-release.yaml Gates releases on SBOM checks.
.github/workflows/goreleaser-snapshot.yaml Installs Syft and retains SBOMs.
build/scripts/install-syft.sh Installs checksum-verified Syft.
build/test.mk Adds SBOM tests to the test graph.
build/tools.generated.mk Defines generated Syft pins.
build/tools.mk Adds the Syft installation target.
build/tools.yaml Pins Syft release artifacts.
docs/contributing/contributing-releases/README.md Documents release SBOM usage.
Review details
  • Files reviewed: 18/18 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +78 to +90
typeof document !== "object" ||
document === null ||
!/^SPDX-2\.\d+$/.test(document.spdxVersion) ||
document.SPDXID !== "SPDXRef-DOCUMENT" ||
document.dataLicense !== "CC0-1.0" ||
typeof document.documentNamespace !== "string" ||
!document.documentNamespace.startsWith("https://") ||
typeof document.creationInfo?.created !== "string" ||
!Array.isArray(creators) ||
!creators.some((creator) => /^Tool: syft-/.test(creator)) ||
!Array.isArray(document.packages) ||
document.packages.length === 0 ||
!Array.isArray(document.relationships)
Comment on lines +695 to +707
| ($document | type == "object")
and ($document.spdxVersion
| type == "string" and test("^SPDX-2\\.[0-9]+$"))
and $document.SPDXID == "SPDXRef-DOCUMENT"
and $document.dataLicense == "CC0-1.0"
and ($document.documentNamespace
| type == "string" and startswith("https://"))
and ($document.creationInfo.created
| type == "string" and length > 0)
and any($document.creationInfo.creators[]?;
startswith("Tool: syft-"))
and ($document.packages | type == "array" and length > 0)
and ($document.relationships | type == "array")
Comment on lines +100 to +112
jq -e '
type == "object"
and (.spdxVersion
| type == "string" and test("^SPDX-2\\.[0-9]+$"))
and .SPDXID == "SPDXRef-DOCUMENT"
and .dataLicense == "CC0-1.0"
and (.documentNamespace
| type == "string" and startswith("https://"))
and (.creationInfo.created | type == "string" and length > 0)
and any(.creationInfo.creators[]?; startswith("Tool: syft-"))
and (.packages | type == "array" and length > 0)
and (.relationships | type == "array")
' "${file}" >/dev/null || fail "invalid SPDX JSON SBOM: ${file}"
Comment thread .goreleaser.yaml
Comment on lines +118 to +123
args:
- "${artifact}"
- --output
- "spdx-json=${document}"
- --enrich
- golang
@DariuszPorowski
DariuszPorowski force-pushed the dp/goreleaser-sboms branch 2 times, most recently from b15f1ce to 7a213bd Compare September 10, 2026 21:47
@DariuszPorowski
DariuszPorowski force-pushed the dp/goreleaser-sboms branch 2 times, most recently from 85fae29 to c1bd872 Compare September 10, 2026 22:27
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

Functional Tests - kubernetes-noncloud

23 tests   23 ✅  8m 6s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 78837b8.

♻️ This comment has been updated with latest results.

Generate SPDX JSON SBOMs for every raw rad binary with a pinned,
checksum-verified Syft release, and publish them as additive GitHub
Release assets without changing the existing binary checksum contract.

Enable BuildKit SBOM attestations on every GoReleaser production image
and require one valid SPDX document for each locked platform before
finalization. Recheck CLI and image SBOMs when reconciling an already
published release.

Classify the seven CLI SBOM files as intentional parity additions,
retain them with GoReleaser workflow metadata, and document how to find
both release assets and per-platform image attestations.

Refs: #12818
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
…on review notes

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
@radius-functional-tests

radius-functional-tests Bot commented Sep 11, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref 3a86a49
Unique ID func38519f3f1e
Image tag pr-func38519f3f1e
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func38519f3f1e
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func38519f3f1e
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func38519f3f1e
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func38519f3f1e
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func38519f3f1e
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate release SBOMs

2 participants