[Bug] podSecurity exception for Running as Non-root control doesn't work #12888
Labels
bug
Something isn't working
triage
Default label assigned to all new issues indicating label curation is needed to fully organize.
validate.podSecurity
podSecurity sub-rule type
Milestone
Kyverno Version
1.13.4
Description
Hello,
I have came across issue when defining exceptions for podSecurity subrules.
With policy:
and resource:
Kyverno reports:
I included only relevant part, I am aware that presented resource lacks other securityContext values, and actual message would cover them too. The thing is this behaviour is very surprising because these exceptions work for any other control covered by podSecurity. That's why I wanted to highlight this particular one. In addition runAsNonRoot is defined at both pod and container level. Exception does not work only on pod level. I checked that by defining exclude part like:
And as mentioned it is only not taken into consideration for pod level runAsNonRoot control, what seems unexpected. Therefore I report this as a bug.
I didn't find anything relevant reported in admission controller or reports controller logs.
Regards
Slack discussion
No response
Troubleshooting
The text was updated successfully, but these errors were encountered: