Skip to content

Commit a285a86

Browse files
committed
fix: add support for artifactory identity tokens
Signed-off-by: Daniel Pittner <[email protected]>
1 parent 63375ed commit a285a86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

detect_secrets/plugins/artifactory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class ArtifactoryDetector(RegexBasedDetector):
1515
re.compile(r'(?:(?<==|:|")|(?<=\s)|(?<=^))AKC[a-zA-Z0-9]{10,}'), # api token
1616
# artifactory encrypted passwords begin with AP[A-Z]
1717
re.compile(r'(?:(?<==|:|")|(?<=\s)|(?<=^))AP[\dABCDEF][a-zA-Z0-9]{8,}'), # password
18+
# artifactory identity tokens are different (base64 encoded reftkn:) and 64 chars
19+
re.compile(r'(?:(?<==|:|")|(?<=\s)|(?<=^))cmVmdGtuOg{54,54}'), #identity token
1820
]
1921

2022
artifactory_url = 'na.artifactory.swg-devops.com/artifactory'

0 commit comments

Comments
 (0)