From eb66b9ded50b2871689a9d5ca50db3c4991965e0 Mon Sep 17 00:00:00 2001 From: Aravind N Date: Thu, 22 Feb 2024 16:36:13 +0530 Subject: [PATCH] Revert "[Temporary] Update the policy" This reverts commit 120c74203de7c748c3df8612c716d6fae0052a38. --- .../policy-include/include.rego | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/policies/opsverse-corcentric-cd/policy-include/include.rego b/policies/opsverse-corcentric-cd/policy-include/include.rego index b6a96d2..bd58fe8 100644 --- a/policies/opsverse-corcentric-cd/policy-include/include.rego +++ b/policies/opsverse-corcentric-cd/policy-include/include.rego @@ -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" +} \ No newline at end of file