Skip to content

fix: skip vulnerabilities with empty affected ranges in combine-to-osv#5039

Merged
jess-lowe merged 2 commits intogoogle:masterfrom
jess-lowe:fix-skip-empty-ranges-combine-to-osv-13897445964005397767
Mar 13, 2026
Merged

fix: skip vulnerabilities with empty affected ranges in combine-to-osv#5039
jess-lowe merged 2 commits intogoogle:masterfrom
jess-lowe:fix-skip-empty-ranges-combine-to-osv-13897445964005397767

Conversation

@jess-lowe
Copy link
Copy Markdown
Contributor

@jess-lowe jess-lowe commented Mar 13, 2026

Added a helper hasRanges to ensure that vulnerabilities missing ranges in their affected blocks are skipped and not uploaded unless they are explicitly included in the mandatoryCVEIDs slice. Also updated main_test.go to assert this new logic correctly.

deals with https://osv.dev/vulnerability/CVE-2024-2002 having no ranges

Added a helper `hasRanges` to ensure that vulnerabilities missing ranges
in their `affected` blocks are skipped and not uploaded unless they are explicitly
included in the `mandatoryCVEIDs` slice. Also updated `main_test.go` to assert
this new logic correctly.

Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@jess-lowe jess-lowe requested review from another-rex, cuixq and michaelkedar and removed request for another-rex March 13, 2026 03:19
Added a blank line before the `return false` statement in the `hasRanges` function
to satisfy the `nlreturn` golangci-lint check.

Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
@jess-lowe jess-lowe merged commit d5c1d79 into google:master Mar 13, 2026
21 checks passed
tymzd pushed a commit to tymzd/osv.dev that referenced this pull request Apr 13, 2026
google#5039)

Added a helper `hasRanges` to ensure that vulnerabilities missing ranges
in their `affected` blocks are skipped and not uploaded unless they are
explicitly included in the `mandatoryCVEIDs` slice. Also updated
`main_test.go` to assert this new logic correctly.

deals with https://osv.dev/vulnerability/CVE-2024-2002 having no ranges

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
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.

2 participants