Check Certificate Validation Nodejs-env-var


NODE_TLS_REJECT_UNAUTHORIZED is an environment variable used in Node.js to control TLS certificate verification behavior. This policy checks whether this environment variable is set to 0. By default, it is set to 1, which enables certificate verification.

Kyverno policy

Refer to the Nirmata curated policies - check-certificate-validation-nodejs-env-var.

Resource example

Below is an example of a Dockerfile enforcing this policy.

FROM alpine:latest


CMD ["sh", "-c", "echo 'Hello, World!'"]