mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
fix(custom_checks): workaround to fix execution (#4256)
This commit is contained in:
+10
-1
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user