Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't return after encountering a report with lower than minimum risk #461

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

egibs
Copy link
Member

@egibs egibs commented Sep 16, 2024

Fixes: #449

I believe this is all that's needed to address the empty results bug in the aforementioned Issue. With the current behavior, we'd return early rather than continuing to iterate through the file reports as soon as a file report with a lower risk was encountered.

@tstromberg -- feel free to validate this with the samples you noted in #449.

Prior to the concurrency changes, processFile used to return nil, nil for this comparison and the value of processFile was then ignored via a continue if it was nil: https://github.com/chainguard-dev/bincapz/blob/cb97c603c01a176b893b9616ee62d7d938bad759/pkg/action/scan.go#L229-L235

@egibs egibs merged commit 1e215ed into chainguard-dev:main Sep 16, 2024
6 checks passed
@egibs egibs deleted the fix-empty-results branch September 16, 2024 14:28
egibs added a commit to egibs/malcontent that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

analyze subcommand misses files (recursion bug? parallelism bug?)
2 participants