1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

policy validation: fix assignment to entry in nil map (#7874)

Signed-off-by: AdamKorcz <adam@adalogics.com>
Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
AdamKorcz 2023-07-21 05:03:39 +01:00 committed by GitHub
parent 9429e12281
commit d4d190bbb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1262,6 +1262,9 @@ func validateNamespaces(s *kyvernov1.Spec, path *field.Path) error {
}
for i, vfa := range s.ValidationFailureActionOverrides {
if !vfa.Action.IsValid() {
return fmt.Errorf("invalid action")
}
patternList, nsList := wildcard.SeperateWildcards(vfa.Namespaces)
if vfa.Action.Audit() {