You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* CLOUDP-251873: Decouple SBOMs from SSDLC checklist & automate
Signed-off-by: jose.vazquez <[email protected]>
* Use a var for reviewers
---------
Signed-off-by: jose.vazquez <[email protected]>
Starting from version 2.2.0 and onward, all Atlas Kubernetes Operator images are attached SBOMs files per image platform released. SBOM stands for Software Bill Of Materials, a recursive list of all dependencies within of a software binary or image image that is useful to evaluate potential security vulnerabilities that might be affected that particular version.
4
+
5
+
These SBOMs attached after release, as they need the images to be published for the SBOMs to be computed.
6
+
7
+
This document describes how the project computes those SBOMs as well as how end users can compute them on their own.
8
+
9
+
## Scripts computing the SBOMs for the CI
10
+
11
+
The main script to check is [scripts/generate_upload_sbom.sh](../../scripts/generate_upload_sbom.sh):
12
+
13
+
```shell
14
+
$ ./scripts/generate_upload_sbom.sh -h
15
+
Generates and uploads an SBOM to an S3 bucket.
16
+
17
+
Usage:
18
+
generate_upload_sbom.sh [-h]
19
+
generate_upload_sbom.sh -i <image_name>
20
+
21
+
Options:
22
+
-h (optional) Shows this screen.
23
+
-i <image_name> (required) Image to be processed.
24
+
-b (optional) S3 bucket name.
25
+
-p (optional) An array of platforms, for example 'linux/arm64,linux/amd64'. The script **doesn't** fail if a particular architecture is not found.
26
+
-o <output_folder> (optional) Folder to output SBOM to.
When given no platforms it will default to `linux/amd64` & `linux/arm64` and try to download them and produce the SBOMS files.
36
+
37
+
## DIY SBOMs
38
+
39
+
To compute the SBOMs manually the only complication, other than having `docker` with the `sbom` plug-in installed, is that to get SBOMs from multi-architecture images require the full SHA nomenclature to successfully produce the SBOM regardless of the host architecture the `docker sbom` where command is run. The gist of it getting the SHA of the desired platform and then getting the SBOM for that particular image SHA:
Copy file name to clipboardExpand all lines: docs/dev/release.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,16 @@ Most tools are automatically installed for you. Most of them are Go binaries and
19
19
20
20
## Create the release branch
21
21
22
-
Use the GitHub UI to create the new "Create Release Branch" workflow. Specify the version to be released in the text box.
22
+
Use the GitHub UI to create the new "Create Release Branch" workflow. Specify the `version` to be released in the text box and the author or `authors` involved in the release.
23
23
The deployment scripts (K8s configs, OLM bundle) will be generated and PR will be created with new changes on behalf
24
24
of the `github-actions` bot.
25
25
26
26
Pass the version with the `X.Y.Z` eg. `1.2.3`, **without** the `v...` prefix.
27
27
28
28
See [Troubleshooting](#troubleshooting) in case of issues, such as [errors with the major version](#major-version-issues-when-create-release-branch).
29
29
30
+
Expect this branch to include the Software Security Development Lifecycle Policy Checklist (SSDLC) document at path `docs/releases/v${VERSION}/sdlc-compliance.md`. Note the SBOM files cannot be generated yet, as they require the image to have been published already.
31
+
30
32
## Approve the Pull Request named "Release x.y.z"
31
33
32
34
Review the Pull Request. Approve and merge it to `main`.
@@ -36,6 +38,12 @@ The new job "Create Release" will be triggered and the following will be done:
36
38
37
39
The "Create Release Branch" workflow is going to create a Pull Request pointing to a `release/X.Y.Z` branch. Once approved and merged, automation is going to create a `vX.Y.Z` tag.
38
40
41
+
### SSDLC SBOMs PR
42
+
43
+
A new PR should have been created titled `Add SBOMs for version ...`. Please review all is as expected and merge. It should contain just a couple of new files at directory `docs/releases/v${VERSION}/`:
44
+
-`linux-amd64.sbom.json`
45
+
-`linux-arm64.sbom.json`
46
+
39
47
## Edit the Release Notes and publish the release
40
48
41
49
Follow the format described in the [release-notes-template.md](../release-notes/release-notes-template.md) file. Before publishing the release, keep the release in Draft and get an approval from the team and Product Management. Once approved, publish the release.
@@ -160,29 +168,11 @@ You can see an [example fixed PR here for certified version 1.9.1](https://githu
160
168
161
169
After the PR is approved it will soon appear in the [Atlas Operator openshift cluster](https://console-openshift-console.apps.atlas.operator.mongokubernetes.com)
162
170
163
-
# SSDLC checklist publishing
164
-
165
-
You can create the draft for the SSDLC checklist just by running:
166
-
167
-
```shell
168
-
$ DATE= VERSION="${version}" AUTHORS="${release_authors}" RELEASE_TYPE= make gen-sdlc-checklist
169
-
```
170
-
171
-
- You can leave `DATE` unset so the script may use today's date.
172
-
-`RELEASE_TYPE` is also optional defaulting to `Minor` releases, set to `Major`when appropriate.
173
-
174
-
The script generates the directory `docs/releases/v${VERSION}/` with files:
175
-
-`linux-amd64.sbom.json`
176
-
-`linux-arm64.sbom.json`
177
-
-`sdlc-compliance.md`
178
-
179
-
Add those files to `git`, and create a PR to review the changes to close the release.
180
-
181
171
# Post install hook release
182
172
183
173
If changes have been made to the post install hook (mongodb-atlas-kubernetes/cmd/post-install/main.go).
184
174
You must also release this image. Run the "Release Post Install Hook" workflow manually specifying the desired
0 commit comments