Add -ignore-unfixed option to report subcommand #485 (#507)

This commit is contained in:
Kota Kanbe
2017-09-28 17:29:47 +09:00
committed by GitHub
parent a8483b2195
commit 7a1f132c1f
8 changed files with 128 additions and 17 deletions

View File

@@ -44,7 +44,9 @@ type ReportCmd struct {
cvssScoreOver float64
ignoreUnscoredCves bool
httpProxy string
ignoreUnfixed bool
httpProxy string
cveDBType string
cveDBPath string
@@ -107,6 +109,7 @@ func (*ReportCmd) Usage() string {
[-cvss-over=7]
[-diff]
[-ignore-unscored-cves]
[-ignore-unfixed]
[-to-email]
[-to-slack]
[-to-localfile]
@@ -213,6 +216,12 @@ func (p *ReportCmd) SetFlags(f *flag.FlagSet) {
false,
"Don't report the unscored CVEs")
f.BoolVar(
&p.ignoreUnfixed,
"ignore-unfixed",
false,
"Don't report the unfixed CVEs")
f.StringVar(
&p.httpProxy,
"http-proxy",
@@ -312,6 +321,7 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
c.Conf.OvalDBURL = p.ovalDBURL
c.Conf.CvssScoreOver = p.cvssScoreOver
c.Conf.IgnoreUnscoredCves = p.ignoreUnscoredCves
c.Conf.IgnoreUnfixed = p.ignoreUnfixed
c.Conf.HTTPProxy = p.httpProxy
c.Conf.FormatXML = p.formatXML