Implement format-short-text

This commit is contained in:
Kota Kanbe
2017-05-15 23:39:28 +09:00
committed by kota kanbe
parent b285cb0e57
commit 3be11cf52f
12 changed files with 671 additions and 212 deletions

View File

@@ -463,7 +463,7 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
var res models.ScanResults
for _, r := range results {
res = append(res, r.FilterByCvssOver())
res = append(res, r.FilterByCvssOver(c.Conf.CvssScoreOver))
// TODO Add sort function to ScanResults
@@ -545,10 +545,14 @@ func fillCveInfoFromCveDB(r *models.ScanResult) error {
func fillCveInfoFromOvalDB(r *models.ScanResult) error {
var ovalClient oval.Client
switch r.Family {
case "ubuntu", "debian":
case "debian":
ovalClient = oval.NewDebian()
case "rhel", "centos":
case "ubuntu":
ovalClient = oval.NewUbuntu()
case "rhel":
ovalClient = oval.NewRedhat()
case "centos":
ovalClient = oval.NewCentOS()
case "amazon", "oraclelinux", "Raspbian", "FreeBSD":
//TODO implement OracleLinux
return nil