Merge pull request #242 from YiscahLevySilas1/dev

add comment for isRuleKubescapeVersionCompatible()
This commit is contained in:
Rotem Refael
2021-11-29 13:06:05 +02:00
committed by GitHub
+3
View File
@@ -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 != "" {