Interview Prep/DevSecOps/Supply chain: signing, SBOM and dependencies

`gh attestation verify` fails with `no attestations found` for a release binary

BeginnerTroubleshootingSupply chain: signing, SBOM and dependencies
Answer

Likely causes → The workflow did not run actions/attest-build-provenance, lacked attestations: write/id-token: write, or you verify a re-zipped file with a different hash.

Diagnose →

sha256sum app-linux-amd64
gh attestation verify app-linux-amd64 --owner acme

Fix →

permissions: { id-token: write, attestations: write, contents: read }
- uses: actions/attest-build-provenance@v2
  with: { subject-path: dist/app-linux-amd64 }

Prevent → Verify attestations as a step in the deploy job so a missing one fails early.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply chain: signing, SBOM and dependencies