mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-23 22:04:39 +02:00
Show on screen if vulnerable packages are found
This commit is contained in:
parent
acafb316d3
commit
5c53d16189
@ -278,9 +278,9 @@
|
|||||||
FIND=`${ZYPPERBINARY} pchk | grep "(0 security patches)"`
|
FIND=`${ZYPPERBINARY} pchk | grep "(0 security patches)"`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
LogText "Result: No security updates found with Zypper"
|
LogText "Result: No security updates found with Zypper"
|
||||||
Display --indent 2 --text "- Using Zypper to obtain vulnerable packages" --result NONE --color GREEN
|
Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result NONE --color GREEN
|
||||||
else
|
else
|
||||||
Display --indent 2 --text "- Using Zypper to obtain vulnerabilities" --result WARNING --color RED
|
Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result WARNING --color RED
|
||||||
LogText "Result: Zypper found one or more installed packages which are vulnerable."
|
LogText "Result: Zypper found one or more installed packages which are vulnerable."
|
||||||
ReportWarning ${TEST_NO} "H" "Found one or more vulnerable packages installed"
|
ReportWarning ${TEST_NO} "H" "Found one or more vulnerable packages installed"
|
||||||
# Unfortunately zypper does not properly give back which package it is. Usually best guess is last word on the line
|
# Unfortunately zypper does not properly give back which package it is. Usually best guess is last word on the line
|
||||||
@ -417,8 +417,11 @@
|
|||||||
AddHP 1 2
|
AddHP 1 2
|
||||||
done
|
done
|
||||||
ReportWarning ${TEST_NO} "H" "Found one or more vulnerable packages. Run: dnf upgrade"
|
ReportWarning ${TEST_NO} "H" "Found one or more vulnerable packages. Run: dnf upgrade"
|
||||||
|
Display --indent 2 --text "- Using DNF to find vulnerable packages" --result WARNING --color RED
|
||||||
|
|
||||||
else
|
else
|
||||||
LogText "Result: no security updates found"
|
LogText "Result: no security updates found"
|
||||||
|
Display --indent 2 --text "- Using DNF to find vulnerable packages" --result NONE --color GREEN
|
||||||
AddHP 5 5
|
AddHP 5 5
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user