Usage of insecure websocket connection

Description

Applications should only connect to APIs using SSL connections. This rule checks that all websocket connections use SSL.

Remediations

❌ Avoid using unsecured outgoing websocket communication:

client = Faye::WebSocket::Client.new('ws://insecure-api.com')

✅ Always connect using SSL:

client = Faye::WebSocket::Client.new('wss://secure-api.com')

Resources

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=ruby_lang_websocket_insecure

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

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