mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
fix(cloudfront): Incorrect bucket name retrievement (#6947)
This commit is contained in:
committed by
GitHub
parent
928ccfefb8
commit
ed5a0ae45a
+1
-1
@@ -16,7 +16,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)
|
||||
|
||||
|
||||
@@ -496,6 +496,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