Skip to content

Backport: Fix OSV ubuntu advisory containing severity without type#5168

Merged
nscuro merged 1 commit intoDependencyTrack:4.13.xfrom
nscuro:backport-pr-5106
Aug 3, 2025
Merged

Backport: Fix OSV ubuntu advisory containing severity without type#5168
nscuro merged 1 commit intoDependencyTrack:4.13.xfrom
nscuro:backport-pr-5106

Conversation

@nscuro
Copy link
Copy Markdown
Member

@nscuro nscuro commented Aug 3, 2025

Description

Fixes OSV ubuntu advisory containing severity without type.

Addressed Issue

Fixes #5105
Backports #5106

Additional Details

N/A

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@nscuro nscuro added this to the 4.13.3 milestone Aug 3, 2025
@nscuro nscuro added the defect Something isn't working label Aug 3, 2025
@owasp-dt-bot
Copy link
Copy Markdown

owasp-dt-bot commented Aug 3, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

The missing type caused a NullPointerException when the OsvAdvisoryParser.parse()
method tried to access the type without checking for null. My fix will check if
type is null and continue the loop without further processing the item.
I have also added a test for this case and fixed testGetEcosystems() in the
OsvDownloadTaskTest that incorrectly checked for null instead of an empty list
after attempting to fetch the ecosystem list.

Signed-off-by: jonbally <[email protected]>
Signed-off-by: nscuro <[email protected]>
@nscuro nscuro force-pushed the backport-pr-5106 branch from 0a582be to 882d1df Compare August 3, 2025 15:44
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for d66948d1 100.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d66948d) Report Missing Report Missing Report Missing
Head commit (882d1df) 24030 19373 80.62%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5168) 1 1 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@nscuro nscuro merged commit 3ef7e61 into DependencyTrack:4.13.x Aug 3, 2025
7 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

defect Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants