feat(report) : Differences between vulnerability patched items (#1157)

* add plusDiff() and minusDiff()
* add plusDiff minusDiff test

Co-authored-by: Kota Kanbe <kotakanbe@gmail.com>
This commit is contained in:
kazuminn
2021-02-10 06:55:48 +09:00
committed by GitHub
parent 1c4f231572
commit 4c04acbd9e
11 changed files with 499 additions and 102 deletions

View File

@@ -206,7 +206,7 @@ func toSlackAttachments(r models.ScanResult) (attaches []slack.Attachment) {
}
a := slack.Attachment{
Title: vinfo.CveID,
Title: vinfo.CveIDDiffFormat(config.Conf.DiffMinus || config.Conf.DiffPlus),
TitleLink: "https://nvd.nist.gov/vuln/detail/" + vinfo.CveID,
Text: attachmentText(vinfo, r.Family, r.CweDict, r.Packages),
MarkdownIn: []string{"text", "pretext"},