Skip to content

Commit

Permalink
Fix Artifactory regex to no longer match assignment character (Yelp#197
Browse files Browse the repository at this point in the history
)

* Fix Artifactory regex to no longer match assignment character

* Fix 'look-behind requires fixed-width pattern'
  • Loading branch information
justineyster committed Jan 8, 2020
1 parent 184bfb4 commit d62e07d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions detect_secrets/plugins/artifactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class ArtifactoryDetector(RegexBasedDetector):
secret_type = 'Artifactory Credentials'

denylist = [
# Artifactory tokens begin with AKC
re.compile(r'(?:\s|=|:|"|^)AKC[a-zA-Z0-9]{10,}'), # API token
# Artifactory encrypted passwords begin with AP[A-Z]
re.compile(r'(?:\s|=|:|"|^)AP[\dABCDEF][a-zA-Z0-9]{8,}'), # Password
# artifactory tokens begin with AKC
re.compile(r'(?:(?<==|:|")|(?<=\s)|(?<=^))AKC[a-zA-Z0-9]{10,}'), # api token
# artifactory encrypted passwords begin with AP[A-Z]
re.compile(r'(?:(?<==|:|")|(?<=\s)|(?<=^))AP[\dABCDEF][a-zA-Z0-9]{8,}'), # password
]

artifactory_url = 'na.artifactory.swg-devops.com/artifactory'
Expand Down

0 comments on commit d62e07d

Please sign in to comment.