File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
# Environment variables used as input:
4
- # SILK_CLIENT_ID
5
- # SILK_CLIENT_SECRET
4
+ # AWS_ACCESS_KEY_ID
5
+ # AWS_SECRET_ACCESS_KEY
6
+ # AWS_SESSION_TOKEN
6
7
7
8
declare -r SSDLC_PATH=" ./artifacts/ssdlc"
8
9
mkdir -p " ${SSDLC_PATH} "
9
10
10
- echo " Downloading augmented sbom from silk"
11
+ echo " Downloading augmented sbom using Kondukto"
12
+
13
+ # use AWS CLI to get the Kondukto API token from AWS Secrets Manager
14
+ kondukto_token=$( aws secretsmanager get-secret-value --secret-id " kondukto-token" --region " us-east-1" --query ' SecretString' --output text)
15
+ if [ $? -ne 0 ]; then
16
+ exit 1
17
+ fi
18
+ # set the KONDUKTO_TOKEN environment variable
19
+ echo " KONDUKTO_TOKEN=$kondukto_token " > ${PWD} /kondukto_credentials.env
11
20
12
21
docker run --platform=" linux/amd64" --rm -v ${PWD} :/pwd \
13
- -e SILK_CLIENT_ID \
14
- -e SILK_CLIENT_SECRET \
15
- artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 \
16
- download --silk-asset-group mongodb-dotnet-csharp-driver --sbom-out /pwd/${SSDLC_PATH} /augmented-sbom.json
22
+ --env-file ${PWD} /kondukto_credentials.env \
23
+ artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 \
24
+ augment --repo mongodb/mongo-csharp-driver --branch main --sbom-in /pwd/sbom.json --sbom-out /pwd/${SSDLC_PATH} /augmented-sbom.json
Original file line number Diff line number Diff line change @@ -246,15 +246,22 @@ functions:
246
246
file : mo-expansion.yml
247
247
248
248
download-and-promote-augmented-sbom-to-s3-bucket :
249
+ - command : ec2.assume_role
250
+ params :
251
+ role_arn : ${kondukto_role_arn}
249
252
- command : shell.exec
250
253
params :
251
254
working_dir : " mongo-csharp-driver"
252
255
include_expansions_in_env :
253
- - " SILK_CLIENT_ID"
254
- - " SILK_CLIENT_SECRET"
256
+ - " AWS_ACCESS_KEY_ID"
257
+ - " AWS_SECRET_ACCESS_KEY"
258
+ - " AWS_SESSION_TOKEN"
255
259
script : |
256
260
${PREPARE_SHELL}
257
261
./evergreen/download-augmented-sbom.sh
262
+ - command : ec2.assume_role
263
+ params :
264
+ role_arn : ${UPLOAD_SSDLC_RELEASE_ASSETS_ROLE_ARN}
258
265
- command : s3.put
259
266
params :
260
267
aws_key : ${AWS_ACCESS_KEY_ID}
You can’t perform that action at this time.
0 commit comments