From ecbfbfb960439f5747e02c17a900a271da3b60f7 Mon Sep 17 00:00:00 2001 From: Sergio Garcia <38561120+sergargar@users.noreply.github.com> Date: Tue, 3 May 2022 11:31:12 +0200 Subject: [PATCH] fix(allowlist_db): Improve DynamoDB regex for allowlisting. (#1125) Co-authored-by: sergargar --- include/allowlist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/allowlist b/include/allowlist index fbeaa0ad..5f19e9af 100644 --- a/include/allowlist +++ b/include/allowlist @@ -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