Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Detector-Competition-Fix - fixed the alchemy detector regex (#1821)
Ankush Goel79687683ffe0
diff --git a/pkg/detectors/alchemy/alchemy.go b/pkg/detectors/alchemy/alchemy.goindex be1e05826..2e655fbab 100644--- a/pkg/detectors/alchemy/alchemy.go+++ b/pkg/detectors/alchemy/alchemy.go@@ -23,13 +23,13 @@ var _ detectors.Detector = (*Scanner)(nil)var (defaultClient = common.SaneHttpClient()// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.- keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"alchemy"}) + `\b([a-zA-Z0-9]{23}_[a-zA-Z0-9]{8})\b`)+ keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"alchemy"}) + `\b([0-9a-zA-Z_]{32}|alcht_[0-9a-zA-Z]{30})\b`))// Keywords are used for efficiently pre-filtering chunks.// Use identifiers in the secret preferably, or the provider name.func (s Scanner) Keywords() []string {- return []string{"alchemy"}+ return []string{"alchemy","alcht_"}}// FromData will find and optionally verify Alchemy secrets in a given set of bytes.