diff --git a/checks/check_extra7156 b/checks/check_extra7156 index 7c8de499b1..5787f6eb9d 100644 --- a/checks/check_extra7156 +++ b/checks/check_extra7156 @@ -29,7 +29,7 @@ extra7156(){ # "Check if API Gateway V2 has Access Logging enabled " for regx in $REGIONS; do LIST_OF_API_GW=$($AWSCLI apigatewayv2 get-apis $PROFILE_OPT --region $regx --query Items[*].ApiId --output text 2>&1) - if [[ $(echo "$LIST_OF_API_GW" | grep -E 'AccessDenied|UnauthorizedOperation|AuthorizationError') ]]; then + if [[ $(echo "$LIST_OF_API_GW" | grep -E 'AccessDenied|UnauthorizedOperation|AuthorizationError|BadRequestException') ]]; then textInfo "$regx: Access Denied trying to get APIs" "$regx" continue fi @@ -54,4 +54,4 @@ extra7156(){ textInfo "$regx: No API Gateway found" "$regx" fi done -} \ No newline at end of file +} diff --git a/checks/check_extra7157 b/checks/check_extra7157 index 755435c5f1..e73f83059f 100644 --- a/checks/check_extra7157 +++ b/checks/check_extra7157 @@ -26,7 +26,7 @@ CHECK_CAF_EPIC_extra7157='IAM' extra7157(){ for regx in $REGIONS; do LIST_OF_API_GW=$($AWSCLI apigatewayv2 get-apis $PROFILE_OPT --region $regx --query "Items[*].ApiId" --output text 2>&1) - if [[ $(echo "$LIST_OF_API_GW" | grep -E 'AccessDenied|UnauthorizedOperation|AuthorizationError') ]]; then + if [[ $(echo "$LIST_OF_API_GW" | grep -E 'AccessDenied|UnauthorizedOperation|AuthorizationError|BadRequestException') ]]; then textInfo "$regx: Access Denied trying to get APIs" "$regx" continue fi