Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions sbom/action.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
name: Download the Augmented SBOM
description: Downloads the Augmented SBOM for the project
name: Augment the SBOM
description: Augments the SBOM for the project
inputs:
# no longer used
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar w/ GHA, but I assume that removing it would be breaking

silk_asset_group:
description: The Silk Asset Group for the Project
required: true
required: false
sbom_in_path:
description: The path of the input sbom file.
default: sbom.json
sbom_file_name:
description: The name of the augmented sbom file.
default: cyclonedx.sbom.json
kondukto_sub_project:
description: The Kondukto sub-project name (appended to the branch name)
required: false
artifactory_image:
description: Image to use for artifactory
default: artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0
default: artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0

runs:
using: composite
steps:
- name: Download the Augmented SBOM file to the release assets and s3 assets folders
- name: Augments the SBOM file and writes it to the release assets and s3 assets folders
shell: bash
run: |
set -eux
if [ -n "${{ inputs.kondukto_sub_project }}" ]; then
KONDUKTO_BRANCH="${GITHUB_REF_NAME}_${{ inputs.kondukto_sub_project }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

append kondukto_sub_project to the branch name if set

else
KONDUKTO_BRANCH="${GITHUB_REF_NAME}"
fi
podman run --platform="linux/amd64" -it --rm -v ${RELEASE_ASSETS}:/pwd \
--env-file=${SILKBOMB_ENVFILE} \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assumption here is that KONDUKTO_TOKEN is set in the environment file

${{ inputs.artifactory_image }} \
download --silk-asset-group ${{ inputs.silk_asset_group }} --sbom-out /pwd/cyclonedx.sbom.json
augment --sbom-in /pwd/${{ inputs.sbom_in_path }} --repo ${GITHUB_REPOSITORY} --branch ${KONDUKTO_BRANCH} --sbom-out /pwd/cyclonedx.sbom.json
cp ${RELEASE_ASSETS}/cyclonedx.sbom.json ${S3_ASSETS}/${{ inputs.sbom_file_name }}

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion

Check failure

Code scanning / zizmor

code injection via template expansion Error

code injection via template expansion
Loading