mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
feat(ec2_checks): add several checks for ec2 (#1268)
* feat(checks): add extra718 * feat(checks): add extra763 * feat(checks): add extra748, extra749, extra72 * feat(checks): add extra750 * feat(checks): add check45 * feat(checks): add check46, check45, check42, check41 * feat(metadata_sample): add sample of check metadata * feat(pci-group): add pci group. * feat(cloud9): environment setup. * fix(protocol): add protocol conditions Co-authored-by: sergargar <sergio@verica.io>
This commit is contained in:
@@ -161,19 +161,20 @@ class Test_Check:
|
||||
},
|
||||
"expected": {
|
||||
"iam_disable_30_days_credentials",
|
||||
"iam_disable_90_days_credentials",
|
||||
},
|
||||
},
|
||||
{
|
||||
"input": {
|
||||
"excluded_group_list": {"iam"},
|
||||
"excluded_group_list": {"pci"},
|
||||
"provider": "aws",
|
||||
"checks_to_run": {
|
||||
"iam_disable_30_days_credentials",
|
||||
"iam_disable_90_days_credentials",
|
||||
},
|
||||
},
|
||||
"expected": set(),
|
||||
"expected": {
|
||||
"iam_disable_30_days_credentials",
|
||||
},
|
||||
},
|
||||
]
|
||||
for test in test_cases:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from config.config import groups_file
|
||||
from lib.check.check import (
|
||||
load_checks_to_execute_from_groups,
|
||||
parse_checks_from_file,
|
||||
parse_groups_from_file,
|
||||
recover_checks_from_provider,
|
||||
@@ -59,8 +60,9 @@ def load_checks_to_execute(
|
||||
# Handle if there are groups passed using -g/--groups
|
||||
elif group_list:
|
||||
try:
|
||||
checks_to_execute = parse_groups_from_file(
|
||||
groups_file, group_list, provider
|
||||
available_groups = parse_groups_from_file(groups_file)
|
||||
checks_to_execute = load_checks_to_execute_from_groups(
|
||||
available_groups, group_list, provider
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"{e.__class__.__name__} -- {e}")
|
||||
|
||||
@@ -203,10 +203,9 @@ class Check_Report:
|
||||
region: str
|
||||
status_extended: str
|
||||
check_metadata: dict
|
||||
status_extended: str
|
||||
resource_id: str
|
||||
resource_details: str
|
||||
resource_tags: str
|
||||
resource_tags: list
|
||||
resource_arn: str
|
||||
|
||||
def __init__(self, metadata):
|
||||
|
||||
Reference in New Issue
Block a user