fix: suppress CKV_K8S_21 false positive on knowledge-explorer Helm chart

Checkov's helm framework renders the chart without a namespace override,
so metadata.namespace (set to .Release.Namespace, bound only at install
time) always resolves to "default" and trips CKV_K8S_21 on service.yaml,
deployment.yaml, and configmap.yaml even though the chart is
namespace-agnostic by design.

Suppressed via per-file checkov:skip comments, following the same
convention already used for the Cloud Run false positives in
deploy/gcp/cloudrun-service.yaml.
This commit is contained in:
KaifAhmad1
2026-07-25 16:49:25 +05:30
parent 8f09d4f57b
commit ed44260ec3
5 changed files with 14 additions and 0 deletions
@@ -1,3 +1,4 @@
# checkov:skip=CKV_K8S_21:namespace is set to .Release.Namespace below, supplied at install time via `helm install -n <namespace>`; Checkov's helm-chart renderer runs without a namespace override and always resolves this to "default", which is a scanner artifact, not the deployed value
apiVersion: v1
kind: ConfigMap
metadata:
@@ -1,3 +1,4 @@
# checkov:skip=CKV_K8S_21:namespace is set to .Release.Namespace below, supplied at install time via `helm install -n <namespace>`; Checkov's helm-chart renderer runs without a namespace override and always resolves this to "default", which is a scanner artifact, not the deployed value
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -1,3 +1,4 @@
# checkov:skip=CKV_K8S_21:namespace is set to .Release.Namespace below, supplied at install time via `helm install -n <namespace>`; Checkov's helm-chart renderer runs without a namespace override and always resolves this to "default", which is a scanner artifact, not the deployed value
apiVersion: v1
kind: Service
metadata: