From aad5e719ff1361acc388a363896223ce90c656fb Mon Sep 17 00:00:00 2001 From: Daniel Young <9008637+YoungDan@users.noreply.github.com> Date: Fri, 29 May 2026 12:53:21 +0200 Subject: [PATCH] ci(cli): wire real SLSA provenance subjects from release archives Add a hashes job that base64-encodes sha256sums of the distributable archives and feed them to the SLSA generator base64-subjects input (was empty). Gate provenance behind publish so the release exists before the attestation is uploaded. --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 202da4a..af02c7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,6 +115,30 @@ jobs: deslicer-${{ matrix.target }}.* if-no-files-found: error + hashes: + name: Compute artifact hashes for provenance + needs: build + runs-on: ubuntu-latest + outputs: + hashes: ${{ steps.hash.outputs.hashes }} + steps: + - name: Download all build artifacts + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 + with: + path: release-assets + merge-multiple: true + + - name: Compute base64 subjects + id: hash + shell: bash + run: | + set -euo pipefail + cd release-assets + # Provenance subjects are the distributable archives only + # (exclude .sha256 / .sig / .cert sidecars). + sha256sum deslicer-*.tar.gz deslicer-*.zip > SHA256SUMS + echo "hashes=$(base64 -w0 SHA256SUMS)" >> "$GITHUB_OUTPUT" + publish: name: Sign, provenance, and release needs: build @@ -180,7 +204,9 @@ jobs: provenance: name: SLSA provenance - needs: build + # Depends on hashes for the subjects and publish so the release exists + # before the .intoto.jsonl attestation is attached to it. + needs: [hashes, publish] permissions: actions: read id-token: write @@ -188,5 +214,5 @@ jobs: # Reusable workflow pinned to slsa-github-generator v2.0.0. uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@5a775b367a56d5bd118a224a811bba288150a563 # v2.0.0 with: - base64-subjects: "" + base64-subjects: ${{ needs.hashes.outputs.hashes }} upload-assets: true