Skip to content

Skip the primary identifier when sorting the identifiers

What does this MR do?

In Sort vulnerability links and identifiers (!116 - merged) we introduced sorting of the identifiers so we can provide deterministic report output. The problem is that identifiers are also used for vulnerability deduplication (see this thread). The primary_identifier is important for vulnerabilities deduplication as it's one of the keys used to compare reported vulnerabilities.

The primary_identifier is set to be the first identifier in the identifiers list, so by sorting the identifiers, we are breaking the ability of the analyzers to set the primary identifier based on their order. This leads to kind of duplicate findings (old findings are resolved and new, identical ones are reported).

To fix this issue, I changed the sorting snippet so it will just skip the first identifier, so that we keep the primary identifier while sorting the others, and provide deterministic report output.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Adam Cohen

Merge request reports

Loading