File tree Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,22 @@ It will create the file `$S3_ASSETS/authorized_publication.txt`
116116 token: ${{ github.token }}
117117` ` `
118118
119+ # ## Software Bill of Materials (SBOM)
120+
121+ This action will download an Augmented SBOM file in `$RELEASE_ASSETS/sbom.json`.
122+
123+ ` ` ` yaml
124+ - name: Setup
125+ uses: mongodb-labs/drivers-github-tools/setup@v2
126+ with:
127+ ...
128+
129+ - name: Create SBOM
130+ uses: mongodb-labs/drivers-github-tools/sbom@v2
131+ with:
132+ silk_asset_group: mongodb-python-driver
133+ ` ` `
134+
119135# # Python Helper Scripts
120136
121137These scripts are opinionated helper scripts for Python releases.
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ inputs:
1414 product_name :
1515 description : " The name of the product"
1616 required : true
17+ silk_asset_group :
18+ description : The Silk Asset Group for the Project
19+ required : true
1720 token :
1821 description : " The GitHub access token"
1922 required : true
4245 release_version : ${{ inputs.version }}
4346 filenames : dist/*
4447 token : ${{ inputs.token }}
48+ - uses : mongodb-labs/drivers-github-tools/sbom@v2
49+ with :
50+ silk_asset_group : ${{ inputs.silk_asset_group }}
4551 - name : Generate Sarif Report
4652 uses : mongodb-labs/drivers-github-tools/code-scanning-export@v2
4753 with :
Original file line number Diff line number Diff line change 1+ name : Download the Augmented SBOM
2+ description : Downloads the Augmented SBOM for the project
3+ inputs :
4+ silk_asset_group :
5+ description : The Silk Asset Group for the Project
6+ required : true
7+ artifactory_image :
8+ description : Image to use for artifactory
9+ default : artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0
10+
11+ runs :
12+ using : composite
13+ steps :
14+ - name : Download the Augmented SBOM file to the release assets folder
15+ shell : bash
16+ run : |
17+ podman run --platform="linux/amd64" -it --rm -v ${RELEASE_ASSETS}:/pwd \
18+ --env-file=${SILKBOMB_ENVFILE} \
19+ ${{ inputs.artifactory_image }} \
20+ download --silk-asset-group ${{ inputs.silk_asset_group }} --sbom-out /pwd/sbom.json
Original file line number Diff line number Diff line change @@ -14,13 +14,22 @@ echo "::group::Set up artifactory"
1414echo $ARTIFACTORY_PASSWORD | podman login -u $ARTIFACTORY_USERNAME --password-stdin $ARTIFACTORY_REGISTRY
1515echo " ::endgroup::"
1616
17- echo " Set up envfile for artifactory image "
18- GARASIGN_ENVFILE=/tmp/envfile
17+ echo " Set up envfile for garasign "
18+ GARASIGN_ENVFILE=/tmp/garasign- envfile
1919cat << EOF > $GARASIGN_ENVFILE
2020GRS_CONFIG_USER1_USERNAME=$GARASIGN_USERNAME
2121GRS_CONFIG_USER1_PASSWORD=$GARASIGN_PASSWORD
2222EOF
2323
24+ if [ -n " ${SILKBOMB_USER:- } " ]; then
25+ echo " Set up envfile for silkbomb"
26+ SILKBOMB_ENVFILE=/tmp/silkbomb-envfile
27+ cat << EOF > $SILKBOMB_ENVFILE
28+ SILK_CLIENT_ID=${SILKBOMB_USER}
29+ SILK_CLIENT_SECRET=${SILKBOMB_KEY}
30+ EOF
31+ fi
32+
2433echo " Set up output directories"
2534export RELEASE_ASSETS=/tmp/release-assets
2635mkdir $RELEASE_ASSETS
@@ -34,6 +43,7 @@ AWS_BUCKET=${RELEASE_ASSETS_BUCKET:-}"
3443GPG_KEY_ID=$GPG_KEY_ID
3544GPG_PUBLIC_URL=${GPG_PUBLIC_URL:- } "
3645GARASIGN_ENVFILE=$GARASIGN_ENVFILE
46+ SILKBOMB_ENVFILE=$SILKBOMB_ENVFILE
3747ARTIFACTORY_REGISTRY=$ARTIFACTORY_REGISTRY
3848RELEASE_ASSETS=$RELEASE_ASSETS
3949S3_ASSETS=$S3_ASSETS
You can’t perform that action at this time.
0 commit comments