mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-17 17:04:17 +00:00
better check denied
This commit is contained in:
1 parent
de8336092b
commit
c8622bc347
1 file changed
+2
-3
@@ -54,9 +54,8 @@ extra73(){
|
||||
BUCKET_LOCATION="eu-west-1"
|
||||
fi
|
||||
# Check Explicit Deny and Avoid Error
|
||||
CHEK_FOR_EXPLICIT_DENY=$($AWSCLI s3api get-bucket-acl $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket 2> /dev/null)
|
||||
CHEK_FOR_EXPLICIT_DENY="$?"
|
||||
if [[ $CHEK_FOR_EXPLICIT_DENY -eq 255 ]]; then
|
||||
CHEK_FOR_EXPLICIT_DENY=$($AWSCLI s3api get-bucket-acl $PROFILE_OPT --region $BUCKET_LOCATION --bucket $bucket --output text 2>&1)
|
||||
if [[ $(echo "$CHEK_FOR_EXPLICIT_DENY" | grep AccessDenied) ]] ; then
|
||||
textPass "$BUCKET_LOCATION: bucket have an explicit Deny. Not possible to get ACL." "$BUCKET_LOCATION"
|
||||
else
|
||||
# check if AllUsers is in the ACL as Grantee
|
||||
|
||||
Reference in new issue
Block a user