Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Fix incorrect commit skipped error
Dustin Decker26184dc2cd84
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex 8365b27c9..1fe946328 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -4,7 +4,6 @@ import ("bytes""context""fmt"- "github.com/trufflesecurity/trufflehog/pkg/common""io""io/ioutil""net/url"@@ -27,9 +26,9 @@ import ("google.golang.org/protobuf/proto""google.golang.org/protobuf/types/known/anypb"+ "github.com/trufflesecurity/trufflehog/pkg/common""github.com/trufflesecurity/trufflehog/pkg/pb/source_metadatapb""github.com/trufflesecurity/trufflehog/pkg/pb/sourcespb"-"github.com/trufflesecurity/trufflehog/pkg/sanitizer""github.com/trufflesecurity/trufflehog/pkg/sources")@@ -298,10 +297,6 @@ func (s *Git) ScanRepo(ctx context.Context, repo *git.Repository, scanOptions *Sif err != nil {switch e := err.Error(); {case strings.Contains(e, "operation canceled"):- log.WithError(err).- WithField("repo", safeRepo).- WithField("commit", commit.Hash.String()).- Warn("commit took too long to compute")return nilcase strings.Contains(e, "packfile not found"):log.WithError(err).WithField("repo", safeRepo).Warn("invalid commit reference while scanning commit")