Skip to content

Conversation

@sanibrand-tech
Copy link
Owner

Potential fix for https://github.com/sanibrand-tech/runner/security/code-scanning/19

To mitigate this vulnerability, certificate validation should not be disabled. This means removing or commenting out the line process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'. By default, Node.js will reject unauthorized certificates, i.e., it will only permit connecting to servers with valid certificates.

If the code must connect to a self-signed/test instance, the secure solution is to provide the trusted CA certificate explicitly for validation—not to disable validation outright. Since only the disabling line is shown, the best fix here is to delete/comment that line. No additional imports or supporting changes are strictly needed, but users wanting to connect to services with self-signed certificates should be instructed to configure the ca option when making requests (see Node.js documentation for https.request).

Thus, only line 13 needs to be removed or commented out in src/Misc/layoutbin/checkScripts/downloadCert.js.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…alidation

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sanibrand-tech sanibrand-tech marked this pull request as ready for review September 15, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants