Skip to content

Commit 1f23756

Browse files
committed
sign sbom
1 parent 2615dcd commit 1f23756

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ jobs:
9494
repo_path: ./local_kernel
9595
source_path: ./
9696

97+
# 1. Install cosign tool
98+
- name: Install Cosign
99+
uses: sigstore/cosign-installer@v3.8.1
100+
101+
# 2. Sign the sbom.spdx file using cosign. Two files are produced: sbom.sig and sbom.crt, stored in the same directory as sbom.spdx
102+
- name: Attest SBOM
103+
working-directory: ./local_kernel
104+
run: |
105+
cosign sign-blob sbom.spdx --output-certificate='sbom.crt' --output-signature='sbom.sig' -y
106+
# The following is a sanity check. After signing, we verify the image to check that everything is OK
107+
cosign verify-blob --signature='sbom.sig' --certificate='sbom.crt' --certificate-identity-regexp=.* --certificate-oidc-issuer-regexp='https://github.com' ./sbom.spdx
108+
97109
- name: commit SBOM file
98110
env:
99111
VERSION_NUMBER: ${{ github.event.inputs.version_number }}

0 commit comments

Comments
 (0)