From 09f29a5e64d4eb0fbbec2a0a503fa173a973b898 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Wed, 18 Dec 2019 12:17:46 +0100 Subject: Code style improvement: quote argument --- include/tests_usb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include/tests_usb') diff --git a/include/tests_usb b/include/tests_usb index 36058490..24c74982 100644 --- a/include/tests_usb +++ b/include/tests_usb @@ -75,7 +75,7 @@ LogText "Result: usb-storage driver is not explicitly disabled" Display --indent 2 --text "- Checking usb-storage driver (modprobe config)" --result "NOT DISABLED" --color WHITE if [ "${USBGUARD_FOUND}" -eq "0" ]; then - ReportSuggestion ${TEST_NO} "Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft" + ReportSuggestion "${TEST_NO}" "Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft" fi AddHP 2 3 else @@ -117,7 +117,7 @@ Display --indent 2 --text "- Checking USB devices authorization" --result "${STATUS_ENABLED}" --color YELLOW # To-Be-Added: create documentation and enable the suggestion #if [ ${USBGUARD_FOUND} -eq 0 ]; then - # ReportSuggestion ${TEST_NO} "Disable USB devices authorization, to prevent unauthorized storage or data theft" + # ReportSuggestion "${TEST_NO}" "Disable USB devices authorization, to prevent unauthorized storage or data theft" #fi AddHP 0 3 else @@ -160,7 +160,7 @@ Display --indent 6 --text "- Restore controller device state" --result "${USBGUARD_RESTORE_POLICY}" --color YELLOW LogText " Consider changing RestoreControllerDeviceState to \"false\"" # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "RestoreControllerDeviceState (${USBGUARD_RESTORE_POLICY} --> false)" + # ReportSuggestion "${TEST_NO}" "Consider hardening USBGuard configuration" "RestoreControllerDeviceState (${USBGUARD_RESTORE_POLICY} --> false)" AddHP 0 1 ;; "false") @@ -171,7 +171,7 @@ LogText "Result: Invalid configuration for RestoreControllerDeviceState" Display --indent 6 --text "- Restore controller device state" --result "Invalid" --color RED # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "RestoreControllerDeviceState invalid \"${USBGUARD_RESTORE_POLICY}\"" + # ReportSuggestion "${TEST_NO}" "Fix USBGuard configuration" "RestoreControllerDeviceState invalid \"${USBGUARD_RESTORE_POLICY}\"" AddHP 0 1 ;; esac @@ -191,7 +191,7 @@ 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\"" # 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)" + # ReportSuggestion "${TEST_NO}" "Consider hardening USBGuard configuration" "PresentControllerPolicy (${USBGUARD_CONTROLLER_POLICY} --> (apply-policy|block|reject)" AddHP 0 1 ;; "apply-policy" | "block" | "reject") @@ -202,7 +202,7 @@ LogText "Result: Invalid configuration for PresentControllerPolicy" Display --indent 6 --text "- Rule for controllers connected before daemon starts" --result "Invalid" --color RED # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "PresentControllerPolicy invalid \"${USBGUARD_CONTROLLER_POLICY}\"" + # ReportSuggestion "${TEST_NO}" "Fix USBGuard configuration" "PresentControllerPolicy invalid \"${USBGUARD_CONTROLLER_POLICY}\"" AddHP 0 1 ;; esac @@ -221,7 +221,7 @@ 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\"" # 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)" + # ReportSuggestion "${TEST_NO}" "Consider hardening USBGuard configuration" "PresentDevicePolicy (${USBGUARD_DEVICE_POLICY} --> (apply-policy|block|reject)" AddHP 0 1 ;; "apply-policy" | "block" | "reject") @@ -232,7 +232,7 @@ LogText "Result: Invalid configuration for PresentDevicePolicy" Display --indent 6 --text "- Rule for devices connected before daemon starts" --result "Invalid" --color RED # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "PresentDevicePolicy invalid \"${USBGUARD_DEVICE_POLICY}\"" + # ReportSuggestion "${TEST_NO}" "Fix USBGuard configuration" "PresentDevicePolicy invalid \"${USBGUARD_DEVICE_POLICY}\"" AddHP 0 1 ;; esac @@ -251,7 +251,7 @@ 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\"" # 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)" + # ReportSuggestion "${TEST_NO}" "Consider hardening USBGuard configuration" "InsertedDevicePolicy (${USBGUARD_INSERTED_POLICY} --> (apply-policy|block|reject)" AddHP 0 1 ;; "apply-policy" | "block" | "reject") @@ -262,7 +262,7 @@ LogText "Result: Invalid configuration for InsertedDevicePolicy" Display --indent 6 --text "- Rule for devices inserted after daemon starts" --result "Invalid" --color RED # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "InsertedDevicePolicy invalid \"${USBGUARD_INSERTED_POLICY}\"" + # ReportSuggestion "${TEST_NO}" "Fix USBGuard configuration" "InsertedDevicePolicy invalid \"${USBGUARD_INSERTED_POLICY}\"" AddHP 0 1 ;; esac @@ -281,7 +281,7 @@ Display --indent 6 --text "- Rule for devices not in RuleFile" --result "${USBGUARD_DEFAULT_POLICY}" --color YELLOW LogText " Consider changing ImplicitPolicyTarget to \"block\" or \"reject\"" # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Consider hardening USBGuard configuration" "ImplicitPolicyTarget (${USBGUARD_DEFAULT_POLICY} --> (block|reject)" + # ReportSuggestion "${TEST_NO}" "Consider hardening USBGuard configuration" "ImplicitPolicyTarget (${USBGUARD_DEFAULT_POLICY} --> (block|reject)" AddHP 0 1 ;; "block"|"reject") @@ -292,7 +292,7 @@ LogText "Result: Invalid configuration for ImplicitPolicyTarget" Display --indent 6 --text "- Rule for devices not in RuleFile" --result "Invalid" --color RED # TODO: assign TEST_NO, create documentation, and enable the suggestion - # ReportSuggestion ${TEST_NO} "Fix USBGuard configuration" "ImplicitPolicyTarget invalid \"${USBGUARD_DEFAULT_POLICY}\"" + # ReportSuggestion "${TEST_NO}" "Fix USBGuard configuration" "ImplicitPolicyTarget invalid \"${USBGUARD_DEFAULT_POLICY}\"" AddHP 0 1 ;; esac @@ -319,7 +319,7 @@ LogText "Result: RuleFile not found (\"man usbguard\" for instructions to install initial policies)" Display --indent 4 --text "- RuleFile" --result "${STATUS_NOT_FOUND}" --color RED # To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion - #ReportSuggestion ${TEST_NO} "Install USBGuard RuleFile" "\"man usbguard\" for instructions to install initial policies" + #ReportSuggestion "${TEST_NO}" "Install USBGuard RuleFile" "\"man usbguard\" for instructions to install initial policies" AddHP 0 1 fi @@ -327,14 +327,14 @@ Display --indent 4 --text "- Configuration" --result "${STATUS_NOT_FOUND}" --color WHITE LogText "Result: Configuration not found" # To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion - #ReportSuggestion ${TEST_NO} "USBGuard configuration file not found, consider reinstalling" + #ReportSuggestion "${TEST_NO}" "USBGuard configuration file not found, consider reinstalling" AddHP 0 7 fi else LogText "Result: USBGuard not found" Display --indent 2 --text "- Checking USBGuard" --result "${STATUS_NOT_FOUND}" --color WHITE # To-Be-Added: assign TEST_NO, create documentation, and enable the suggestion - #ReportSuggestion ${TEST_NO} "Install USBGuard to allow for fine-grained control of USB authorization" + #ReportSuggestion "${TEST_NO}" "Install USBGuard to allow for fine-grained control of USB authorization" AddHP 0 8 fi -- cgit v1.2.3