refactor(nvdxml): Remove codes related to NVD xml(deprecated) (#1099)

This commit is contained in:
Kota Kanbe
2020-12-25 06:16:14 +09:00
committed by GitHub
parent fb1fbf8f95
commit 5a14a58fe4
9 changed files with 82 additions and 94 deletions

View File

@@ -69,7 +69,7 @@ func (w SyslogWriter) encodeSyslog(result models.ScanResult) (messages []string)
kvPairs = append(kvPairs, fmt.Sprintf(`cvss_vector_%s_v3="%s"`, cvss.Type, cvss.Value.Vector))
}
if content, ok := vinfo.CveContents[models.NvdXML]; ok {
if content, ok := vinfo.CveContents[models.Nvd]; ok {
cwes := strings.Join(content.CweIDs, ",")
kvPairs = append(kvPairs, fmt.Sprintf(`cwe_ids="%s"`, cwes))
if config.Conf.Syslog.Verbose {