ci(build_all): attest release firmware and SBOM provenance

Release tags now publish signed SLSA build provenance for every
firmware file and SBOM through GitHub artifact attestations (public
Sigstore). The files are unchanged; consumers verify them with
`gh attestation verify <file> --repo PX4/PX4-Autopilot`. Each SBOM
records the SHA-256 of its .px4, so a verified SBOM is bound to the
firmware it describes.

Branch builds are not attested.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche committed 2026-11-19 07:07:28 -08:00
1 parent f93d727a4b
commit 2b90152c90
1 file changed
+31
+31
View File
@@ -321,6 +321,16 @@ jobs:
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
needs: [setup, group_targets]
if: startsWith(github.ref, 'refs/tags/v') || contains(fromJSON('["main","stable","beta"]'), needs.group_targets.outputs.branchname)
# Job-level permissions replace the workflow-level ones, so restate them.
# id-token, attestations and artifact-metadata are for the release
# attestations below.
permissions:
contents: write
actions: read
packages: read
id-token: write
attestations: write
artifact-metadata: write
outputs:
uploadlocation: ${{ steps.upload-location.outputs.uploadlocation }}
steps:
@@ -330,6 +340,27 @@ jobs:
path: artifacts/
merge-multiple: true
# Signed SLSA build provenance for every released file, verifiable with
# `gh attestation verify <file> --repo PX4/PX4-Autopilot`. Each SBOM
# records the SHA-256 of its .px4, so the attested SBOM is bound to the
# firmware it describes. Two steps keep each under the 1024-subject limit.
- name: Attest Firmware Provenance
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/attest@v4
with:
subject-path: |
artifacts/*.px4
artifacts/*.uavcan.bin
artifacts/*_bootloader.bin
artifacts/*_canbootloader.bin
artifacts/*.deb
- name: Attest SBOM Provenance
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/attest@v4
with:
subject-path: artifacts/**/*.sbom.spdx.json
- name: Choose Upload Location
id: upload-location
run: |