Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Close files to clean up tmp files (#940)
Bill Richf1ec9e74eb1b
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex 522405b28..5098022e8 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -827,6 +827,7 @@ func handleBinary(ctx context.Context, repo *git.Repository, chunksChan chan *soif err != nil {return err}+ defer reader.Close()if handlers.HandleFile(ctx, reader, chunkSkel, chunksChan) {return nildiff --git a/pkg/sources/s3/s3.go b/pkg/sources/s3/s3.goindex 07b88e2ae..cce0e0748 100644--- a/pkg/sources/s3/s3.go+++ b/pkg/sources/s3/s3.go@@ -278,6 +278,7 @@ func (s *Source) pageChunker(ctx context.Context, client *s3.S3, chunksChan chans.log.Error(err, "Could not create reader.")return}+ defer reader.Close()email := "Unknown"if obj.Owner != nil {