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.61k stars 553 forks source link

Handle breaking change in Trivy server API #3738

Closed nscuro closed 4 months ago

nscuro commented 4 months 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

Additional Details

N/A

Checklist

codacy-production[bot] commented 4 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.01% (target: -1.00%) :x: 57.14% (target: 70.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (e87c5cc93a2683912583820ee1f52734d3f4cb6b) | 21648 | 16402 | 75.77% | | | Head commit (08dfb0a3a57d21b7b65478834b1cab2b7d4609dd) | 21640 (-8) | 16399 (-3) | 75.78% (**+0.01%**) | **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 (#3738) | 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