-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
Signed-off-by: Mariam Fahmy <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: disallow-capabilities-strict | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- script: | ||
content: | | ||
sed 's/validationFailureAction: Audit/validationFailureAction: Enforce/' ../disallow-capabilities-strict.yaml | kubectl create -f - | ||
- assert: | ||
file: ../../../../pod-security/restricted/disallow-capabilities-strict/.chainsaw-test/chainsaw-step-01-assert-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../../../../pod-security/restricted/disallow-capabilities-strict/.chainsaw-test/pod-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/disallow-capabilities-strict/.chainsaw-test/pod-bad.yaml | ||
- apply: | ||
file: ../../../../pod-security/restricted/disallow-capabilities-strict/.chainsaw-test/podcontroller-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/disallow-capabilities-strict/.chainsaw-test/podcontroller-bad.yaml | ||
- name: step-99 | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
name: disallow-capabilities-strict |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: disallow-privilege-escalation | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- script: | ||
content: | | ||
sed 's/validationFailureAction: Audit/validationFailureAction: Enforce/' ../disallow-privilege-escalation.yaml | kubectl create -f - | ||
- assert: | ||
file: ../../../../pod-security/restricted/disallow-privilege-escalation/.chainsaw-test/chainsaw-step-01-assert-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../../../../pod-security/restricted/disallow-privilege-escalation/.chainsaw-test/pod-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/disallow-privilege-escalation/.chainsaw-test/pod-bad.yaml | ||
- apply: | ||
file: ../../../../pod-security/restricted/disallow-privilege-escalation/.chainsaw-test/podcontroller-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/disallow-privilege-escalation/.chainsaw-test/podcontroller-bad.yaml | ||
- name: step-99 | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
name: disallow-privilege-escalation |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: require-run-as-non-root-user | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- script: | ||
content: | | ||
sed 's/validationFailureAction: Audit/validationFailureAction: Enforce/' ../require-run-as-non-root-user.yaml | kubectl create -f - | ||
- assert: | ||
file: ../../../../pod-security/restricted/require-run-as-non-root-user/.chainsaw-test/chainsaw-step-01-assert-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../../../../pod-security/restricted/require-run-as-non-root-user/.chainsaw-test/pod-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/require-run-as-non-root-user/.chainsaw-test/pod-bad.yaml | ||
- apply: | ||
file: ../../../../pod-security/restricted/require-run-as-non-root-user/.chainsaw-test/podcontroller-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/require-run-as-non-root-user/.chainsaw-test/podcontroller-bad.yaml | ||
- name: step-99 | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
name: require-run-as-non-root-user |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: restrict-seccomp-strict | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- script: | ||
content: | | ||
sed 's/validationFailureAction: Audit/validationFailureAction: Enforce/' ../restrict-seccomp-strict.yaml | kubectl create -f - | ||
- assert: | ||
file: ../../../../pod-security/restricted/restrict-seccomp-strict/.chainsaw-test/chainsaw-step-01-assert-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../../../../pod-security/restricted/restrict-seccomp-strict/.chainsaw-test/pod-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/restrict-seccomp-strict/.chainsaw-test/pod-bad.yaml | ||
- apply: | ||
file: ../../../../pod-security/restricted/restrict-seccomp-strict/.chainsaw-test/podcontroller-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/restrict-seccomp-strict/.chainsaw-test/podcontroller-bad.yaml | ||
- name: step-99 | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
name: restrict-seccomp-strict |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: restrict-volume-types | ||
spec: | ||
steps: | ||
- name: step-01 | ||
try: | ||
- apply: | ||
file: ns.yaml | ||
- script: | ||
content: | | ||
sed 's/validationFailureAction: Audit/validationFailureAction: Enforce/' ../restrict-volume-types.yaml | kubectl create -f - | ||
- assert: | ||
file: ../../../../pod-security/restricted/restrict-volume-types/.chainsaw-test/chainsaw-step-01-assert-1.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: ../../../../pod-security/restricted/restrict-volume-types/.chainsaw-test/pod-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/restrict-volume-types/.chainsaw-test/pod-bad.yaml | ||
- apply: | ||
file: ../../../../pod-security/restricted/restrict-volume-types/.chainsaw-test/podcontroller-good.yaml | ||
- apply: | ||
expect: | ||
- check: | ||
($error != null): true | ||
file: ../../../../pod-security/restricted/restrict-volume-types/.chainsaw-test/podcontroller-bad.yaml | ||
- name: step-99 | ||
try: | ||
- delete: | ||
ref: | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
name: restrict-volume-types | ||
- command: | ||
args: | ||
- delete | ||
- all | ||
- --all | ||
- --force | ||
- --grace-period=0 | ||
- -n | ||
- restrict-voltypes-ns | ||
entrypoint: kubectl |
This file was deleted.