add comment for isRuleKubescapeVersionCompatible()

This commit is contained in:
yiscah
2021-11-28 10:23:47 +02:00
parent 77eb52bc51
commit e094237bbf

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 != "" {