Skip to content

Commit c320ac1

Browse files
authored
Include links to the Evergreen build and to the driver security testing summary in the SSDLC report (#1426) (#1432)
This is a backport of #1426 to 5.1.x. JAVA-5500
1 parent df6fef2 commit c320ac1

File tree

3 files changed

+42
-27
lines changed

3 files changed

+42
-27
lines changed

.evergreen/.evg.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ functions:
150150
env:
151151
PRODUCT_NAME: ${product_name}
152152
PRODUCT_VERSION: ${product_version}
153+
PRODUCT_RELEASE_CREATOR: ${author}
154+
EVERGREEN_VERSION_ID: ${version_id}
153155
script: .evergreen/ssdlc-report.sh
154156
- command: ec2.assume_role
155157
params:

.evergreen/ssdlc-report.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@ set -eu
55
# Supported/used environment variables:
66
# PRODUCT_NAME
77
# PRODUCT_VERSION
8+
# PRODUCT_RELEASE_CREATOR
9+
# EVERGREEN_VERSION_ID
810

911
if [ -z "${PRODUCT_NAME}" ]; then
10-
echo "PRODUCT_NAME must be set to a non-empty string"
12+
printf "\nPRODUCT_NAME must be set to a non-empty string\n"
1113
exit 1
1214
fi
1315
if [ -z "${PRODUCT_VERSION}" ]; then
14-
echo "PRODUCT_VERSION must be set to a non-empty string"
16+
printf "\nPRODUCT_VERSION must be set to a non-empty string\n"
17+
exit 1
18+
fi
19+
if [ -z "${PRODUCT_RELEASE_CREATOR}" ]; then
20+
printf "\PRODUCT_RELEASE_CREATOR must be set to a non-empty string\n"
21+
exit 1
22+
fi
23+
if [ -z "${EVERGREEN_VERSION_ID}" ]; then
24+
printf "\EVERGREEN_VERSION_ID must be set to a non-empty string\n"
1525
exit 1
1626
fi
1727

@@ -22,7 +32,11 @@ RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
2232
source "${RELATIVE_DIR_PATH}/javaConfig.bash"
2333

2434
printf "\nCreating SSDLC reports\n"
25-
35+
printf "\nProduct name: %s\n" "${PRODUCT_NAME}"
36+
printf "\nProduct version: %s\n" "${PRODUCT_VERSION}"
37+
printf "\nProduct release creator: %s\n" "${PRODUCT_RELEASE_CREATOR}"
38+
declare -r EVERGREEN_BUILD_URL="https://spruce.mongodb.com/version/${EVERGREEN_VERSION_ID}"
39+
printf "\nEvergreen build URL: %s\n" "${EVERGREEN_BUILD_URL}"
2640
declare -r SSDLC_PATH="${RELATIVE_DIR_PATH}/../build/ssdlc"
2741
declare -r SSDLC_STATIC_ANALYSIS_REPORTS_PATH="${SSDLC_PATH}/static-analysis-reports"
2842
mkdir "${SSDLC_PATH}"
@@ -52,14 +66,16 @@ declare -r SSDLC_REPORT_PATH="${SSDLC_PATH}/ssdlc_compliance_report.md"
5266
cp "${TEMPLATE_SSDLC_REPORT_PATH}" "${SSDLC_REPORT_PATH}"
5367
declare -a SED_EDIT_IN_PLACE_OPTION
5468
if [[ "$OSTYPE" == "darwin"* ]]; then
55-
SED_EDIT_IN_PLACE_OPTION=(-i '')
69+
SED_EDIT_IN_PLACE_OPTION=(-i '')
5670
else
57-
SED_EDIT_IN_PLACE_OPTION=(-i)
71+
SED_EDIT_IN_PLACE_OPTION=(-i)
5872
fi
5973
sed "${SED_EDIT_IN_PLACE_OPTION[@]}" \
6074
-e "s/\${product_name}/${PRODUCT_NAME}/g" \
6175
-e "s/\${product_version}/${PRODUCT_VERSION}/g" \
6276
-e "s/\${report_date_utc}/$(date -u +%Y-%m-%d)/g" \
77+
-e "s/\${product_release_creator}/${PRODUCT_RELEASE_CREATOR}/g" \
78+
-e "s>\${evergreen_build_url}>${EVERGREEN_BUILD_URL}>g" \
6379
"${SSDLC_REPORT_PATH}"
6480
printf "%s\n" "${SSDLC_REPORT_PATH}"
6581

.evergreen/template_ssdlc_compliance_report.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,18 @@ This report is available at
1313
<td>${product_version}</td>
1414
</tr>
1515
<tr>
16-
<th>Report date, UTC</th>
17-
<td>${report_date_utc}</td>
18-
</tr>
19-
</table>
20-
21-
## Release creator
22-
23-
This information is available in multiple ways:
24-
25-
<table>
26-
<tr>
27-
<th>Evergreen</th>
16+
<th>Release creator</th>
2817
<td>
29-
Go to
30-
<a href="https://evergreen.mongodb.com/waterfall/mongo-java-driver?bv_filter=Publish%20Release">
31-
https://evergreen.mongodb.com/waterfall/mongo-java-driver?bv_filter=Publish%20Release</a>,
32-
find the build triggered from Git tag <code>r${product_version}</code>, see who authored it.
18+
${product_release_creator}
19+
<p>
20+
Refer to data in Papertrail for more details.
21+
There is currently no official way to serve that data.
22+
</p>
3323
</td>
3424
</tr>
3525
<tr>
36-
<th>Papertrail</th>
37-
<td>
38-
Refer to data in Papertrail. There is currently no official way to serve that data.
39-
</td>
26+
<th>Report date, UTC</th>
27+
<td>${report_date_utc}</td>
4028
</tr>
4129
</table>
4230

@@ -47,22 +35,31 @@ Blocked on <https://jira.mongodb.org/browse/JAVA-5429>.
4735
The MongoDB SSDLC policy is available at
4836
<https://docs.google.com/document/d/1u0m4Kj2Ny30zU74KoEFCN4L6D_FbEYCaJ3CQdCYXTMc>.
4937

50-
## Third-darty dependency information
38+
## Third-party dependency information
5139

5240
There are no dependencies to report vulnerabilities of.
5341
Our [SBOM](https://docs.devprod.prod.corp.mongodb.com/mms/python/src/sbom/silkbomb/docs/CYCLONEDX/) lite
5442
is <https://github.com/mongodb/mongo-java-driver/blob/r${product_version}/sbom.json>.
5543

5644
## Static analysis findings
5745

58-
The static analysis findings are all available at
46+
The static analysis findings are available at
5947
<https://d-9067613a84.awsapps.com/start/#/console?account_id=857654397073&role_name=Drivers.User&destination=https%3a%2f%2fus-west-1.console.aws.amazon.com%2fs3%2fbuckets%2fjava-driver-release-assets%3fregion%3dus-west-1%26bucketType%3dgeneral%26prefix%3d${product_name}%2f${product_version}%2fstatic-analysis-reports%2f>.
6048
All the findings in the aforementioned reports
6149
are either of the MongoDB status "False Positive" or "No Fix Needed",
6250
because code that has any other findings cannot technically get into the product.
6351

6452
<https://github.com/mongodb/mongo-java-driver/blob/r${product_version}/config/spotbugs/exclude.xml> may also be of interest.
6553

54+
## Security testing results
55+
56+
The testing results are available at
57+
<${evergreen_build_url}>.
58+
59+
See the driver security testing summary
60+
<https://docs.google.com/document/d/1y2K_RY4GZVXpQvv4JH_35mSzFRTawNJ3mibpvSBU8H0>
61+
for the description of what is tested.
62+
6663
## Signature information
6764

6865
The product artifacts are signed.

0 commit comments

Comments
 (0)