Files
vuls/oval/debian.go
MaineK00n d4d33fc81d fix(scanner/dpkg): Fix false-negative in Debian and Ubuntu (#1646)
* fix(scanner/dpkg): fix dpkg-query and not remove src pkgs

* refactor(gost): remove unnecesary field and fix typo

* refactor(detector/debian): detect using only SrcPackage
2023-04-20 11:42:53 +09:00

62 lines
1.2 KiB
Go

//go:build !scanner
// +build !scanner
package oval
import (
"github.com/future-architect/vuls/constant"
"github.com/future-architect/vuls/models"
ovaldb "github.com/vulsio/goval-dictionary/db"
)
// DebianBase is the base struct of Debian and Ubuntu
type DebianBase struct {
Base
}
// Debian is the interface for Debian OVAL
type Debian struct {
DebianBase
}
// NewDebian creates OVAL client for Debian
func NewDebian(driver ovaldb.DB, baseURL string) Debian {
return Debian{
DebianBase{
Base{
driver: driver,
baseURL: baseURL,
family: constant.Debian,
},
},
}
}
// FillWithOval returns scan result after updating CVE info by OVAL
func (o Debian) FillWithOval(_ *models.ScanResult) (nCVEs int, err error) {
return 0, nil
}
// Ubuntu is the interface for Debian OVAL
type Ubuntu struct {
DebianBase
}
// NewUbuntu creates OVAL client for Debian
func NewUbuntu(driver ovaldb.DB, baseURL string) Ubuntu {
return Ubuntu{
DebianBase{
Base{
driver: driver,
baseURL: baseURL,
family: constant.Ubuntu,
},
},
}
}
// FillWithOval returns scan result after updating CVE info by OVAL
func (o Ubuntu) FillWithOval(_ *models.ScanResult) (nCVEs int, err error) {
return 0, nil
}