Skip to content

Commit

Permalink
Merge pull request #414 from pablosantiagolopez/fix/keyword-yaml
Browse files Browse the repository at this point in the history
Bugfix of Yaml exception with simple quotes
  • Loading branch information
domanchi authored Mar 2, 2021
2 parents 1c325e8 + 10e730a commit 37e9f30
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions detect_secrets/plugins/keyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
'secret',
'secrete',
)
'''
Deprecated false positives list. This will be migrated soon.
FALSE_POSITIVES = {
'""',
'""):',
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 37e9f30

Please sign in to comment.