Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Renamed AnypointOAuth2 detector's AnalysisInfo keys to make it consistent with its Analyzer (#4906)
Muneeb Ullah Khan5474feb15b33
diff --git a/pkg/detectors/anypointoauth2/anypointoauth2.go b/pkg/detectors/anypointoauth2/anypointoauth2.goindex a1f16060e..552748164 100644--- a/pkg/detectors/anypointoauth2/anypointoauth2.go+++ b/pkg/detectors/anypointoauth2/anypointoauth2.go@@ -79,8 +79,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (results1.SetVerificationError(verificationErr)if isVerified {s1.AnalysisInfo = map[string]string{- "id": id,- "secret": secret,+ "client_id": id,+ "client_secret": secret,}}}diff --git a/pkg/detectors/coinbase/coinbase.go b/pkg/detectors/coinbase/coinbase.goindex 5ab23eca7..fc368d5dc 100644--- a/pkg/detectors/coinbase/coinbase.go+++ b/pkg/detectors/coinbase/coinbase.go@@ -68,7 +68,7 @@ func isValidECPrivateKey(pemKey []byte) bool {// Check the key type_, ok := key.Public().(*ecdsa.PublicKey)- return ok+ return ok}func (s Scanner) getClient() *http.Client {@@ -112,6 +112,12 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultisVerified, verificationErr := s.verifyMatch(ctx, client, resKeyName, resPrivateKey)s1.Verified = isVerifieds1.SetVerificationError(verificationErr, resPrivateKey)+ if isVerified {+ s1.AnalysisInfo = map[string]string{+ "key_name": resKeyName,+ "key": resPrivateKey,+ }+ }}results = append(results, s1)