Merge pull request #413 from transcedentalia/master
Fixing the always database revision 0 for Ubuntu
This commit is contained in:
commit
fec86b6211
@ -68,6 +68,8 @@ func (d detector) Detect(files tarutil.FilesMap) (*database.Namespace, error) {
|
||||
OS = "debian"
|
||||
break
|
||||
}
|
||||
|
||||
line[2] = strings.Split(line[2], "/")[0]
|
||||
version, found = database.UbuntuReleasesMapping[line[2]]
|
||||
if found {
|
||||
OS = "ubuntu"
|
||||
|
@ -344,6 +344,7 @@ func parseUbuntuCVE(fileContent io.Reader) (vulnerability database.Vulnerability
|
||||
// Only consider the package if its status is needed, active, deferred, not-affected or
|
||||
// released. Ignore DNE (package does not exist), needs-triage, ignored, pending.
|
||||
if md["status"] == "needed" || md["status"] == "active" || md["status"] == "deferred" || md["status"] == "released" || md["status"] == "not-affected" {
|
||||
md["release"] = strings.Split(md["release"], "/")[0]
|
||||
if _, isReleaseIgnored := ubuntuIgnoredReleases[md["release"]]; isReleaseIgnored {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user