From e094237bbf99d6789cd2cba389a2b0cacb75456e Mon Sep 17 00:00:00 2001 From: yiscah Date: Sun, 28 Nov 2021 10:23:47 +0200 Subject: [PATCH] add comment for isRuleKubescapeVersionCompatible() --- opaprocessor/processorhandlerutils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opaprocessor/processorhandlerutils.go b/opaprocessor/processorhandlerutils.go index 7eeff4a3..44d25c50 100644 --- a/opaprocessor/processorhandlerutils.go +++ b/opaprocessor/processorhandlerutils.go @@ -76,6 +76,9 @@ func ruleWithArmoOpaDependency(annotations map[string]interface{}) bool { return false } +// Checks that kubescape version is in range of use for this rule +// In local build (BuildNumber = ""): +// returns true only if rule doesn't have the "until" attribute func isRuleKubescapeVersionCompatible(rule *reporthandling.PolicyRule) bool { if from, ok := rule.Attributes["useFromKubescapeVersion"]; ok { if cautils.BuildNumber != "" {