Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Fix git commit date string formatting (#1181)
Tim Waltera7abd6231d5c
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex 95b733493..ebb47863f 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -378,7 +378,7 @@ func (s *Git) ScanCommits(ctx context.Context, repo *git.Repository, path stringvar email, hash, when stringemail = commit.Authorhash = commit.Hash- when = commit.Date.String()+ when = commit.Date.Format("2006-01-02 15:04:05 -0700")// Handle binary files by reading the entire file rather than using the diff.if diff.IsBinary {@@ -520,7 +520,7 @@ func (s *Git) ScanStaged(ctx context.Context, repo *git.Repository, path string,var email, hash, when stringemail = commit.Authorhash = commit.Hash- when = commit.Date.String()+ when = commit.Date.Format("2006-01-02 15:04:05 -0700")// Handle binary files by reading the entire file rather than using the diff.if diff.IsBinary {