Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate SPDX SBOM at release time #538

Merged
merged 3 commits into from
Jan 30, 2022
Merged

Generate SPDX SBOM at release time #538

merged 3 commits into from
Jan 30, 2022

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Jan 30, 2022

This PR adds the Kubernetes SBOM tool to the release workflow to generate a Software Bill of Materials.

There are two parts to achieve this, each split into a commit in the PR:

  1. The actions workflow now uses the new bom-installer action to install bom into the runner.
  2. The actual SBOM generation is done by a new script in scripts/sbom.sh that reads the artifacts and generates the SBOM including a) the source code and dependencies b) the container image c) the built tarballs.

/cc: @jdolitsky

Fixes #537

TODO:

The current change only writes the SBOM. It should then be stored in its final location

Structure

This is a sample visualization of the generated SBOM:

image

This commit adds a script in scripts/sbom.sh that generates
the SBOM for the release adding three kinds of elements to it:

	1. The source code with full dependencies
	2. The tarball distrubutions written in _dist
	3. The container image

The SBOM is written into the _dist directory.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
This commit modifies the build pipeline to generate an SPDX SBOM
describing the release. It uses the new bom-installer action to
install the Kubernetes SBOM Tool into the runner and calls the
scripts/sbom.sh script which handles the generation.

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
Copy link
Contributor

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@puerco thank you! 🎉

This is great. Made a few changes to integrate with the release pipeline (I think that is related to your TODO item)

@jdolitsky jdolitsky merged commit 77d6cea into helm:main Jan 30, 2022
@puerco
Copy link
Contributor Author

puerco commented Jan 31, 2022

Exactly!! I wanted to talk to you about it before doing any of that stuff, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SBOM to release artifacts
3 participants