Skip to content

Commit

Permalink
[Security Policies] Add tests for recursive pki/ directories (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
orestisfl committed Oct 11, 2023
1 parent 642f6eb commit 61c6a5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bundle/compliance/cis_k8s/rules/cis_1_1_19/test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ test_violation {
test.assert_fail(finding) with input as rule_input("etc/kubernetes/pki", "user", "root")
test.assert_fail(finding) with input as rule_input("etc/kubernetes/pki", "user", "user")
test.assert_fail(finding) with input as rule_input("etc/kubernetes/pki/some_file.txt", "root", "user")
test.assert_fail(finding) with input as rule_input("etc/kubernetes/pki/some/directory/some_file.txt", "root", "user")
}

test_pass {
test.assert_pass(finding) with input as rule_input("etc/kubernetes/pki", "root", "root")
test.assert_pass(finding) with input as rule_input("etc/kubernetes/pki/some_file.txt", "root", "root")
test.assert_pass(finding) with input as rule_input("etc/kubernetes/pki/some/directory/some_file.txt", "root", "root")
}

test_not_evaluated {
Expand Down

0 comments on commit 61c6a5c

Please sign in to comment.