fix(custom_checks): workaround to fix execution (#4256)

This commit is contained in:
Pepe Fagoaga
2024-06-17 20:13:18 +02:00
committed by GitHub
parent 61b9ecc214
commit 8ad14c7833
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -181,7 +181,16 @@ def prowler():
# Import custom checks from folder
if checks_folder:
custom_checks = parse_checks_from_folder(global_provider, checks_folder)
checks_to_execute.update(custom_checks)
# Workaround to be able to execute custom checks alongside all checks if nothing is explicitly set
if (
not checks_file
and not checks
and not services
and not severities
and not compliance_framework
and not categories
):
checks_to_execute.update(custom_checks)
# Exclude checks if -e/--excluded-checks
if excluded_checks:
+1
View File
@@ -127,6 +127,7 @@ def parse_checks_from_file(input_file: str, provider: str) -> set:
# Load checks from custom folder
def parse_checks_from_folder(provider, input_folder: str) -> set:
# TODO: move the AWS-specific code into the provider
try:
custom_checks = set()
# Check if input folder is a S3 URI