mirror of https://github.com/CISOfy/lynis.git
Mark tests PKGS-7320 and PKGS-7322 as Linux-only
This commit is contained in:
parent
cf558df73a
commit
a3f57e6d01
|
@ -280,7 +280,7 @@
|
|||
# Test : PKGS-7320
|
||||
# Description : Check available of arch-audit
|
||||
if [ "${OS_FULLNAME}" = "Arch Linux" ]; then PREQS_MET="YES"; SKIPREASON=""; else PREQS_MET="NO"; SKIPREASON="Test only applies to Arch Linux"; fi
|
||||
Register --test-no PKGS-7320 --preqs-met ${PREQS_MET} --skip-reason "${SKIPREASON}" --weight L --network NO --category security --description "Checking for arch-audit tooling"
|
||||
Register --test-no PKGS-7320 --os "Linux" --preqs-met ${PREQS_MET} --skip-reason "${SKIPREASON}" --weight L --network NO --category security --description "Checking for arch-audit tooling"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
if [ -z "${ARCH_AUDIT_BINARY}" ]; then
|
||||
LogText "Result: no arch-audit binary found"
|
||||
|
@ -299,7 +299,7 @@
|
|||
# Test : PKGS-7322
|
||||
# Description : Discover vulnerable packages with arch-audit
|
||||
if [ ! -z "${ARCH_AUDIT_BINARY}" ]; then PREQS_MET="YES"; SKIPREASON=""; else PREQS_MET="NO"; SKIPREASON="arch-audit not found"; fi
|
||||
Register --test-no PKGS-7322 --preqs-met ${PREQS_MET} --skip-reason "${SKIPREASON}" --weight L --network NO --category security --description "Discover vulnerable packages with arch-audit"
|
||||
Register --test-no PKGS-7322 --os "Linux" --preqs-met ${PREQS_MET} --skip-reason "${SKIPREASON}" --weight L --network NO --category security --description "Discover vulnerable packages with arch-audit"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
LogText "Test: checking arch-audit output for vulnerable packages"
|
||||
FIND=$(${ARCH_AUDIT_BINARY} | ${SEDBINARY} 's/\.\..*$//' | ${SEDBINARY} 's/, //g' | ${SEDBINARY} 's/\(\["\|"\]\)//g' | ${SEDBINARY} 's/""/,/g' | ${AWKBINARY} '{ if($1=="Package") { print $2"|"$6"|"}}' | ${AWKBINARY} -F'|' 'NF>1{a[$1] = a[$1]","$2}END{for(i in a){print i""a[i]"|"}}' | ${SEDBINARY} 's/,/|cve=/' | ${SORTBINARY})
|
||||
|
|
Loading…
Reference in New Issue