fix: a bug of diff logic when multiple oval defs found for a certain CVE-ID and same updated_at (#627)

* fix: a bug of diff logic when multiple oval-defs hav certain CVE-ID and same updated_at

Commented out beause a bug of diff logic when multiple oval defs has certain CVE-ID and same updated_at.
If these OVAL defs have different affected packages, this logic detects not-updated-CVE-ID as updated.
This logic will be uncommented after integration with ghost https://github.com/knqyf263/gost
This commit is contained in:
Kota Kanbe
2018-03-26 22:29:14 +09:00
committed by GitHub
parent 1d49c0e1ce
commit baa0e897b2
2 changed files with 16 additions and 11 deletions

View File

@@ -347,9 +347,14 @@ func getDiffCves(previous, current models.ScanResult) models.VulnInfos {
if isCveInfoUpdated(v.CveID, previous, current) {
updated[v.CveID] = v
util.Log.Debugf("updated: %s", v.CveID)
} else if isCveFixed(v, previous) {
updated[v.CveID] = v
util.Log.Debugf("fixed: %s", v.CveID)
// TODO commented out beause a bug of diff logic when multiple oval defs found for a certain CVE-ID and same updated_at
// if these OVAL defs have different affected packages, this logic detects as updated.
// This logic will be uncommented after integration with ghost https://github.com/knqyf263/gost
// } else if isCveFixed(v, previous) {
// updated[v.CveID] = v
// util.Log.Debugf("fixed: %s", v.CveID)
} else {
util.Log.Debugf("same: %s", v.CveID)
}