Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
add extradata nil check and use make (#2129)
Zachary Riced55222238581
diff --git a/pkg/detectors/awssessionkeys/awssessionkey.go b/pkg/detectors/awssessionkeys/awssessionkey.goindex 3b53aa27f..aee31402b 100644--- a/pkg/detectors/awssessionkeys/awssessionkey.go+++ b/pkg/detectors/awssessionkeys/awssessionkey.go@@ -130,13 +130,15 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (resultRaw: []byte(resIDMatch),Redacted: resIDMatch,RawV2: []byte(resIDMatch + resSecretMatch + resSessionMatch),- ExtraData: map[string]string{},+ ExtraData: make(map[string]string),}if verify {verified, extraData, verificationErr := s.verifyMatch(ctx, resIDMatch, resSecretMatch, resSessionMatch, true)s1.Verified = verified- s1.ExtraData = extraData+ if extraData != nil {+ s1.ExtraData = extraData+ }s1.VerificationError = verificationErr}