-
Notifications
You must be signed in to change notification settings - Fork 11
Welkin CycloneDX SBOM generation #2545
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
Conversation
f4bee25
to
52c2e36
Compare
Let me know if you want this reviewed, then we should probably have a sync to go though it. |
611718c
to
3722179
Compare
217b0dc
to
ecb78f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, thank you! This definitely implements the capability we need right now.
Your PR made me realize that we really need to start using Go more "actively". 😄 I asked the CTO Office how to proceed. We decided that I'll draft a PBI for converting the SBOM Bash script into Go. Hopefully, it will be prioritized so that someone can work on it during the summer.
Warning
This is a public repository, ensure not to disclose:
What kind of PR is this?
Required: Mark one of the following that is applicable:
Optional: Mark one or more of the following that are applicable:
Important
Breaking changes should be marked
kind/admin-change
orkind/dev-change
depending on typeCritical security fixes should be marked with
kind/security
What does this PR do / why do we need this PR?
This PR adds script to generate and modify an SBOM in CycloneDX format containing components of charts and their respective containers.
The release document has been update to include a step for running
sbom generate
when doing a new release to keep it up to date.There are also pre-commit hooks that will warn if the SBOM is not validated against the cyclonedx v1.6 schema, that will complain if there are fields that needs to be updated manually, and also one that checks that chart versions and names in the SBOM are up to date with the current state of this repo.
This will thus also be triggered during chart upgrades not tied to doing a release, and the pre-commit hooks will provide with information on what commands to run and which fields that needs to be addressed.
There are some changes to other files in this PR done mainly to improve running the commands and fixes to other issues encountered during working on this, all may no longer be needed as the SBOM script has changed a few times how it works.
Information to reviewers
Yes, it is done in bash.
Running
sbom.bash generate
takes about 5-6 min when I tested it.Would like to add more tests but it is difficult to test things in parallel when the commands modify the same file in the repo.
I am open for suggestions on writing better tests for this if needed.
Checklist