-
Notifications
You must be signed in to change notification settings - Fork 569
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
Validate CVSS vectors that grype reports on #1441
Comments
To help you implement this, and Go folks around here, I documented an efficient way to handle and verify CVSS vectors at https://github.com/pandatix/go-cvss#how-to-determine-cvss-version. As the idea here is to check whether a CVSS vector is valid or not, you only need to handle the errors (validation is achieved on parsing). |
Based on the conversation from the community meeting, I wanted to drop a few implementations paths here. Assuming grype-db was the right spot for checking cvss information, I think there are two locations that could make sense:
I think validating on write makes sense, given that they are records that will certainly be in the DB, something which is not necessarily true when simply creating cvss objects. Either way, the logic for validating should probably live on the cvss object itself, even though it would be invoked when writing
On further thought, I don't think vunnel is the right place for this (but that's certainly debatable) since we don't necessarily use all data from the providers. It might be that there are invalid CVSS vectors that we aren't packing into the DB, in which case messaging out maintainers to take care of such invalid values would not be a good use of time. |
(a topic from the OSS community meeting today from @pandatix)
Today grype outputs CVSS information in the JSON output, however, this is unprocessed vectors from upstream data providers. Ideally we should be validating these vectors and reporting issues (at least with
log.warning()
) when there are CVSS vectors reported which are not valid.Things to consider:
dev note: a lib for consideration https://github.com/pandatix/go-cvss
The text was updated successfully, but these errors were encountered: