-
Notifications
You must be signed in to change notification settings - Fork 8
PYTHON-5141 Update SBOM usage for Kondukto #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
blink1073
merged 9 commits into
mongodb-labs:main
from
fetsko:fetsko/gha-sbom-action-silkbomb-2.0
Feb 20, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
01e48d4
silkbomb 2.0 updates
fetsko 3c69897
sbom_in_path for clarity
fetsko 58700f3
Add KONDUKTO_TOKEN usage
blink1073 18df4cd
syntax
blink1073 d7d93c6
use branch
blink1073 f479bd8
debug
blink1073 1d41cab
fix handling of input file
blink1073 380ca5b
clean up handling of silk
blink1073 d6693fb
revert to upstream
blink1073 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,25 +1,44 @@ | ||
| 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: | ||
| silk_asset_group: | ||
| description: The Silk Asset Group for the Project | ||
| required: true | ||
| 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 | ||
| # no longer used | ||
| silk_asset_group: | ||
| description: The Silk Asset Group for the Project | ||
| required: false | ||
|
|
||
| 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 | ||
| env: | ||
| SBOM_IN_PATH: ${{ inputs.sbom_in_path }} | ||
| KONDUKTO_SUB_PROJECT: ${{ inputs.kondukto_sub_project }} | ||
| ARTIFACTORY_IMAGE: ${{ inputs.artifactory_image }} | ||
| SBOM_FILE_NAME: ${{ inputs.sbom_file_name }} | ||
| run: | | ||
| set -eux | ||
| podman run --platform="linux/amd64" -it --rm -v ${RELEASE_ASSETS}:/pwd \ | ||
| --env-file=${SILKBOMB_ENVFILE} \ | ||
| ${{ inputs.artifactory_image }} \ | ||
| download --silk-asset-group ${{ inputs.silk_asset_group }} --sbom-out /pwd/cyclonedx.sbom.json | ||
| cp ${RELEASE_ASSETS}/cyclonedx.sbom.json ${S3_ASSETS}/${{ inputs.sbom_file_name }} | ||
| if [ -n "${KONDUKTO_SUB_PROJECT}" ]; then | ||
| KONDUKTO_BRANCH="${GITHUB_REF_NAME}_${KONDUKTO_SUB_PROJECT}" | ||
| else | ||
| KONDUKTO_BRANCH="${GITHUB_REF_NAME}" | ||
| fi | ||
| echo "Generating SBOM file for ${KONDUKTO_BRANCH}..." | ||
| podman run --platform="linux/amd64" -it --rm -v ${RELEASE_ASSETS}:/pwd -v $(pwd):/repo \ | ||
| --env-file=${KONDUKTO_ENVFILE} \ | ||
| ${ARTIFACTORY_IMAGE} \ | ||
| augment --sbom-in /repo/${SBOM_IN_PATH} --repo ${GITHUB_REPOSITORY} --branch ${KONDUKTO_BRANCH} --sbom-out /pwd/cyclonedx.sbom.json | ||
| cp ${RELEASE_ASSETS}/cyclonedx.sbom.json ${S3_ASSETS}/${SBOM_FILE_NAME} | ||
| echo "Generating SBOM file for ${KONDUKTO_BRANCH}... done." |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.