Minor cleanup

This commit is contained in:
Michael Boelen 2019-07-15 19:57:23 +02:00
parent 08cbc6fe2e
commit 7ec81715aa
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 18 additions and 19 deletions
include

View File

@ -130,7 +130,6 @@
#
#################################################################################
#
# Test : USB-3000
# Description : Perform USBGuard check
Register --test-no USB-3000 --os Linux --weight L --network NO --category security --description "Check for presence of USBGuard"
@ -141,8 +140,8 @@
AddHP 1 1
LogText "Checking USBGuard configuration file"
if [ -f /etc/usbguard/usbguard-daemon.conf ]; then
USBGUARD_CONFIG="/etc/usbguard/usbguard-daemon.conf"
if [ -f ${ROOTDIR}etc/usbguard/usbguard-daemon.conf ]; then
USBGUARD_CONFIG="${ROOTDIR}etc/usbguard/usbguard-daemon.conf"
else
USBGUARD_CONFIG=""
fi
@ -160,7 +159,7 @@
"true")
Display --indent 6 --text "- Restore controller device state" --result "${USBGUARD_RESTORE_POLICY}" --color YELLOW
LogText " Consider changing RestoreControllerDeviceState to \"false\""
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "RestoreControllerDeviceState (${USBGUARD_RESTORE_POLICY} --> false)"
AddHP 0 1
;;
@ -171,7 +170,7 @@
*)
LogText "Result: Invalid configuration for RestoreControllerDeviceState"
Display --indent 6 --text "- Restore controller device state" --result "Invalid" --color RED
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "RestoreControllerDeviceState invalid \"${USBGUARD_RESTORE_POLICY}\""
AddHP 0 1
;;
@ -191,7 +190,7 @@
"allow" | "keep")
Display --indent 6 --text "- Rule for controllers connected before daemon starts" --result "${USBGUARD_CONTROLLER_POLICY}" --color YELLOW
LogText " Consider changing PresentControllerPolicy to \"apply-policy\", \"block\" or \"reject\""
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "PresentControllerPolicy (${USBGUARD_CONTROLLER_POLICY} --> (apply-policy|block|reject)"
AddHP 0 1
;;
@ -202,7 +201,7 @@
*)
LogText "Result: Invalid configuration for PresentControllerPolicy"
Display --indent 6 --text "- Rule for controllers connected before daemon starts" --result "Invalid" --color RED
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "PresentControllerPolicy invalid \"${USBGUARD_CONTROLLER_POLICY}\""
AddHP 0 1
;;
@ -221,7 +220,7 @@
"allow" | "keep")
Display --indent 6 --text "- Rule for devices connected before daemon starts" --result "${USBGUARD_DEVICE_POLICY}" --color YELLOW
LogText " Consider changing PresentDevicePolicy to \"apply-policy\", \"block\" or \"reject\""
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "PresentDevicePolicy (${USBGUARD_DEVICE_POLICY} --> (apply-policy|block|reject)"
AddHP 0 1
;;
@ -232,7 +231,7 @@
*)
LogText "Result: Invalid configuration for PresentDevicePolicy"
Display --indent 6 --text "- Rule for devices connected before daemon starts" --result "Invalid" --color RED
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "PresentDevicePolicy invalid \"${USBGUARD_DEVICE_POLICY}\""
AddHP 0 1
;;
@ -251,7 +250,7 @@
"allow" | "keep")
Display --indent 6 --text "- Rule for devices inserted after daemon starts" --result "${USBGUARD_INSERTED_POLICY}" --color YELLOW
LogText " Consider changing InsertedDevicePolicy to \"apply-policy\", \"block\" or \"reject\""
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "InsertedDevicePolicy (${USBGUARD_INSERTED_POLICY} --> (apply-policy|block|reject)"
AddHP 0 1
;;
@ -262,7 +261,7 @@
*)
LogText "Result: Invalid configuration for InsertedDevicePolicy"
Display --indent 6 --text "- Rule for devices inserted after daemon starts" --result "Invalid" --color RED
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "InsertedDevicePolicy invalid \"${USBGUARD_INSERTED_POLICY}\""
AddHP 0 1
;;
@ -281,7 +280,7 @@
"allow")
Display --indent 6 --text "- Rule for devices not in RuleFile" --result "${USBGUARD_DEFAULT_POLICY}" --color YELLOW
LogText " Consider changing ImplicitPolicyTarget to \"block\" or \"reject\""
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "ImplicitPolicyTarget (${USBGUARD_DEFAULT_POLICY} --> (block|reject)"
AddHP 0 1
;;
@ -292,7 +291,7 @@
*)
LogText "Result: Invalid configuration for ImplicitPolicyTarget"
Display --indent 6 --text "- Rule for devices not in RuleFile" --result "Invalid" --color RED
# To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion
# TODO: assign TEST_NO, create documentation, and enable the suggestion
# ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "ImplicitPolicyTarget invalid \"${USBGUARD_DEFAULT_POLICY}\""
AddHP 0 1
;;