fix: Sort checks (#1302)

* fix: sort checks

* fix(metadata): Include missing provider
This commit is contained in:
Pepe Fagoaga
2022-08-03 12:14:23 +02:00
committed by GitHub
parent 5e479a5050
commit 6f0d42a881
2 changed files with 5 additions and 1 deletions

View File

@@ -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",

View File

@@ -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: