mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-07 00:17:13 +00:00
18 lines
No EOL
740 B
YAML
18 lines
No EOL
740 B
YAML
# file path relative to project root
|
|
input:
|
|
policy: samples/best_practices/deny_runasrootuser.yaml
|
|
resource: test/resources/resource_validate_nonRootUser.yaml
|
|
expected:
|
|
validation:
|
|
policyresponse:
|
|
policy: validate-deny-runasrootuser
|
|
resource:
|
|
kind: Pod
|
|
apiVersion: v1
|
|
namespace: ''
|
|
name: sec-ctx-unprivileged
|
|
rules:
|
|
- name: deny-runasrootuser
|
|
type: Validation
|
|
message: Validation rule 'deny-runasrootuser' failed to validate patterns defined in anyPattern. Root user is not allowed. Set runAsNonRoot to true.; anyPattern[0] failed at path /spec/securityContext/; anyPattern[1] failed at path /spec/containers/0/securityContext/
|
|
success: false |