Skip to content

Add nil guard when audit fails when fixing vuln#1349

Open
attiasas wants to merge 1 commit into
jfrog:v3_erfrom
attiasas:fix_panic_create_vuln_map_on_audit_error
Open

Add nil guard when audit fails when fixing vuln#1349
attiasas wants to merge 1 commit into
jfrog:v3_erfrom
attiasas:fix_panic_create_vuln_map_on_audit_error

Conversation

@attiasas

Copy link
Copy Markdown
Contributor
  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

Fix panic when Audit failed and configure to fail on any error

when FailUponAnyScannerError=true in the scan and audit fail:

2026-06-11T10:15:13.7070841Z 10:15:13 [Warn] An error occurred during Audit execution for 'main' branch. Fixes will be skipped for this branch

we get:

2026-06-11T10:15:13.7866231Z panic: runtime error: invalid memory address or nil pointer dereference
2026-06-11T10:15:13.7866968Z [signal 0xc0000005 code=0x0 addr=0x60 pc=0x7ff606316fca]
2026-06-11T10:15:13.7867209Z 
2026-06-11T10:15:13.7867916Z goroutine 1 [running]:
2026-06-11T10:15:13.7868821Z github.com/jfrog/jfrog-cli-security/utils/results.(*SecurityCommandResults).IncludesVulnerabilities(...)
2026-06-11T10:15:13.7869524Z         /Users/erant/go/pkg/mod/github.com/jfrog/jfrog-cli-security@v1.29.3/utils/results/results.go:523
2026-06-11T10:15:13.7870135Z github.com/jfrog/frogbot/v3/scanrepository.(*ScanRepositoryCmd).createVulnerabilitiesMap(0xda85bff8240, 0x0, 0x0)
2026-06-11T10:15:13.7870778Z         /Users/erant/Desktop/jfrog/frogbot/scanrepository/scanrepository.go:502 +0x4a
2026-06-11T10:15:13.7871395Z github.com/jfrog/frogbot/v3/scanrepository.(*ScanRepositoryCmd).scanAndFixBranch(0xda85bff8240, 0xda85c2a1508)
2026-06-11T10:15:13.7872062Z         /Users/erant/Desktop/jfrog/frogbot/scanrepository/scanrepository.go:165 +0x1aa
2026-06-11T10:15:13.7872739Z github.com/jfrog/frogbot/v3/scanrepository.(*ScanRepositoryCmd).prepareEnvAndScanBranch(0xda85bff8240, 0xda85c2a1508)
2026-06-11T10:15:13.7873333Z         /Users/erant/Desktop/jfrog/frogbot/scanrepository/scanrepository.go:112 +0x1e9

@attiasas attiasas added bug Something isn't working safe to test Approve running integration tests on a pull request labels Jun 11, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jun 11, 2026
@attiasas attiasas requested a review from a team June 11, 2026 11:56
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.

1 participant