Skip to content

Find, verify, and analyze leaked credentials

skip files we can't scan (#2170)

ahrav13da76d357a7
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go
index 0e4f5e609..63f70b2e6 100644
--- a/pkg/sources/git/git.go
+++ b/pkg/sources/git/git.go
@@ -976,6 +976,11 @@ func handleBinary(ctx context.Context, repo *git.Repository, reporter sources.Ch
return err
}
+ if common.SkipFile(file.Name) {
+ ctx.Logger().V(5).Info("skipping binary file", "path", path, "file_name", file.Name)
+ return nil
+ }
+
fileReader, err := file.Reader()
if err != nil {
return err