Fixed a panic with cve-annotate
@@ -119,7 +119,7 @@ func getCVEData(client *nvd.Client, filePath, data string) {
}
}
// If there is no description field, fill the description from CVE information
- if !strings.Contains(infoBlockClean, "description:") {
+ if !strings.Contains(infoBlockClean, "description:") && len(cveItem.CVE.Description.DescriptionData) > 0 {
changed = true
newInfoBlock = newInfoBlock + fmt.Sprintf("\n description: %s", fmt.Sprintf("%q", cveItem.CVE.Description.DescriptionData[0].Value))
}
