Display summary of advisory when no entry in NVD, OVAL

This commit is contained in:
kota kanbe
2017-07-30 17:04:25 +09:00
parent 27724a2faf
commit 9899cba816
7 changed files with 304 additions and 267 deletions

View File

@@ -270,7 +270,7 @@ func attachmentText(vinfo models.VulnInfo, osFamily string) string {
severity,
cweIDs(vinfo, osFamily),
strings.Join(vectors, "\n"),
vinfo.CveContents.Summaries(config.Conf.Lang, osFamily)[0].Value,
vinfo.Summaries(config.Conf.Lang, osFamily)[0].Value,
)
}

View File

@@ -638,7 +638,7 @@ func summaryLines() string {
}
for i, vinfo := range vinfos {
summary := vinfo.CveContents.Summaries(
summary := vinfo.Titles(
config.Conf.Lang, currentScanResult.Family)[0].Value
cvssScore := fmt.Sprintf("| %4.1f",
vinfo.MaxCvssScore().Value.Score)
@@ -790,7 +790,7 @@ func detailLines() (string, error) {
}
}
summary := vinfo.CveContents.Summaries(r.Lang, r.Family)[0]
summary := vinfo.Summaries(r.Lang, r.Family)[0]
data := dataForTmpl{
CveID: vinfo.CveID,

View File

@@ -110,7 +110,7 @@ func formatShortPlainText(r models.ScanResult) string {
stable.MaxColWidth = maxColWidth
stable.Wrap = true
for _, vuln := range vulns.ToSortedSlice() {
summaries := vuln.CveContents.Summaries(config.Conf.Lang, r.Family)
summaries := vuln.Summaries(config.Conf.Lang, r.Family)
links := vuln.CveContents.SourceLinks(
config.Conf.Lang, r.Family, vuln.CveID)
@@ -199,7 +199,7 @@ func formatFullPlainText(r models.ScanResult) string {
if 0 < len(vuln.Cvss3Scores()) {
table.AddRow("CVSSv3 Calc", vuln.Cvss3CalcURL())
}
table.AddRow("Summary", vuln.CveContents.Summaries(
table.AddRow("Summary", vuln.Summaries(
config.Conf.Lang, r.Family)[0].Value)
links := vuln.CveContents.SourceLinks(