change to useScannedCves from ovalSupproted
This commit is contained in:
@@ -49,7 +49,7 @@ func FillCveInfos(dbclient DBClient, rs []models.ScanResult, dir string) ([]mode
|
||||
wpVulnCaches := map[string]string{}
|
||||
for _, r := range rs {
|
||||
if c.Conf.RefreshCve || needToRefreshCve(r) {
|
||||
if ovalSupported(&r) {
|
||||
if !useScannedCves(&r) {
|
||||
r.ScannedCves = models.VulnInfos{}
|
||||
}
|
||||
cpeURIs := []string{}
|
||||
|
||||
@@ -388,13 +388,14 @@ func formatChangelogs(r models.ScanResult) string {
|
||||
}
|
||||
return strings.Join(buf, "\n")
|
||||
}
|
||||
func ovalSupported(r *models.ScanResult) bool {
|
||||
func useScannedCves(r *models.ScanResult) bool {
|
||||
switch r.Family {
|
||||
case
|
||||
config.FreeBSD:
|
||||
return false
|
||||
config.FreeBSD,
|
||||
config.Raspbian:
|
||||
return true
|
||||
}
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
func needToRefreshCve(r models.ScanResult) bool {
|
||||
|
||||
Reference in New Issue
Block a user