fix(report): warning only if the kernel version is unknown (#822)

This commit is contained in:
Kota Kanbe
2019-05-24 10:09:11 +09:00
committed by GitHub
parent 299805a726
commit 774544c975

View File

@@ -266,11 +266,10 @@ func (o Ubuntu) fillWithOval(driver db.DB, r *models.ScanResult, kernelNamesInOv
if r.Container.ContainerID == "" {
if v, ok := r.Packages[linuxImage]; ok {
runningKernelVersion = v.Version
} else {
util.Log.Warnf("Unable to detect vulns of running kernel because the version of the runnning kernel is unknown. server: %s",
r.ServerName)
}
util.Log.Warnf("Unable to detect vulns of running kernel because the version of the runnning kernel is unknown. server: %s",
r.ServerName)
// if runningKernelVersion is "", can't detect the vulns of running Kernel
for _, n := range kernelNamesInOval {
if p, ok := r.Packages[n]; ok {