diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py index 19840f54e..dbf0e0e72 100644 --- a/detect_secrets/plugins/keyword.py +++ b/detect_secrets/plugins/keyword.py @@ -50,6 +50,8 @@ 'secret', 'secrete', ) +''' +Deprecated false positives list. This will be migrated soon. FALSE_POSITIVES = { '""', '""):', @@ -142,14 +144,15 @@ '{', '{{', } +''' # Includes ], ', " as closing CLOSING = r'[]\'"]{0,2}' DENYLIST_REGEX = r'|'.join(DENYLIST) # Non-greedy match -OPTIONAL_WHITESPACE = r'\s*?' +OPTIONAL_WHITESPACE = r'\s*' OPTIONAL_NON_WHITESPACE = r'[^\s]{0,50}?' QUOTE = r'[\'"]' -SECRET = r'[^\s]+' +SECRET = r'[^\r\n]+' SQUARE_BRACKETS = r'(\[\])' FOLLOWED_BY_COLON_EQUAL_SIGNS_REGEX = re.compile(