Skip to content

Commit

Permalink
use old version
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Sep 29, 2024
1 parent c893971 commit 06f2ea4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/detectors/privatekey/privatekey.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}

if verify {
var wg sync.WaitGroup

extraData := newExtraData()
verificationErrors := newVerificationErrors()

wg.Add(3)
var (
wg sync.WaitGroup
extraData = newExtraData()
verificationErrors = newVerificationErrors()
)

// Look up certificate information.
wg.Add(1)
go func() {
defer wg.Done()
data, err := lookupFingerprint(ctx, fingerprint, s.IncludeExpired)
Expand All @@ -104,6 +104,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}()

// Test SSH key against GitHub.
wg.Add(1)
go func() {
defer wg.Done()
user, err := verifyGitHubUser(ctx, parsedKey)
Expand All @@ -116,6 +117,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
}()

// Test SSH key against GitLab.
wg.Add(1)
go func() {
defer wg.Done()
user, err := verifyGitLabUser(ctx, parsedKey)
Expand Down

0 comments on commit 06f2ea4

Please sign in to comment.