mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Skip all binaries (#2256)
* Skip all binaries * Remove noop * Drop handlerOpts
This commit is contained in:
parent
7d93adc1d0
commit
ceff786db4
1 changed files with 3 additions and 7 deletions
|
@ -1009,13 +1009,9 @@ func (s *Git) handleBinary(ctx context.Context, gitDir string, reporter sources.
|
|||
return nil
|
||||
}
|
||||
|
||||
var handlerOpts []handlers.Option
|
||||
if s.skipBinaries {
|
||||
handlerOpts = append(handlerOpts, handlers.WithSkipBinaries(true))
|
||||
if common.IsBinary(path) {
|
||||
fileCtx.Logger().V(5).Info("skipping binary file")
|
||||
return nil
|
||||
}
|
||||
fileCtx.Logger().V(5).Info("skipping binary file", "path", path)
|
||||
return nil
|
||||
}
|
||||
|
||||
if s.skipArchives {
|
||||
|
@ -1057,7 +1053,7 @@ func (s *Git) handleBinary(ctx context.Context, gitDir string, reporter sources.
|
|||
}
|
||||
defer reader.Close()
|
||||
|
||||
if handlers.HandleFile(fileCtx, reader, chunkSkel, reporter, handlerOpts...) {
|
||||
if handlers.HandleFile(fileCtx, reader, chunkSkel, reporter) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue