Skip to content

Commit 6287bfc

Browse files
CI(release): Migrate provenance step to actions/attest
actions/attest-build-provenance has been a wrapper over actions/attest since v4, and GitHub steers new work at the underlying action. With no predicate-type/predicate supplied, actions/attest emits SLSA build provenance, so the published predicate is unchanged and the SBOM step already used it. The swap is not quite a one-line change. The wrapper also sets NODE_OPTIONS=--max-http-header-size=32768 on the step it wraps: node caps a single response's headers at 16KB, which some OCI registries overflow when attestations are pushed as referrers (actions/attest-build-provenance#687). push-to-registry is unconditional here, so every release took that path and dropping the setting would have reintroduced the overflow. Carry it across with a comment saying why, so a later tidy-up does not read it as redundant. Set it on the SBOM step too. That step was migrated to actions/attest earlier and pushes referrers the same way, so it has been running without the guard; nothing has overflowed yet, but the exposure is identical and the inconsistency invites removing the one that remains. Closes: lfreleng-actions#192 Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
1 parent 7261d16 commit 6287bfc

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,9 @@ jobs:
994994
packages: write # Attach signatures/attestations as OCI referrers
995995
# yamllint disable-line rule:line-length
996996
id-token: write # cosign keyless signing + attestation predicates use OIDC
997-
# actions/attest-build-provenance + actions/attest write
998-
# signed attestations and (with push-to-registry: true) attach
999-
# them as OCI referrers on the manifest digest.
997+
# actions/attest writes signed attestations and (with
998+
# push-to-registry: true) attaches them as OCI referrers on
999+
# the manifest digest.
10001000
attestations: write # Write signed build attestations
10011001
timeout-minutes: 20
10021002
strategy:
@@ -1075,8 +1075,23 @@ jobs:
10751075
run: cosign sign --yes "${IMAGE_REF}"
10761076

10771077
- name: 'Attest build provenance'
1078+
env:
1079+
# Carried over from actions/attest-build-provenance, which
1080+
# set this on its wrapped actions/attest step. Node caps a
1081+
# single response's headers at 16KB by default, which some
1082+
# OCI registries overflow when attestations are pushed as
1083+
# referrers. Every release here takes that path
1084+
# (push-to-registry below is unconditional), so the setting
1085+
# is load-bearing, not vestigial.
1086+
# See actions/attest-build-provenance#687.
1087+
NODE_OPTIONS: '--max-http-header-size=32768'
1088+
# attest-build-provenance has been a wrapper over
1089+
# actions/attest since v4; GitHub steers new work at the
1090+
# underlying action. With no predicate-type/predicate given,
1091+
# actions/attest emits SLSA build provenance, which is what
1092+
# the wrapper produced.
10781093
# yamllint disable-line rule:line-length
1079-
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
1094+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
10801095
with:
10811096
subject-name: ${{ steps.ref.outputs.image }}
10821097
subject-digest: ${{ steps.ref.outputs.digest }}
@@ -1106,6 +1121,10 @@ jobs:
11061121
name: sbom-${{ matrix.component }}
11071122

11081123
- name: 'Attest SBOM'
1124+
env:
1125+
# Same registry header-overflow guard as the provenance
1126+
# step above; this step pushes referrers too.
1127+
NODE_OPTIONS: '--max-http-header-size=32768'
11091128
# `actions/attest-sbom` was deprecated in favour of the
11101129
# combined `actions/attest` action, which supports SBOM
11111130
# mode automatically when `sbom-path:` is provided. The

0 commit comments

Comments
 (0)