fix(allowlist_db): Improve DynamoDB regex for allowlisting. (#1125)

Co-authored-by: sergargar <sergio@verica.io>
This commit is contained in:
Sergio Garcia
2022-05-03 11:31:12 +02:00
committed by GitHub
parent 04e5804665
commit ecbfbfb960

View File

@@ -16,7 +16,7 @@ allowlist(){
if grep -q -E "^s3://([^/]+)/(.*?([^/]+))$" <<< "${ALLOWLIST_FILE}"; then
allowlist_S3
# Check if the file is a DynamoDB ARN
elif grep -q -E "^arn:aws:dynamodb:\w+(?:-\w+)+:\d{12}:table\/[A-Za-z0-9]+$" <<< "${ALLOWLIST_FILE}"; then
elif grep -q -E "^arn:aws:dynamodb:\w+(?:-\w+)+:\d{12}:table\/[A-Za-z0-9-._]+$" <<< "${ALLOWLIST_FILE}"; then
allowlist_DynamoDB
else
# Check if the file is a DynamoDB ARN