From 7a6312641a209da7bbe9d0a99d27a4074937b82d Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Fri, 14 Oct 2016 22:04:39 +0900 Subject: [PATCH] Fix bug --- config/tomlloader.go | 1 - scan/base.go | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/tomlloader.go b/config/tomlloader.go index 74a888f5fa..21e52640cb 100644 --- a/config/tomlloader.go +++ b/config/tomlloader.go @@ -51,7 +51,6 @@ func (c TOMLLoader) Load(pathToToml, keyPass string) (err error) { i := 0 for name, v := range conf.Servers { - if 0 < len(v.KeyPassword) { log.Warn("[Deprecated] KEYPASSWORD IN CONFIG FILE ARE UNSECURE. REMOVE THEM IMMEDIATELY FOR A SECURITY REASONS. THEY WILL BE REMOVED IN A FUTURE RELEASE.") } diff --git a/scan/base.go b/scan/base.go index b01ef6d98a..173c03a5dc 100644 --- a/scan/base.go +++ b/scan/base.go @@ -227,6 +227,7 @@ func (l *base) convertToModel() (models.ScanResult, error) { var scoredCves, unscoredCves, ignoredCves models.CveInfos for _, p := range l.UnsecurePackages { // ignoreCves + found := false for _, icve := range l.getServerInfo().IgnoreCves { if icve == p.CveDetail.CveID { ignoredCves = append(ignoredCves, models.CveInfo{ @@ -234,9 +235,13 @@ func (l *base) convertToModel() (models.ScanResult, error) { Packages: p.Packs, DistroAdvisories: p.DistroAdvisories, }) - continue + found = true + break } } + if found { + continue + } // unscoredCves if p.CveDetail.CvssScore(config.Conf.Lang) <= 0 {