Add ignore-unscored-cves option

This commit is contained in:
kota kanbe
2016-05-23 09:35:55 +09:00
parent d356e8370d
commit 6d528e741d
6 changed files with 45 additions and 11 deletions

View File

@@ -109,7 +109,12 @@ func msgText(r models.ScanResult) string {
func toSlackAttachments(scanResult models.ScanResult) (attaches []*attachment) {
scanResult.KnownCves = append(scanResult.KnownCves, scanResult.UnknownCves...)
cves := scanResult.KnownCves
if !config.Conf.IgnoreUnscoredCves {
cves = append(cves, scanResult.UnknownCves...)
}
scanResult.KnownCves = cves
for _, cveInfo := range scanResult.KnownCves {
cveID := cveInfo.CveDetail.CveID