Commit 6d7a83e
feat(release): add SBOM-to-archive attestation linkage (#141)
* feat(release): add SBOM-to-archive attestation linkage
## What
Add a new `attest_sboms` matrix job that runs `actions/attest-sbom` per
(archive, SBOM) pair after `release_goreleaser` produces artifacts.
Expose `sbom_matrix` and `is_public` as outputs from `release_goreleaser`,
upload `dist/` as a workflow artifact when SBOMs are detected, and gate
`publish_release` on `attest_sboms` so the draft is published only after
all SBOM attestations complete.
## Why
Today the workflow generates build provenance attestations against every
artifact in `dist/`, including `*.spdx.json` files as standalone
subjects, but it does not link an archive to its corresponding SBOM.
Consumers running `gh attestation verify --predicate-type https://spdx.dev/Document`
against a downloaded archive cannot discover its SBOM via the
attestation graph. Adding `actions/attest-sbom` linkage closes that gap
and removes the need for per-consumer follow-on jobs that replicate the
matrix dance locally.
## Notes
- New job runs only when `create-attestation: true`, the repo is public,
and `dist/*.spdx.json` files exist. Behavior is unchanged when SBOMs
are not produced or attestation is off.
- Matrix is generated from `dist/*.spdx.json` filenames, stripping
`.spdx.json` to derive the archive path. Requires GoReleaser's default
`${artifact}.spdx.json` naming pattern (or any pattern that maps 1:1
by the same suffix strip).
- `publish_release` now waits for `attest_sboms` to succeed-or-skip, so
SBOM attestation failures will block publish (mirrors the existing
gate on `release_goreleaser` and `release_image`). Matrix uses
`fail-fast: false` so one failed pair does not cancel the others.
- `dist/` upload uses 1-day retention; consumed by the matrix job
immediately, no long-term need.
- `release_goreleaser` continues to do `attest-build-provenance` over
`dist/*.spdx.json`; the new linkage is additive, not a replacement.
Signed-off-by: jmeridth <jmeridth@gmail.com>
* Update release.yaml
Co-authored-by: Zack Koppert <zkoppert@github.com>
Signed-off-by: Jason Meridth <jmeridth@gmail.com>
---------
Signed-off-by: jmeridth <jmeridth@gmail.com>
Signed-off-by: Jason Meridth <jmeridth@gmail.com>
Co-authored-by: Zack Koppert <zkoppert@github.com>1 parent 50ddb99 commit 6d7a83e
2 files changed
Lines changed: 60 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
230 | 282 | | |
231 | 283 | | |
232 | 284 | | |
| |||
306 | 358 | | |
307 | 359 | | |
308 | 360 | | |
309 | | - | |
| 361 | + | |
310 | 362 | | |
311 | 363 | | |
312 | 364 | | |
313 | 365 | | |
314 | 366 | | |
| 367 | + | |
315 | 368 | | |
316 | 369 | | |
317 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
0 commit comments