From a285a86a928a9ffd45638034f4c5be9f108782ff Mon Sep 17 00:00:00 2001 From: Daniel Pittner Date: Thu, 5 Jan 2023 09:15:44 +0100 Subject: [PATCH] fix: add support for artifactory identity tokens Signed-off-by: Daniel Pittner --- detect_secrets/plugins/artifactory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/detect_secrets/plugins/artifactory.py b/detect_secrets/plugins/artifactory.py index 8931f1ef5..55d9fe75b 100644 --- a/detect_secrets/plugins/artifactory.py +++ b/detect_secrets/plugins/artifactory.py @@ -15,6 +15,8 @@ class ArtifactoryDetector(RegexBasedDetector): 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 identity tokens are different (base64 encoded reftkn:) and 64 chars + re.compile(r'(?:(?<==|:|")|(?<=\s)|(?<=^))cmVmdGtuOg{54,54}'), #identity token ] artifactory_url = 'na.artifactory.swg-devops.com/artifactory'