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`
116
116
token: ${{ github.token }}
117
117
` ` `
118
118
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
+
119
135
# # Python Helper Scripts
120
136
121
137
These scripts are opinionated helper scripts for Python releases.
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ inputs:
14
14
product_name :
15
15
description : " The name of the product"
16
16
required : true
17
+ silk_asset_group :
18
+ description : The Silk Asset Group for the Project
19
+ required : true
17
20
token :
18
21
description : " The GitHub access token"
19
22
required : true
42
45
release_version : ${{ inputs.version }}
43
46
filenames : dist/*
44
47
token : ${{ inputs.token }}
48
+ - uses : mongodb-labs/drivers-github-tools/sbom@v2
49
+ with :
50
+ silk_asset_group : ${{ inputs.silk_asset_group }}
45
51
- name : Generate Sarif Report
46
52
uses : mongodb-labs/drivers-github-tools/code-scanning-export@v2
47
53
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"
14
14
echo $ARTIFACTORY_PASSWORD | podman login -u $ARTIFACTORY_USERNAME --password-stdin $ARTIFACTORY_REGISTRY
15
15
echo " ::endgroup::"
16
16
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
19
19
cat << EOF > $GARASIGN_ENVFILE
20
20
GRS_CONFIG_USER1_USERNAME=$GARASIGN_USERNAME
21
21
GRS_CONFIG_USER1_PASSWORD=$GARASIGN_PASSWORD
22
22
EOF
23
23
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
+
24
33
echo " Set up output directories"
25
34
export RELEASE_ASSETS=/tmp/release-assets
26
35
mkdir $RELEASE_ASSETS
@@ -34,6 +43,7 @@ AWS_BUCKET=${RELEASE_ASSETS_BUCKET:-}"
34
43
GPG_KEY_ID=$GPG_KEY_ID
35
44
GPG_PUBLIC_URL=${GPG_PUBLIC_URL:- } "
36
45
GARASIGN_ENVFILE=$GARASIGN_ENVFILE
46
+ SILKBOMB_ENVFILE=$SILKBOMB_ENVFILE
37
47
ARTIFACTORY_REGISTRY=$ARTIFACTORY_REGISTRY
38
48
RELEASE_ASSETS=$RELEASE_ASSETS
39
49
S3_ASSETS=$S3_ASSETS
You can’t perform that action at this time.
0 commit comments