mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
Fix AccessDenied issue (#1025)
This commit is contained in:
committed by
GitHub
parent
1d409d04f2
commit
3ecb5dbce6
@@ -40,7 +40,11 @@ extra760(){
|
|||||||
for lambdafunction in $LIST_OF_FUNCTIONS;do
|
for lambdafunction in $LIST_OF_FUNCTIONS;do
|
||||||
LAMBDA_FUNCTION_FOLDER="$SECRETS_TEMP_FOLDER/extra760-$lambdafunction-$regx"
|
LAMBDA_FUNCTION_FOLDER="$SECRETS_TEMP_FOLDER/extra760-$lambdafunction-$regx"
|
||||||
LAMBDA_FUNCTION_FILE="$lambdafunction-code.zip"
|
LAMBDA_FUNCTION_FILE="$lambdafunction-code.zip"
|
||||||
LAMBDA_CODE_LOCATION=$($AWSCLI lambda get-function $PROFILE_OPT --region $regx --function-name $lambdafunction --query Code.Location --output text)
|
LAMBDA_CODE_LOCATION=$($AWSCLI lambda get-function $PROFILE_OPT --region $regx --function-name $lambdafunction --query Code.Location --output text 2>&1)
|
||||||
|
if [[ $(echo "$LAMBDA_CODE_LOCATION" | grep AccessDenied) ]]; then
|
||||||
|
textInfo "$regx: Access Denied trying to get Lambda functions" "$regx" "$lambdafunction"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
mkdir $LAMBDA_FUNCTION_FOLDER
|
mkdir $LAMBDA_FUNCTION_FOLDER
|
||||||
# DOWNLOAD the code in a zip file
|
# DOWNLOAD the code in a zip file
|
||||||
curl -s $LAMBDA_CODE_LOCATION -o $LAMBDA_FUNCTION_FOLDER/$LAMBDA_FUNCTION_FILE
|
curl -s $LAMBDA_CODE_LOCATION -o $LAMBDA_FUNCTION_FOLDER/$LAMBDA_FUNCTION_FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user