mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
fix(aws): exact match in resource-arn filtering (#8533)
This commit is contained in:
@@ -21,6 +21,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
|
||||
## [v5.10.3] (Prowler UNRELEASED)
|
||||
|
||||
### Fixed
|
||||
- AWS resource-arn filtering [(#8533)](https://github.com/prowler-cloud/prowler/pull/8533)
|
||||
- GitHub App authentication for GitHub provider [(#8529)](https://github.com/prowler-cloud/prowler/pull/8529)
|
||||
|
||||
---
|
||||
|
||||
@@ -8,7 +8,7 @@ def is_resource_filtered(resource: str, audit_resources: list) -> bool:
|
||||
Returns True if it is filtered and False if it does not match the input filters
|
||||
"""
|
||||
try:
|
||||
if resource in str(audit_resources):
|
||||
if resource in audit_resources:
|
||||
return True
|
||||
return False
|
||||
except Exception as error:
|
||||
|
||||
@@ -13,5 +13,4 @@ class Test_Scan_Filters:
|
||||
assert not is_resource_filtered(
|
||||
"arn:aws:iam::123456789012:user/test1", audit_resources
|
||||
)
|
||||
assert is_resource_filtered("test_bucket", audit_resources)
|
||||
assert is_resource_filtered("arn:aws:s3:::test_bucket", audit_resources)
|
||||
|
||||
Reference in New Issue
Block a user