From a523409b3e58091a9517c9b892be70f8577cad86 Mon Sep 17 00:00:00 2001 From: Ahrav Dutta Date: Sun, 29 Sep 2024 11:14:34 -0700 Subject: [PATCH] revert --- pkg/detectors/privatekey/privatekey.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/detectors/privatekey/privatekey.go b/pkg/detectors/privatekey/privatekey.go index 32bd3f9fd8f7..582b82d9447d 100644 --- a/pkg/detectors/privatekey/privatekey.go +++ b/pkg/detectors/privatekey/privatekey.go @@ -96,14 +96,16 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result go func() { defer wg.Done() data, err := lookupFingerprint(ctx, fingerprint, s.IncludeExpired) - if err == nil && data != nil { - extraData.Add("certificate_urls", strings.Join(data.CertificateURLs, ", ")) - } else if err != nil { + if err == nil { + if data != nil { + extraData.Add("certificate_urls", strings.Join(data.CertificateURLs, ", ")) + } + } else { verificationErrors.Add(err) } }() - // Test SSH key against GitHub. + // Test SSH key against github.com. wg.Add(1) go func() { defer wg.Done() @@ -116,7 +118,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result } }() - // Test SSH key against GitLab. + // Test SSH key against gitlab.com. wg.Add(1) go func() { defer wg.Done()