Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
[bug] - Fix unlocking an unlocked mutex (#1583)
ahrav5043fc87566b
diff --git a/pkg/engine/engine.go b/pkg/engine/engine.goindex b4fda8918..68c912d17 100644--- a/pkg/engine/engine.go+++ b/pkg/engine/engine.go@@ -176,10 +176,6 @@ func filterDetectors(filterFunc func(detectors.Detector) bool, input []detectorsreturn output}-func (e *Engine) setFoundResults() {- atomic.StoreUint32(&e.numFoundResults, 1)-}-// HasFoundResults returns true if any results are found.func (e *Engine) HasFoundResults() bool {return atomic.LoadUint32(&e.numFoundResults) > 0diff --git a/pkg/sources/github/repo.go b/pkg/sources/github/repo.goindex c0c7709d0..502a89797 100644--- a/pkg/sources/github/repo.go+++ b/pkg/sources/github/repo.go@@ -65,7 +65,7 @@ func (s *Source) cloneRepo(func (s *Source) getUserAndToken(ctx context.Context, repoURL string, installationClient *github.Client) error {// We never refresh user provided tokens, so if we already have them, we never need to try and fetch them again.s.userMu.Lock()- defer s.mu.Unlock()+ defer s.userMu.Unlock()if s.githubUser == "" || s.githubToken == "" {var err errors.githubUser, s.githubToken, err = s.userAndToken(ctx, installationClient)