File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 id-token : write # For cosign
2626 packages : write # For GHCR
2727 contents : read # Not required for public repositories, but for clarity
28+ attestations : write # For build provenance attestations
2829 steps :
2930 - name : Cosign install
3031 uses : sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
8687 mkdir tmp
8788
8889 - name : GoReleaser
90+ id : goreleaser
8991 uses : goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
9092 with :
9193 version : v2.1.0
@@ -116,6 +118,12 @@ jobs:
116118 ghcr.io/aquasecurity/trivy:canary
117119 public.ecr.aws/aquasecurity/trivy:canary
118120
121+ - name : Generate build provenance attestations
122+ if : ${{ inputs.goreleaser_config != 'goreleaser-canary.yml' }}
123+ uses : actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
124+ with :
125+ subject-checksums : dist/trivy_${{ fromJSON(steps.goreleaser.outputs.metadata).version }}_checksums.txt
126+
119127 - name : Cache Trivy binaries
120128 uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
121129 with :
You can’t perform that action at this time.
0 commit comments