Usage of insecure HTTP connection

Description

Your application is at risk when it connects to APIs using insecure HTTP connections. This vulnerability occurs because HTTP does not encrypt data, making it susceptible to interception and alteration. Ensure that your application uses HTTPS, which encrypts data in transit, for all connections.

Remediations

  • Do not use unsecured HTTP connections for outgoing communications, particularly when making API calls.
    response = HTTParty.get('http://insecure-api.com') # unsafe
  • Do ensure all connections are made through HTTPS to protect data in transit with encryption.
    response = HTTParty.get('https://secure-api.com')

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

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

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