From 7e3bbe3c025d1ffefe5ebb96474404507fac5458 Mon Sep 17 00:00:00 2001 From: Jordan Hury Date: Tue, 16 Jun 2026 12:20:51 +0300 Subject: [PATCH 1/3] Log underlying scanner errors when partial results are allowed. When fail_upon_any_scanner_error is disabled, frogbot continued without failing but only logged a generic warning, hiding the audit error that support needs to diagnose failures. Co-authored-by: Cursor --- utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index ec88f6262..10d2fe0c7 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -466,7 +466,7 @@ func isUrlAccessible(url string) bool { // If not - instead of returning an error we log the error and continue as if we didn't have an error func CreateErrorIfFailUponScannerErrorEnabled(fail bool, messageForLog string, err error) error { if !fail { - log.Warn(messageForLog) + log.Warn(fmt.Sprintf("%s: %s", messageForLog, err)) return nil } return err From 57805e3fe2f24b3be887f6d4c002b4cf89518de2 Mon Sep 17 00:00:00 2001 From: Jordan Hury Date: Tue, 16 Jun 2026 13:21:56 +0300 Subject: [PATCH 2/3] Use %v when logging scanner errors in partial-results path. Co-authored-by: Cursor --- utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 10d2fe0c7..10414147d 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -466,7 +466,7 @@ func isUrlAccessible(url string) bool { // If not - instead of returning an error we log the error and continue as if we didn't have an error func CreateErrorIfFailUponScannerErrorEnabled(fail bool, messageForLog string, err error) error { if !fail { - log.Warn(fmt.Sprintf("%s: %s", messageForLog, err)) + log.Warn(fmt.Sprintf("%s: %v", messageForLog, err)) return nil } return err From 1e9e12f2a694316c601be746f1b0eaf8703de68b Mon Sep 17 00:00:00 2001 From: Jordan Hury Date: Tue, 16 Jun 2026 13:33:00 +0300 Subject: [PATCH 3/3] Avoid logging fix errors twice in partial-results path. The fix-vulnerabilities call site already embedded err in messageForLog; CreateErrorIfFailUponScannerErrorEnabled now appends the error separately. Co-authored-by: Cursor --- scanrepository/scanrepository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanrepository/scanrepository.go b/scanrepository/scanrepository.go index 2f2daee07..be9888893 100644 --- a/scanrepository/scanrepository.go +++ b/scanrepository/scanrepository.go @@ -248,7 +248,7 @@ func (sr *ScanRepositoryCmd) fixVulnerablePackages(repository *utils.Repository, } } if err != nil { - return utils.CreateErrorIfFailUponScannerErrorEnabled(repository.GeneralConfig.FailUponAnyScannerError, fmt.Sprintf("failed to fix vulnerable dependencies: %s", err.Error()), err) + return utils.CreateErrorIfFailUponScannerErrorEnabled(repository.GeneralConfig.FailUponAnyScannerError, "failed to fix vulnerable dependencies", err) } return nil }