Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Do not continue if semaphore can't be acquired (#49)
Bill Richc742f6a816aa
diff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.goindex 45010fd74..1cc18b48a 100644--- a/pkg/sources/github/github.go+++ b/pkg/sources/github/github.go@@ -293,7 +293,10 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk) errerrs := []error{}var errsMut sync.Mutexfor i, repoURL := range s.repos {- s.jobSem.Acquire(ctx, 1)+ if err := s.jobSem.Acquire(ctx, 1); err != nil {+ log.WithError(err).Debug("could not acquire semaphore")+ continue+ }wg.Add(1)go func(ctx context.Context, repoURL string, i int) {defer s.jobSem.Release(1)