feat(fedora): support fedora (#1367)
* feat(fedora): support fedora * fix(fedora): fix modular package scan * fix(fedora): check needs-restarting, oval arch, add source link Co-authored-by: MaineK00n <mainek00n.1229@gmail.com>
This commit is contained in:
@@ -319,6 +319,8 @@ func NewCveContentType(name string) CveContentType {
|
||||
return Jvn
|
||||
case "redhat", "centos", "alma", "rocky":
|
||||
return RedHat
|
||||
case "fedora":
|
||||
return Fedora
|
||||
case "oracle":
|
||||
return Oracle
|
||||
case "ubuntu":
|
||||
@@ -377,6 +379,9 @@ const (
|
||||
// Amazon is Amazon Linux
|
||||
Amazon CveContentType = "amazon"
|
||||
|
||||
// Fedora is Fedora Linux
|
||||
Fedora CveContentType = "fedora"
|
||||
|
||||
// SUSE is SUSE Linux
|
||||
SUSE CveContentType = "suse"
|
||||
|
||||
@@ -410,6 +415,7 @@ var AllCveContetTypes = CveContentTypes{
|
||||
Ubuntu,
|
||||
UbuntuAPI,
|
||||
Amazon,
|
||||
Fedora,
|
||||
SUSE,
|
||||
WpScan,
|
||||
Trivy,
|
||||
|
||||
@@ -86,6 +86,11 @@ func TestIsDisplayUpdatableNum(t *testing.T) {
|
||||
family: constant.Alpine,
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
mode: []byte{config.Fast},
|
||||
family: constant.Fedora,
|
||||
expected: true,
|
||||
},
|
||||
}
|
||||
|
||||
for i, tt := range tests {
|
||||
|
||||
@@ -256,7 +256,7 @@ type VulnInfo struct {
|
||||
CveID string `json:"cveID,omitempty"`
|
||||
Confidences Confidences `json:"confidences,omitempty"`
|
||||
AffectedPackages PackageFixStatuses `json:"affectedPackages,omitempty"`
|
||||
DistroAdvisories DistroAdvisories `json:"distroAdvisories,omitempty"` // for Amazon, RHEL, FreeBSD
|
||||
DistroAdvisories DistroAdvisories `json:"distroAdvisories,omitempty"` // for Amazon, RHEL, Fedora, FreeBSD
|
||||
CveContents CveContents `json:"cveContents,omitempty"`
|
||||
Exploits []Exploit `json:"exploits,omitempty"`
|
||||
Metasploits []Metasploit `json:"metasploits,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user