Skip to content

Commit 16cb918

Browse files
Avoid False Positives Plugin: ArtifactoryDetector (Yelp#499)
* avoid_false_positives * Add the option to end regex and or have whitespace and or have a quotation ending Co-authored-by: John-Paul Dakran <dakranj@yelp.com>
1 parent b32a53f commit 16cb918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

detect_secrets/plugins/artifactory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ArtifactoryDetector(RegexBasedDetector):
99

1010
denylist = [
1111
# Artifactory tokens begin with AKC
12-
re.compile(r'(?:\s|=|:|"|^)AKC[a-zA-Z0-9]{10,}'), # API token
12+
re.compile(r'(?:\s|=|:|"|^)AKC[a-zA-Z0-9]{10,}(?:\s|"|$)'), # API token
1313
# Artifactory encrypted passwords begin with AP[A-Z]
14-
re.compile(r'(?:\s|=|:|"|^)AP[\dABCDEF][a-zA-Z0-9]{8,}'), # Password
14+
re.compile(r'(?:\s|=|:|"|^)AP[\dABCDEF][a-zA-Z0-9]{8,}(?:\s|"|$)'), # Password
1515
]

0 commit comments

Comments
 (0)