File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1540,18 +1540,14 @@ fun RuleSet.vulnerabilityInDependencyRule() = packageRule("VULNERABILITY_IN_DEPE
1540
1540
}
1541
1541
1542
1542
fun RuleSet.vulnerabilityWithHighSeverityInDependencyRule () = packageRule(" HIGH_SEVERITY_VULNERABILITY_IN_DEPENDENCY" ) {
1543
- val maxAcceptedSeverity = " 5.0 "
1543
+ val scoreThreshold = 5.0f
1544
1544
1545
1545
require {
1546
1546
- isProject()
1547
1547
- isExcluded()
1548
1548
+ AnyOf (
1549
- hasVulnerability(maxAcceptedSeverity, " CVSS2" ) { value, threshold ->
1550
- value.toFloat() >= threshold.toFloat()
1551
- },
1552
- hasVulnerability(maxAcceptedSeverity, " CVSS3" ) { value, threshold ->
1553
- value.toFloat() >= threshold.toFloat()
1554
- }
1549
+ hasVulnerability(scoreThreshold, " CVSS2" ),
1550
+ hasVulnerability(scoreThreshold, " CVSS3" )
1555
1551
)
1556
1552
}
1557
1553
You can’t perform that action at this time.
0 commit comments