From 748c19f6e3adbc0664cb4b145b3302702bfb5ec7 Mon Sep 17 00:00:00 2001 From: pazbechor Date: Mon, 25 Dec 2023 13:48:53 +0200 Subject: [PATCH] Fix bug --- detect_secrets/plugins/keyword.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py index 0ca38eed..642cf0e6 100644 --- a/detect_secrets/plugins/keyword.py +++ b/detect_secrets/plugins/keyword.py @@ -97,7 +97,7 @@ # [^\v,\'"`] -> this section match with the last secret character that can be everything except # line breaks, comma, backticks or quotes. This allows to reduce the false # positives number and to prevent errors in the code snippet highlighting. -SECRET = r'(?=[^\v\'\"]*)(?=\w+)[^\v\'\"]*[^\v,\'\"`]' +SECRET = r'(?=[^\v\'\"]*)(?=[a-zA-Z0-9_!@#$%^&])[^\v\'\"]*[^\v,\'\"`]' SQUARE_BRACKETS = r'(\[[0-9]*\])' FOLLOWED_BY_COLON_EQUAL_SIGNS_REGEX = re.compile(