Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent CVE-2022-4886 #1014

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
get started on tests
Signed-off-by: Boris 'B' Kurktchiev <boris.kurktchiev@nirmata.com>
Boris 'B' Kurktchiev committed Aug 6, 2024
commit 5345d4b8d3c624fb092fcb9c52d97cbbb08fd3c0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: secrets-not-from-env-vars-cve-2024-3177
ready: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: secrets-not-from-env-vars-cve-2024-3177
spec:
steps:
- name: step-01
try:
- apply:
file: ../secrets-not-from-env-vars-cve-2024-3177.yaml
- patch:
resource:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: secrets-not-from-env-vars-cve-2024-3177
spec:
validationFailureAction: Enforce
- assert:
file: chainsaw-step-01-assert-1.yaml
- name: step-02
try:
- apply:
file: good-pod.yaml
- apply:
expect:
- check:
($error != null): true
file: bad-pod.yaml