fix(): Fix CloudTrail trail S3 logging public bucket false positive result when trail bucket doesn't exist (#1505)

Co-authored-by: Francesco Badraun <francesco.badraun@zxsecurity.co.nz>
This commit is contained in:
Acknosyn
2022-12-15 04:32:38 +13:00
committed by GitHub
parent a769bb86d3
commit c74b4adf27
+5
View File
@@ -57,6 +57,11 @@ check23(){
textInfo "$regx: Trail ${TRAIL_NAME} with home region ${TRAIL_HOME_REGION} Access Denied getting bucket location for bucket $TRAIL_BUCKET" "$regx" "$TRAIL_NAME"
continue
fi
if [[ $(echo "$BUCKET_LOCATION" | grep NoSuchBucket) ]]
then
textInfo "$regx: Trail ${TRAIL_NAME} with home region ${TRAIL_HOME_REGION} S3 logging bucket $TRAIL_BUCKET does not exist" "$regx" "$TRAIL_NAME"
continue
fi
if [[ $BUCKET_LOCATION == "None" ]]; then
BUCKET_LOCATION="us-east-1"
fi