change raspberry pi os use debian oval at report

This commit is contained in:
MaineK00n
2020-07-14 22:08:16 +09:00
parent b169ef622e
commit 3dab5e2b2c
3 changed files with 7 additions and 4 deletions

View File

@@ -242,6 +242,10 @@ func getDefsByPackNameFromOvalDB(driver db.DB, r *models.ScanResult) (relatedDef
})
}
if r.Family == "raspbian" {
r.Family = "debian"
}
for _, req := range requests {
definitions, err := driver.GetByPackName(r.Family, r.Release, req.packName, req.arch)
if err != nil {

View File

@@ -285,7 +285,7 @@ func FillWithOval(driver ovaldb.DB, r *models.ScanResult) (nCVEs int, err error)
var ovalFamily string
switch r.Family {
case c.Debian:
case c.Debian, c.Raspbian:
ovalClient = oval.NewDebian()
ovalFamily = c.Debian
case c.Ubuntu:
@@ -311,7 +311,7 @@ func FillWithOval(driver ovaldb.DB, r *models.ScanResult) (nCVEs int, err error)
case c.Amazon:
ovalClient = oval.NewAmazon()
ovalFamily = c.Amazon
case c.Raspbian, c.FreeBSD, c.Windows:
case c.FreeBSD, c.Windows:
return 0, nil
case c.ServerTypePseudo:
return 0, nil

View File

@@ -392,8 +392,7 @@ func ovalSupported(r *models.ScanResult) bool {
switch r.Family {
case
config.Amazon,
config.FreeBSD,
config.Raspbian:
config.FreeBSD:
return false
}
return true