From 0ff7641471ad115c801de8d5429af4ac237fc04d Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Mon, 13 Apr 2020 18:20:32 +0900 Subject: [PATCH] feat(report): display "fixed" when updatable even in fast mode (#957) --- models/vulninfos.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/models/vulninfos.go b/models/vulninfos.go index 6418efa6..b28b7535 100644 --- a/models/vulninfos.go +++ b/models/vulninfos.go @@ -567,6 +567,13 @@ func (v VulnInfo) PatchStatus(packs Packages) string { return "unfixed" } + // Fast and offline mode can not get the candidate version. + // Vuls can be considered as 'fixed' if not-fixed-yet==true and + // the fixed-in-version (information in the oval) is not an empty. + if p.FixedIn != "" { + continue + } + // fast, offline mode doesn't have new version if pack, ok := packs[p.Name]; ok { if pack.NewVersion == "" {