diff --git a/gost/debian.go b/gost/debian.go index 6e3f7c32..1b5b3a85 100644 --- a/gost/debian.go +++ b/gost/debian.go @@ -115,7 +115,11 @@ func (deb Debian) FillWithGost(driver db.DB, r *models.ScanResult) (nCVEs int, e for _, cve := range p.cves { v, ok := r.ScannedCves[cve.CveID] if ok { - v.CveContents[models.DebianSecurityTracker] = cve + if v.CveContents == nil { + v.CveContents = models.NewCveContents(cve) + } else { + v.CveContents[models.DebianSecurityTracker] = cve + } } else { v = models.VulnInfo{ CveID: cve.CveID, diff --git a/gost/microsoft.go b/gost/microsoft.go index 487d3fec..03858c6e 100644 --- a/gost/microsoft.go +++ b/gost/microsoft.go @@ -45,6 +45,9 @@ func (ms Microsoft) FillWithGost(driver db.DB, r *models.ScanResult) (nCVEs int, } cveCont := ms.ConvertToModel(&msCve) v, _ := r.ScannedCves[cveID] + if v.CveContents == nil { + v.CveContents = models.CveContents{} + } v.CveContents[models.Microsoft] = *cveCont r.ScannedCves[cveID] = v }