mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
added option -L to list check groups
This commit is contained in:
@@ -170,7 +170,7 @@ This script has been written in bash using AWS-CLI and it works in Linux and OSX
|
|||||||
(i.e.: us-east-1), all regions are checked anyway if the check requires it
|
(i.e.: us-east-1), all regions are checked anyway if the check requires it
|
||||||
-c <check_id> specify a check id, to see all available checks use -l option
|
-c <check_id> specify a check id, to see all available checks use -l option
|
||||||
(i.e.: check11 for check 1.1 or extra71 for extra check 71)
|
(i.e.: check11 for check 1.1 or extra71 for extra check 71)
|
||||||
-g <group_id> specify a group of checks by id, to see all available group of checks use -l
|
-g <group_id> specify a group of checks by id, to see all available group of checks use -L
|
||||||
(i.e.: check3 for entire section 3, level1 for CIS Level 1 Profile Definitions or forensics-ready)
|
(i.e.: check3 for entire section 3, level1 for CIS Level 1 Profile Definitions or forensics-ready)
|
||||||
-f <filterregion> specify an AWS region to run checks against
|
-f <filterregion> specify an AWS region to run checks against
|
||||||
(i.e.: us-west-1)
|
(i.e.: us-west-1)
|
||||||
@@ -180,6 +180,7 @@ This script has been written in bash using AWS-CLI and it works in Linux and OSX
|
|||||||
-n show check numbers to sort easier
|
-n show check numbers to sort easier
|
||||||
(i.e.: 1.01 instead of 1.1)
|
(i.e.: 1.01 instead of 1.1)
|
||||||
-l list all available checks only (does not perform any check)
|
-l list all available checks only (does not perform any check)
|
||||||
|
-L list all groups (does not perform any check)
|
||||||
-e exclude group extras
|
-e exclude group extras
|
||||||
-b do not print Prowler banner
|
-b do not print Prowler banner
|
||||||
-h this help
|
-h this help
|
||||||
|
|||||||
14
prowler
14
prowler
@@ -58,7 +58,7 @@ USAGE:
|
|||||||
(i.e.: us-east-1), all regions are checked anyway if the check requires it
|
(i.e.: us-east-1), all regions are checked anyway if the check requires it
|
||||||
-c <check_id> specify a check id, to see all available checks use "-l" option
|
-c <check_id> specify a check id, to see all available checks use "-l" option
|
||||||
(i.e.: "check11" for check 1.1 or "extra71" for extra check 71)
|
(i.e.: "check11" for check 1.1 or "extra71" for extra check 71)
|
||||||
-g <group_id> specify a group of checks by id, to see all available group of checks use "-l"
|
-g <group_id> specify a group of checks by id, to see all available group of checks use "-L"
|
||||||
(i.e.: "check3" for entire section 3, "level1" for CIS Level 1 Profile Definitions or "forensics-ready")
|
(i.e.: "check3" for entire section 3, "level1" for CIS Level 1 Profile Definitions or "forensics-ready")
|
||||||
-f <filterregion> specify an AWS region to run checks against
|
-f <filterregion> specify an AWS region to run checks against
|
||||||
(i.e.: us-west-1)
|
(i.e.: us-west-1)
|
||||||
@@ -68,6 +68,7 @@ USAGE:
|
|||||||
-n show check numbers to sort easier
|
-n show check numbers to sort easier
|
||||||
(i.e.: 1.01 instead of 1.1)
|
(i.e.: 1.01 instead of 1.1)
|
||||||
-l list all available checks only (does not perform any check)
|
-l list all available checks only (does not perform any check)
|
||||||
|
-L list all groups (does not perform any check)
|
||||||
-e exclude group extras
|
-e exclude group extras
|
||||||
-b do not print Prowler banner
|
-b do not print Prowler banner
|
||||||
-V show version number & exit
|
-V show version number & exit
|
||||||
@@ -76,7 +77,7 @@ USAGE:
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":hlkp:r:c:g:f:m:M:enbV" OPTION; do
|
while getopts ":hlLkp:r:c:g:f:m:M:enbV" OPTION; do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
h )
|
h )
|
||||||
usage
|
usage
|
||||||
@@ -86,6 +87,9 @@ while getopts ":hlkp:r:c:g:f:m:M:enbV" OPTION; do
|
|||||||
l )
|
l )
|
||||||
PRINTCHECKSONLY=1
|
PRINTCHECKSONLY=1
|
||||||
;;
|
;;
|
||||||
|
L )
|
||||||
|
PRINTGROUPSONLY=1
|
||||||
|
;;
|
||||||
k )
|
k )
|
||||||
KEEPCREDREPORT=1
|
KEEPCREDREPORT=1
|
||||||
;;
|
;;
|
||||||
@@ -272,6 +276,12 @@ if [[ $PRINTCHECKSONLY == "1" ]]; then
|
|||||||
exit $EXITCODE
|
exit $EXITCODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# List only group tittles
|
||||||
|
if [[ $PRINTGROUPSONLY == "1" ]]; then
|
||||||
|
show_all_group_titles
|
||||||
|
exit $EXITCODE
|
||||||
|
fi
|
||||||
|
|
||||||
# Check that jq is installed for JSON output
|
# Check that jq is installed for JSON output
|
||||||
if [[ $MODE == "json" ]]; then
|
if [[ $MODE == "json" ]]; then
|
||||||
. $PROWLER_DIR/include/jq_detector
|
. $PROWLER_DIR/include/jq_detector
|
||||||
|
|||||||
Reference in New Issue
Block a user