fix(rocky): fix Scan in Rocky Linux (#1266)
* fix(rocky): fix OVAL scan in Rocky Linux * chore: add FreeBSD13 EOL, fix #1245 * chore(rocky): add Rocky Linux EOL tests * feat(rocky): implement with reference to CentOS * feat(raspbian): add Raspbian to Server mode * feat(rocky): support gost scan * fix(rocky): rocky support lessThan * chore: update doc and comment
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
ovalmodels "github.com/kotakanbe/goval-dictionary/models"
|
||||
)
|
||||
|
||||
// RedHatBase is the base struct for RedHat and CentOS
|
||||
// RedHatBase is the base struct for RedHat, CentOS and Rocky
|
||||
type RedHatBase struct {
|
||||
Base
|
||||
}
|
||||
@@ -155,7 +155,7 @@ func (o RedHatBase) update(r *models.ScanResult, defPacks defPacks) (nCVEs int)
|
||||
func (o RedHatBase) convertToDistroAdvisory(def *ovalmodels.Definition) *models.DistroAdvisory {
|
||||
advisoryID := def.Title
|
||||
switch o.family {
|
||||
case constant.RedHat, constant.CentOS, constant.Oracle:
|
||||
case constant.RedHat, constant.CentOS, constant.Rocky, constant.Oracle:
|
||||
if def.Title != "" {
|
||||
ss := strings.Fields(def.Title)
|
||||
advisoryID = strings.TrimSuffix(ss[0], ":")
|
||||
@@ -322,3 +322,21 @@ func NewAmazon(cnf config.VulnDictInterface) Amazon {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Rocky is the interface for RedhatBase OVAL
|
||||
type Rocky struct {
|
||||
// Base
|
||||
RedHatBase
|
||||
}
|
||||
|
||||
// NewRocky creates OVAL client for Rocky Linux
|
||||
func NewRocky(cnf config.VulnDictInterface) Rocky {
|
||||
return Rocky{
|
||||
RedHatBase{
|
||||
Base{
|
||||
family: constant.Rocky,
|
||||
Cnf: cnf,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user