DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.45k stars 532 forks source link

Backport: Handle breaking change in Trivy server API #3785

Closed nscuro closed 1 month ago

nscuro commented 1 month ago

Description

Handles breaking change in Trivy server API.

Application#libraries has been renamed to Application#packages in Trivy 0.51.2. The Library type no longer exists.

It's not possible to tell the Trivy version based on its API. To work around this, we now send both the packages and libraries fields with redundant information.

Fields that the API does not expect are silently ignored.

Addressed Issue

Fixes #3737 Backports #3738

Additional Details

N/A

Checklist

codacy-production[bot] commented 1 month ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for a0c5045bb700aa1e03bbc33db286717f367c7727[^1] :x: 57.14% (target: 70.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (a0c5045bb700aa1e03bbc33db286717f367c7727) | Report Missing | Report Missing | Report Missing | | | Head commit (4902a341d8a5b3661a8127160af15ae859c32c9f) | 22075 | 16773 | 75.98% | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#3785) | 14 | 8 | **57.14%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more [^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.