Skip to content

Commit

Permalink
Revert "[Temporary] Update the policy"
Browse files Browse the repository at this point in the history
This reverts commit 120c742.
  • Loading branch information
aravindnswamy committed Feb 22, 2024
1 parent f19e2e1 commit eb66b9d
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions policies/opsverse-corcentric-cd/policy-include/include.rego
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,43 @@ default maxNewViolationsAllowed := "10"
allow if {
input.metricName == "security_rating"
input.metricValue >= minSecurityRatingAllowed
} {
}

allow if {
input.metricName == "reliability_rating"
input.metricValue >= minReliabilityRatingAllowed
} {
}

allow if {
input.metricName == "complexity"
input.metricValue <= maxComplexityAllowed
} {
}

allow if {
input.metricName == "ncloc"
input.metricValue <= maxNclocAllowed
}

allow if {
input.metric == "unit-test"
}

allow if {
input.status == "PASSED"
input.metric == "code-coverage"
}

allow if {
input.status == "PASSED"
input.metric == "vulnerability"
}

allow if {
input.status == "PASSED"
input.metric == "static-code-analysis"
}

allow if {
input.status == "PASSED"
input.metric == "integration-test"
}

0 comments on commit eb66b9d

Please sign in to comment.