Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Copy buffer bytes (#864)
Bill Richd7d614cc5f64
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex e41db64af..fd2afbc98 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -406,7 +406,7 @@ func (s *Git) gitChunk(diff gitparse.Diff, fileName, email, hash, when, urlMetadSourceID: s.sourceID,SourceType: s.sourceType,SourceMetadata: metadata,- Data: newChunkBuffer.Bytes(),+ Data: append([]byte{}, newChunkBuffer.Bytes()...),Verify: s.verify,}newChunkBuffer.Reset()@@ -440,7 +440,7 @@ func (s *Git) gitChunk(diff gitparse.Diff, fileName, email, hash, when, urlMetadSourceID: s.sourceID,SourceType: s.sourceType,SourceMetadata: metadata,- Data: newChunkBuffer.Bytes(),+ Data: append([]byte{}, newChunkBuffer.Bytes()...),Verify: s.verify,}}