-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds automated sbom creation and upload to publish-image step (#1887)
Co-authored-by: Lukas Hinterreiter <90035514+luhi-DT@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Upload SBOM | ||
description: uploads a sbom for a given image to a registry | ||
inputs: | ||
image: | ||
description: full image to generate and attach sbom | ||
required: true | ||
sbom: | ||
description: sbom of type cyclonedx to attach to image | ||
required: true | ||
signing-key: | ||
description: private signing key | ||
required: true | ||
signing-password: | ||
description: password for private signing key | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 # v3.0.5 | ||
- name: Attach sbom attestation to image | ||
shell: bash | ||
run: | | ||
cosign attest -y --key env://COSIGN_PRIVATE_KEY --type cyclonedx --predicate ${{ inputs.sbom }} ${{ inputs.image }} | ||
env: | ||
COSIGN_PRIVATE_KEY: ${{ inputs.signing-key }} | ||
COSIGN_PASSWORD: ${{ inputs.signing-password }} | ||
- name: Attach sbom attestation to image and sign keyless | ||
shell: bash | ||
run: | | ||
cosign attest -y --type cyclonedx --predicate ${{ inputs.sbom }} ${{ inputs.image }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters