-
Notifications
You must be signed in to change notification settings - Fork 21
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
Package count is missing from nested sboms returned from /api/v1/vulnerability/{id} #1006
Comments
jcrossley3
added a commit
to jcrossley3/trustify
that referenced
this issue
Nov 20, 2024
Fixes trustification#1006 by making the sbom #packages available in /api/v1/vulnerability/{id} as well as /api/v1/sbom/{id} Signed-off-by: Jim Crossley <[email protected]>
jcrossley3
changed the title
Same problem discovered at #952: To get SBOMs affected by certain CVE takes many endpoints to be fetch.
Package count is missing from nested sboms returned from /api/v1/vulnerability/{id}
Nov 20, 2024
@carlosthe19916 this issue is really 2 issues, so I'm gonna break this out into another one. And I changed the title of this one to reflect the problem with the missing |
jcrossley3
added a commit
to jcrossley3/trustify
that referenced
this issue
Nov 20, 2024
Fixes trustification#1006 by making the sbom #packages available in /api/v1/vulnerability/{id} as well as /api/v1/sbom/{id} Signed-off-by: Jim Crossley <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 21, 2024
Fixes #1006 by making the sbom #packages available in /api/v1/vulnerability/{id} as well as /api/v1/sbom/{id} Signed-off-by: Jim Crossley <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The UI has the page CVE/Vulnerability Page details where we render all the SBOMs that somehow have a relation with a Vulnerability. See the image below:
Current UI process
/api/v1/vulnerability/{id}
that returns a response similar to:advisories.sboms
:status
field is an array so we flatten that array too. The logic is to create an element of the array for eachstatus
. In our example since there was an element of the array with"status": ["not_affected", "fixed"]
then that is decoupled in 2 elements of the array. The final result is:number_of_packages
for each sbom. Therefore we call/api/v1/sbom/{id}
for each element of the previous array. Then enrich the previous array to end up having something like:Finally the array is ready to be rendered in the UI. This approach suffer the same problems described at #952
What I think we could evaluate changing
/api/v1/vulnerability/{id}
contains the fieldadvisories.sboms
which implies, from the naming, that what that field contains are SBOMS. The problem is thatadvisories.sboms
does not match what/api/v1/sbom/{id}
has as only/api/v1/sbom/{id}
has the fieldnumber_of_packages
butadvisories.sboms
doesn't.sbom
then the client is 100% sure what he expects there.advisories.sboms
then I should get there exactly what I see in/api/v1/sbom/{id}
/api/v1/vulnerability/{id}
contains a fieldadvisories.sboms.status
which is an array and not a single field. That technically means that an a Single advisory can say that an SBOM has the statusaffected
andnot_affected
at the same time. E.g.This structure forces the client to come up with some kind of algorithm to parse the data and solve conflicts between multiple
advisory.sboms.status
values which might contradict each other.The text was updated successfully, but these errors were encountered: