From ad012f8db6a94d5c9313dea543573d83ebba0219 Mon Sep 17 00:00:00 2001 From: Jeremy Phillips Date: Tue, 9 Oct 2018 08:52:24 -0400 Subject: [PATCH] List not listing checks, but executing them. Then only displays the first check per group. --- prowler | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/prowler b/prowler index 7b802047..a0818bfa 100755 --- a/prowler +++ b/prowler @@ -249,7 +249,7 @@ show_all_titles() { show_group_title $i # Display the title of the checks IFS=',' read -ra CHECKS <<< ${GROUP_CHECKS[$i]} - for j in $CHECKS; do + for j in ${CHECKS[@]}; do show_check_title $j done done @@ -266,6 +266,12 @@ if [[ $MODE != "csv" ]]; then prowlerBanner fi +# List only check tittles +if [[ $PRINTCHECKSONLY == "1" ]]; then + show_all_titles + exit $EXITCODE +fi + # Check that jq is installed for JSON output if [[ $MODE == "json" ]]; then . $PROWLER_DIR/include/jq_detector @@ -302,13 +308,6 @@ if [[ $GROUP_ID_READ ]];then fi fi -# List only check tittles -if [[ $PRINTCHECKSONLY == "1" ]]; then - prowlerBanner - show_all_titles - exit $EXITCODE -fi - execute_all cleanTemp