Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
added email and location in metadata. (#2850)
Abdul Basit7025b0aa3515
diff --git a/pkg/detectors/github/v1/github_old.go b/pkg/detectors/github/v1/github_old.goindex 3ade673cf..334031187 100644--- a/pkg/detectors/github/v1/github_old.go+++ b/pkg/detectors/github/v1/github_old.go@@ -40,6 +40,8 @@ type UserRes struct {Name string `json:"name"`Company string `json:"company"`UserURL string `json:"html_url"`+ Email string `json:"email"`+ Location string `json:"location"`// Included in GitHub Enterprise Server.LdapDN string `json:"ldap_dn"`}@@ -157,6 +159,14 @@ func SetUserResponse(userResponse *UserRes, s1 *detectors.Result) {if userResponse.LdapDN != "" {s1.ExtraData["ldap_dn"] = userResponse.LdapDN}++ // email & location if user has made them public+ if userResponse.Email != "" {+ s1.ExtraData["email"] = userResponse.Email+ }+ if userResponse.Location != "" {+ s1.ExtraData["location"] = userResponse.Location+ }}func SetHeaderInfo(headers *HeaderInfo, s1 *detectors.Result) {