-
Notifications
You must be signed in to change notification settings - Fork 141
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
feat: add vendor status #237
base: main
Are you sure you want to change the base?
Conversation
@@ -77,6 +77,7 @@ type VulnerabilityDetail struct { | |||
Description string `json:",omitempty"` | |||
PublishedDate *time.Time `json:",omitempty"` // Take from NVD | |||
LastModifiedDate *time.Time `json:",omitempty"` // Take from NVD | |||
Status bool `json:",omitempty"` // Rejected or not Rejected cve. Take from NVD |
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.
NVD actually has more statuses like DISPUTED. We currently support "REJECTED" or not only, but I want to make it flexible for future enhancement.
https://nvd.nist.gov/general/cve-process
Status bool `json:",omitempty"` // Rejected or not Rejected cve. Take from NVD | |
Status types.Status `json:",omitempty"` // Take from NVD |
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.
I mean we should define type Status string
somewhere.
func (Vulnerability) Normalize(details map[types.SourceID]types.VulnerabilityDetail) types.Vulnerability { | ||
if details[NVD].Status { |
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.
if details[NVD].Status { | |
if details[NVD].Status == types.StatusRejected { |
Description
Added structure with cve statuses for different vendors.
e.g.:
There are next statuses: