Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
remove unnecessary Git cmd check (#2175)
ahrave6bc7f4451bf
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex fac910f6d..502f82b17 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -338,11 +338,6 @@ type cloneParams struct {// The core cloning logic is delegated to a nested function, which returns errors to the// outer function for centralized error handling and cleanup.func CloneRepo(ctx context.Context, userInfo *url.Userinfo, gitURL string, args ...string) (string, *git.Repository, error) {- var err error- if err = GitCmdCheck(); err != nil {- return "", nil, err- }-clonePath, err := cleantemp.MkdirTemp()if err != nil {return "", nil, err@@ -460,10 +455,6 @@ func (s *Git) CommitsScanned() uint64 {const gitDirName = ".git"func (s *Git) ScanCommits(ctx context.Context, repo *git.Repository, path string, scanOptions *ScanOptions, reporter sources.ChunkReporter) error {- if err := GitCmdCheck(); err != nil {- return err- }-commitChan, err := gitparse.NewParser().RepoPath(ctx, path, scanOptions.HeadHash, scanOptions.BaseHash == "", scanOptions.ExcludeGlobs, scanOptions.Bare)if err != nil {return err