-
Notifications
You must be signed in to change notification settings - Fork 170
ROX-31409: Add digest parameter to SBOM generation requests #18432
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
base: master
Are you sure you want to change the base?
Conversation
This is necessary when tags change (ie: latest), a SBOM may be desired for an older digest for that image but the name of the image should stay the same in StackRox.
|
Skipping CI for Draft Pull Request. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18432 +/- ##
==========================================
+ Coverage 48.89% 48.94% +0.05%
==========================================
Files 2629 2631 +2
Lines 197912 198034 +122
==========================================
+ Hits 96762 96934 +172
+ Misses 93766 93709 -57
- Partials 7384 7391 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Images are ready for the commit at 69e5cd3. To use with deploy scripts, first |
6808f5d to
928782c
Compare
928782c to
0998fe7
Compare
|
@dcaravel: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
This PR adds a new
digestparameter to the/api/v1/images/sbomAPI that allows an SBOM to be generated for a specific image without changing the name of the stored image.Today, the "Generate SBOM" feature in the UI may not generate the correct SBOM if the image is referenced by a tag and the tag now points to a different digest. The UI will be updated separately from this PR to use the new
digestfield.This PR also adds support for the new
ROX_FLATTEN_IMAGE_DATAfeature to the SBOM generation handler (note: this overlaps with #18234, will address conflicts as needed when merged)User-facing documentation
Testing and quality
Automated testing
How I validated my change
Built two images, generated sboms for the images after changing where the tag points, then before the fix verified the incorrect package is shown (mimicking the current API requests from the UI):
sbomgen.sh
Before:
When
quay.io/dcaravel/temp:sbom-gen-demo == quay.io/dcaravel/temp:sbom-gen-demo-1When
quay.io/dcaravel/temp:sbom-gen-demo == quay.io/dcaravel/temp:sbom-gen-demo-2After fix applied (notice that different package versions are detected as expected):