Fix performance and bug (#867)

* Fix performance

* Update goval-dictionary

* Go mod tidy
This commit is contained in:
Masahiro Fujimura
2019-07-15 21:20:01 +09:00
committed by Teppei Fukuda
parent c5e13dd5e4
commit a977533c78
6 changed files with 27 additions and 26 deletions

View File

@@ -152,7 +152,7 @@ func (o RedHatBase) update(r *models.ScanResult, defPacks defPacks) (nCVEs int)
func (o RedHatBase) convertToDistroAdvisory(def *ovalmodels.Definition) *models.DistroAdvisory {
advisoryID := def.Title
if o.family == config.RedHat || o.family == config.CentOS {
if (o.family == config.RedHat || o.family == config.CentOS) && len(advisoryID) > 0 {
ss := strings.Fields(def.Title)
advisoryID = strings.TrimSuffix(ss[0], ":")
}