fix(cpescan): CpeVendorProductMatch not set when Redis Backend (#1273)
* fix(cpescan): CpeVendorProductMatch not set when Redis Backend * fix(integration): deprecated CPE URI * fix(integration-test): add a test case for CpeVendorProductMatch * fix review * update deps go-cve-dict v0.6.2
This commit is contained in:
@@ -419,10 +419,11 @@ func DetectCpeURIsCves(r *models.ScanResult, cpeURIs []string, cnf config.GoCveD
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, detail := range details {
|
||||
|
||||
for _, detail := range details {
|
||||
confidence := models.CpeVersionMatch
|
||||
if detail.IsJvn() {
|
||||
if detail.HasJvn() && !detail.HasNvd() {
|
||||
// In the case of CpeVendorProduct-match, only the JVN is set(Nvd is not set).
|
||||
confidence = models.CpeVendorProductMatch
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user