Skip to content

Commit f5de453

Browse files
committed
feat(rules): Add CVSS 3.1/4 to high vulnerability
Prior to this change a package with a high severity vulnerability encoded in CVSS 3.1 or 4.0 would not trigger a policy rule violation. Signed-off-by: Thomas Steenbergen <opensource@steenbe.nl>
1 parent 5f98c28 commit f5de453

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

evaluator.rules.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,12 @@ fun RuleSet.vulnerabilityWithHighSeverityInDependencyRule() = packageRule("HIGH_
15511551
},
15521552
hasVulnerability(maxAcceptedSeverity, "CVSS:3") { value, threshold ->
15531553
value.toFloat() >= threshold.toFloat()
1554+
},
1555+
hasVulnerability(maxAcceptedSeverity, "CVSS:3.1") { value, threshold ->
1556+
value.toFloat() >= threshold.toFloat()
1557+
},
1558+
hasVulnerability(maxAcceptedSeverity, "CVSS:4.0") { value, threshold ->
1559+
value.toFloat() >= threshold.toFloat()
15541560
}
15551561
)
15561562
}

0 commit comments

Comments
 (0)