From 37927b8b23cac234289a73aa3e886675d463e477 Mon Sep 17 00:00:00 2001 From: Dan Luhring Date: Tue, 3 May 2022 09:38:14 -0400 Subject: [PATCH] reduce logging severity for non-Go binaries (#983) --- syft/pkg/cataloger/golang/scan_bin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/syft/pkg/cataloger/golang/scan_bin.go b/syft/pkg/cataloger/golang/scan_bin.go index 5663492d6..5d84011a8 100644 --- a/syft/pkg/cataloger/golang/scan_bin.go +++ b/syft/pkg/cataloger/golang/scan_bin.go @@ -41,7 +41,11 @@ func scanFile(reader unionReader, filename string) ([]*debug.BuildInfo, []string } // in this case we could not read the or parse the file, but not explicitly because it is not a // go-compiled binary (though it still might be). - log.Warnf("golang cataloger: failed to read buildinfo (file=%q): %v", filename, err) + // TODO: We should change this back to "warn" eventually. + // But right now it's catching too many cases where the reader IS NOT a Go binary at all. + // It'd be great to see how we can get those cases to be detected and handled above before we get to + // this point in execution. + log.Infof("golang cataloger: unable to read buildinfo (file=%q): %v", filename, err) return nil, nil }