From 85a2ae1f3a535791950e49fab51985f6572cb019 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Thu, 8 Feb 2024 17:14:53 -0500 Subject: [PATCH] suppress executable parsing issues Signed-off-by: Alex Goodman --- syft/file/cataloger/executable/cataloger.go | 2 +- syft/file/cataloger/executable/elf.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/syft/file/cataloger/executable/cataloger.go b/syft/file/cataloger/executable/cataloger.go index b6510e74c5d0..9434080bb1fd 100644 --- a/syft/file/cataloger/executable/cataloger.go +++ b/syft/file/cataloger/executable/cataloger.go @@ -149,7 +149,7 @@ func processExecutable(loc file.Location, reader unionreader.UnionReader) (*file securityFeatures, err := findSecurityFeatures(format, reader) if err != nil { - log.WithFields("error", err).Warnf("unable to determine security features for %q", loc.RealPath) + log.WithFields("error", err).Tracef("unable to determine security features for %q", loc.RealPath) return nil, nil } diff --git a/syft/file/cataloger/executable/elf.go b/syft/file/cataloger/executable/elf.go index 451aa14209db..c1218255e39b 100644 --- a/syft/file/cataloger/executable/elf.go +++ b/syft/file/cataloger/executable/elf.go @@ -45,7 +45,7 @@ func hasAnyDynamicSymbols(file *elf.File, symbolNames ...string) *bool { dynSyms, err := file.DynamicSymbols() if err != nil { // TODO: known-unknowns - log.WithFields("error", err).Warn("unable to read dynamic symbols from elf file") + log.WithFields("error", err).Trace("unable to read dynamic symbols from elf file") return nil } @@ -112,7 +112,7 @@ func hasElfDynFlag(f *elf.File, flag elf.DynFlag) bool { vals, err := f.DynValue(elf.DT_FLAGS) if err != nil { // TODO: known-unknowns - log.WithFields("error", err).Warn("unable to read DT_FLAGS from elf file") + log.WithFields("error", err).Trace("unable to read DT_FLAGS from elf file") return false } for _, val := range vals { @@ -127,7 +127,7 @@ func hasElfDynFlag1(f *elf.File, flag elf.DynFlag1) bool { vals, err := f.DynValue(elf.DT_FLAGS_1) if err != nil { // TODO: known-unknowns - log.WithFields("error", err).Warn("unable to read DT_FLAGS_1 from elf file") + log.WithFields("error", err).Trace("unable to read DT_FLAGS_1 from elf file") return false } for _, val := range vals {