diff --git a/detect_secrets/plugins/keyword.py b/detect_secrets/plugins/keyword.py index 4531f9473..c16474adb 100644 --- a/detect_secrets/plugins/keyword.py +++ b/detect_secrets/plugins/keyword.py @@ -146,7 +146,7 @@ DENYLIST_REGEX = r'|'.join(DENYLIST) # Non-greedy match OPTIONAL_WHITESPACE = r'\s*?' -OPTIONAL_NON_WHITESPACE = r'[^\s]*?' +OPTIONAL_NON_WHITESPACE = r'[^\s]{0,50}?' QUOTE = r'[\'"]' SECRET = r'[^\s]+' SQUARE_BRACKETS = r'(\[\])'