diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-09-24 16:07:20 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-09-24 16:07:20 +0300 |
commit | 1063c8f3e8ade00156e38ca39b3d500035545ac6 (patch) | |
tree | a4d927c8e3be039a9c50a794268c24d48a9bc528 | |
parent | 780e66ea810e49ebce93c2fb8ee6c43fd0b67ee2 (diff) |
Replace calls to binaries and changes in output within report
-rw-r--r-- | include/tests_ports_packages | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 252d2338..6c6fb954 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -300,7 +300,7 @@ 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" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking arch-audit output for vulnerable packages" - FIND=$(${ARCH_AUDIT_BINARY} | sed 's/\.\..*$//' | sed 's/, //g' | sed 's/\(\["\|"\]\)//g' | sed 's/""/,/g' | awk '{ if($1=="Package") { print $2"|"$6"|"}}' | awk -F'|' 'NF>1{a[$1] = a[$1]","$2}END{for(i in a){print i""a[i]}}' | sed 's/,/|cve=/' | sort | grep --color=auto "^[a-z]\+") + 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}) if [ -z "${FIND}" ]; then LogText "Result: no vulnerable packages found with arch-audit" AddHP 10 10 |