Skip to content

Log audit errors when fail_upon_any_scanner_error is disabled#1352

Merged
Jordanh1996 merged 3 commits into
jfrog:v3_erfrom
Jordanh1996:fix/log-scanner-errors-when-partial-results
Jun 16, 2026
Merged

Log audit errors when fail_upon_any_scanner_error is disabled#1352
Jordanh1996 merged 3 commits into
jfrog:v3_erfrom
Jordanh1996:fix/log-scanner-errors-when-partial-results

Conversation

@Jordanh1996

@Jordanh1996 Jordanh1996 commented Jun 16, 2026

Copy link
Copy Markdown

Summary

When fail_upon_any_scanner_error is off, frogbot skips failing the command but previously logged only a generic warning, hiding the underlying audit error. Include the actual error in the warning so pipelines that allow partial results remain debuggable without toggling the config profile.

Test plan

  • Run scan-repository with a profile where fail_upon_any_scanner_error is false and audit fails; confirm the warn line includes the scanner error text and exit code stays 0.

Made with Cursor

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 <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Jordanh1996

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Co-authored-by: Cursor <cursoragent@cursor.com>

@attiasas attiasas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

Don't forget to fix:

return utils.CreateErrorIfFailUponScannerErrorEnabled(repository.GeneralConfig.FailUponAnyScannerError, fmt.Sprintf("failed to fix vulnerable dependencies: %s", err.Error()), err)

It will log the error twice now

The fix-vulnerabilities call site already embedded err in messageForLog;
CreateErrorIfFailUponScannerErrorEnabled now appends the error separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
@attiasas attiasas marked this pull request as ready for review June 16, 2026 10:37
@attiasas attiasas added bug Something isn't working safe to test Approve running integration tests on a pull request labels Jun 16, 2026
@attiasas attiasas self-requested a review June 16, 2026 10:38
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jun 16, 2026

@attiasas attiasas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jordanh1996 Jordanh1996 merged commit ae4d9b4 into jfrog:v3_er Jun 16, 2026
28 of 45 checks passed
@Jordanh1996 Jordanh1996 deleted the fix/log-scanner-errors-when-partial-results branch June 16, 2026 11:12
Jordanh1996 added a commit to Jordanh1996/frogbot that referenced this pull request Jun 17, 2026
When allow_partial_results is enabled, frogbot continued without failing
but only logged a generic warning, hiding the underlying audit error.
Include the actual error in the warning so pipelines remain debuggable.

Backport of jfrog#1352 for master.

Co-authored-by: Cursor <cursoragent@cursor.com>
Jordanh1996 added a commit that referenced this pull request Jun 17, 2026
When allow_partial_results is enabled, frogbot continued without failing
but only logged a generic warning, hiding the underlying audit error.
Include the actual error in the warning so pipelines remain debuggable.

Backport of #1352 for master.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants