mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 06:45:08 +00:00
fix(resource filters): add missing resource filters (#2951)
This commit is contained in:
@@ -3,6 +3,7 @@ from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
from prowler.lib.logger import logger
|
||||
from prowler.lib.scan_filters.scan_filters import is_resource_filtered
|
||||
from prowler.providers.aws.lib.service.service import AWSService
|
||||
|
||||
|
||||
@@ -34,6 +35,9 @@ class DocumentDB(AWSService):
|
||||
):
|
||||
for instance in page["DBInstances"]:
|
||||
instance_arn = instance["DBInstanceArn"]
|
||||
if not self.audit_resources or (
|
||||
is_resource_filtered(instance_arn, self.audit_resources)
|
||||
):
|
||||
self.db_instances[instance_arn] = Instance(
|
||||
id=instance["DBInstanceIdentifier"],
|
||||
arn=instance["DBInstanceArn"],
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
from prowler.lib.logger import logger
|
||||
from prowler.lib.scan_filters.scan_filters import is_resource_filtered
|
||||
from prowler.providers.aws.lib.service.service import AWSService
|
||||
|
||||
|
||||
@@ -23,6 +24,9 @@ class ElastiCache(AWSService):
|
||||
"CacheClusters"
|
||||
]:
|
||||
cluster_arn = cache_cluster["ARN"]
|
||||
if not self.audit_resources or (
|
||||
is_resource_filtered(cluster_arn, self.audit_resources)
|
||||
):
|
||||
self.clusters[cluster_arn] = Cluster(
|
||||
id=cache_cluster["CacheClusterId"],
|
||||
arn=cluster_arn,
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
from prowler.lib.logger import logger
|
||||
from prowler.lib.scan_filters.scan_filters import is_resource_filtered
|
||||
from prowler.providers.aws.lib.service.service import AWSService
|
||||
|
||||
|
||||
@@ -31,6 +32,9 @@ class Neptune(AWSService):
|
||||
],
|
||||
)["DBClusters"]:
|
||||
cluster_arn = cluster["DBClusterArn"]
|
||||
if not self.audit_resources or (
|
||||
is_resource_filtered(cluster_arn, self.audit_resources)
|
||||
):
|
||||
self.clusters[cluster_arn] = Cluster(
|
||||
arn=cluster_arn,
|
||||
name=cluster["DBClusterIdentifier"],
|
||||
|
||||
Reference in New Issue
Block a user