mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
Limit CHECK_ID to a single value, handing the left-pad formatting in one place
Remove the second entry in any comma-separated check IDs from each check, formatting the check ID with leading zeros in `include/outputs` if the `-n` flag is active
This commit is contained in:
@@ -90,9 +90,8 @@ textTitle(){
|
||||
CHECKS_COUNTER=$((CHECKS_COUNTER+1))
|
||||
TITLE_ID=$1
|
||||
if [[ $NUMERAL ]]; then
|
||||
TITLE_ID=$(echo $TITLE_ID | cut -d, -f2)
|
||||
else
|
||||
TITLE_ID=$(echo $TITLE_ID | cut -d, -f1)
|
||||
# Left-pad the check ID with zeros to simplify sorting, e.g. 1.1 -> 1.01
|
||||
TITLE_ID=$(awk -F'.' '{ printf "%d.%02d", $1, $2 }' <<< "$TITLE_ID")
|
||||
fi
|
||||
|
||||
TITLE_TEXT=$2
|
||||
|
||||
Reference in New Issue
Block a user