mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 12:31:54 +00:00
fix(cloudfront): Incorrect bucket name retrievement (#6950)
Co-authored-by: Hugo Pereira Brito <101209179+HugoPBrito@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ class cloudfront_distributions_s3_origin_non_existent_bucket(Check):
|
||||
|
||||
for origin in distribution.origins:
|
||||
if origin.s3_origin_config:
|
||||
bucket_name = origin.domain_name.split(".")[0]
|
||||
bucket_name = origin.domain_name.split(".s3")[0]
|
||||
if not s3_client._head_bucket(bucket_name):
|
||||
non_existent_buckets.append(bucket_name)
|
||||
|
||||
|
||||
@@ -494,6 +494,7 @@ class S3(AWSService):
|
||||
)
|
||||
return False
|
||||
else:
|
||||
# Bucket exists but we don't have access to it
|
||||
logger.error(
|
||||
f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user