Skip to content

Commit

Permalink
fix(black-duck): Gracefully handle duplicate URIs in references
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Jan 28, 2025
1 parent dd4b637 commit 0936bc2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 57 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/advisors/black-duck/src/main/kotlin/BlackDuck.kt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class BlackDuck(
}

internal fun VulnerabilityView.toOrtVulnerability(): Vulnerability {
val referenceUris = listOf(meta.href.uri(), *meta.links.map { it.href.uri() }.toTypedArray())
val referenceUris = setOf(meta.href.uri(), *meta.links.map { it.href.uri() }.toTypedArray())

val references = referenceUris.map { uri ->
val cvssVector = cvss3?.vector ?: cvss2?.vector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ references:
severity: "MEDIUM"
score: 4.8
vector: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C"
- url: "https://gitlab.com/libtiff/libtiff/-/issues/624"
scoring_system: "CVSS:3.1"
severity: "MEDIUM"
score: 4.8
vector: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C"
- url: "https://gitlab.com/libtiff/libtiff/-/tags/v4.7.0rc1"
scoring_system: "CVSS:3.1"
severity: "MEDIUM"
Expand Down

0 comments on commit 0936bc2

Please sign in to comment.