From a0164727d8fe242f2d5e2cf7e735f559a1c05e62 Mon Sep 17 00:00:00 2001 From: Anthony Di Pietro Date: Sat, 11 Oct 2025 05:45:37 +0000 Subject: [PATCH 1/4] Update tests_authentication --- include/tests_authentication | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index 9a33cea1..3a20f787 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -78,7 +78,7 @@ fi # Check password file if [ -f ${PASSWD_FILE} ]; then - FIND=$(${GREPBINARY} -v '^#' ${PASSWD_FILE} | ${CUTBINARY} -d ':' -f3 | ${SORTBINARY} | uniq -d) + FIND=$(${GREPBINARY} -v '^#' ${PASSWD_FILE} | grep -v '^git:\*:' | ${CUTBINARY} -d ':' -f3 | ${SORTBINARY} | uniq -d) if [ "${FIND}" = "" ]; then Display --indent 2 --text "- Unique UIDs" --result "${STATUS_OK}" --color GREEN LogText "Result: all accounts found in ${PASSWD_FILE} are unique" @@ -162,7 +162,7 @@ LogText "Test: Checking login shells" if [ -f ${ROOTDIR}etc/master.passwd ]; then # Check for all shells, except: (/usr)/sbin/nologin /nonexistent - FIND=$(${GREPBINARY} "[a-z]:\*:" ${ROOTDIR}etc/master.passwd | ${GREPBINARY} -E -v '^#|/sbin/nologin|/usr/sbin/nologin|/nonexistent' | ${SEDBINARY} 's/ /!space!/g') + FIND=$(${GREPBINARY} "[a-z]:\*:" ${ROOTDIR}etc/master.passwd | ${GREPBINARY} -E -v '^#|/sbin/nologin|/usr/sbin/nologin|/nonexistent' | ${SEDBINARY} 's/ /!space!/g' | ${GREPBINARY} -vE '^(git|_gitea|_forgejo):\*:') if [ -z "${FIND}" ]; then Display --indent 2 --text "- Login shells" --result "${STATUS_OK}" --color GREEN else @@ -659,7 +659,12 @@ # # Test : AUTH-9262 # Description : Search for PAM password strength testing libraries - Register --test-no AUTH-9262 --weight L --network NO --category security --description "Checking presence password strength testing tools (PAM)" + if [ ! "${OS}" = "OpenBSD" ]; then + PREQS_MET="YES" + else + PREQS_MET="NO" + fi + Register --test-no AUTH-9262 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Checking presence password strength testing tools (PAM)" if [ ${SKIPTEST} -eq 0 ]; then FOUND=0 FOUND_CRACKLIB=0 From 423581c1f51dbd140d5719f6b10b641082391966 Mon Sep 17 00:00:00 2001 From: Anthony Di Pietro Date: Sat, 11 Oct 2025 05:49:02 +0000 Subject: [PATCH 2/4] Update tests_homedirs --- include/tests_homedirs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_homedirs b/include/tests_homedirs index c634cb44..d3c2e2af 100644 --- a/include/tests_homedirs +++ b/include/tests_homedirs @@ -99,7 +99,7 @@ EOF LogText "Test: checking directory '${DIR}' for user '${USER}'" if [ -d "${DIR}" ]; then OWNER=$(ls -ld ${DIR} | awk -F" " '{ print $3 }') - if [ ! "${OWNER}" = "${USER}" ]; then + if [ ! "$(id -u "${OWNER}")" = "$(id -u "${USER}")" ]; then LogText "Result: the home directory ${DIR} of user ${USER} is owned by ${OWNER}. Correct: chown ${USER} ${DIR}" FOUND=1 else From 95d6dbbceaf4a9018b373c1af9e6e63c03cd02e3 Mon Sep 17 00:00:00 2001 From: Anthony Di Pietro Date: Sat, 11 Oct 2025 05:53:03 +0000 Subject: [PATCH 3/4] Update tests_ports_packages --- include/tests_ports_packages | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 36af206b..439ff351 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -1341,7 +1341,12 @@ EOF # # Test : PKGS-7398 # Description : Check package audit tool - Register --test-no PKGS-7398 --weight L --network YES --category security --description "Check for package audit tool" + if [ ! "${OS}" = "OpenBSD" ]; then + PREQS_MET="YES" + else + PREQS_MET="NO" + fi + Register --test-no PKGS-7398 --preqs-met ${PREQS_MET} --weight L --network YES --category security --description "Check for package audit tool" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking for package audit tool" if [ ${PACKAGE_AUDIT_TOOL_FOUND} -eq 0 ]; then From e7ed1d3ec34ebcae23a8efd7238cd1b412c32bc9 Mon Sep 17 00:00:00 2001 From: Anthony Di Pietro Date: Sat, 11 Oct 2025 05:54:37 +0000 Subject: [PATCH 4/4] Update tests_filesystems --- include/tests_filesystems | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_filesystems b/include/tests_filesystems index 7b2031db..4397010b 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -305,7 +305,7 @@ if [ ${FOUND} -eq 1 ]; then Display --indent 2 --text "- Query swap partitions (fstab)" --result "${STATUS_OK}" --color GREEN else - Display --indent 2 --text "- Query swap partitions (fstab)" --result "${STATUS_NONE}" --color YELLOW + Display --indent 2 --text "- Query swap partitions (fstab)" --result "${STATUS_NONE}" --color WHITE LogText "Result: no swap partitions found in /etc/fstab" fi fi