From 13da76d357a7ee7dfd5367a80642f1fef5ea63fb Mon Sep 17 00:00:00 2001 From: ahrav Date: Mon, 4 Dec 2023 13:37:11 -0800 Subject: [PATCH] skip files we can't scan (#2170) --- pkg/sources/git/git.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go index 0e4f5e60..63f70b2e 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