change to useScannedCves from ovalSupproted

This commit is contained in:
MaineK00n
2020-07-31 16:36:58 +09:00
parent 72e3f4458d
commit 59e2d5f166
2 changed files with 6 additions and 5 deletions

View File

@@ -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{}

View File

@@ -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 {