Skip to content
vetkitChecksChangelogDocumentationBlogComparisons

Node.js rejectUnauthorized: false behind an env flag

Rule ID: vetkit.js.tls.reject-unauthorized-disabled-guarded

TLS certificate verification is disabled behind an environment or opt-in check (rejectUnauthorized: false). The insecure path is reachable whenever that flag is set in production.

Last updated:

Suite: Security

javascript, typescript

TLS certificate verification is disabled behind an environment or opt-in check (rejectUnauthorized: false). The insecure path is reachable whenever that flag is set in production.

Category: SECURITY · Engine rule severity: INFO

How to fix it

Prefer trusting the custom CA via the ca option; if the opt-in must stay, make sure the flag defaults to verification and is documented.

References

Source: packages/engine/rules/sast/javascript.yml.

Related checks

Check your own repository for this

vetkit runs this rule as part of a repository audit, alongside secret scanning, dependency vulnerabilities, code quality and AI code risk checks. It reads a temporary checkout and never executes your code.

Start with the free Security Quick Scan · See how the platform works

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.