Missing secure HTTP server configuration

Description

Failing to configure your HTTP server to use HTTPS can expose data to interception and manipulation. HTTPS, which incorporates TLS (Transport Layer Security), encrypts data in transit and therefore provides a more secure communication channel than HTTP.

Remediations

  • Do use the https module for creating secure servers in your applications. This ensures that data transmitted between the server and clients is encrypted.
    var https = require('https');
    var express = require('express');
    var app = express();

    var httpsServer = https.createServer(app);
    httpsServer.listen(8080);

References

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=javascript_express_https_protocol_missing

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=javascript_express_https_protocol_missing