mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
fix: Sort checks (#1302)
* fix: sort checks * fix(metadata): Include missing provider
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"Provider": "aws",
|
||||
"CheckID": "ec2_securitygroup_allow_ingress_from_internet_to_any_port",
|
||||
"CheckTitle": "Ensure no security groups allow ingress from 0.0.0.0/0 or ::/0 to any port.",
|
||||
"CheckType": "Infrastructure Security",
|
||||
|
||||
5
prowler
5
prowler
@@ -236,6 +236,9 @@ if __name__ == "__main__":
|
||||
checks_to_execute, excluded_services, provider
|
||||
)
|
||||
|
||||
# Sort final check list
|
||||
checks_to_execute = sorted(checks_to_execute)
|
||||
|
||||
# If -l/--list-checks passed as argument, print checks to execute and quit
|
||||
if args.list_checks:
|
||||
print_checks(provider, checks_to_execute, bulk_checks_metadata)
|
||||
@@ -265,7 +268,7 @@ if __name__ == "__main__":
|
||||
|
||||
# Execute checks
|
||||
if len(checks_to_execute):
|
||||
for check_name in sorted(checks_to_execute):
|
||||
for check_name in checks_to_execute:
|
||||
# Recover service from check name
|
||||
service = check_name.split("_")[0]
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user