Skip to content

checker: ruby_ssl_no_verify#110

Merged
sourya-deepsource merged 1 commit intoDeepSourceCorp:masterfrom
Thiru-moorthi:ruby_ssl_no_verify
Mar 6, 2025
Merged

checker: ruby_ssl_no_verify#110
sourya-deepsource merged 1 commit intoDeepSourceCorp:masterfrom
Thiru-moorthi:ruby_ssl_no_verify

Conversation

@Thiru-moorthi
Copy link
Contributor

@Thiru-moorthi Thiru-moorthi commented Feb 24, 2025

Description
This PR adds a new Ruby checker to detect the use of OpenSSL::SSL::VERIFY_NONE, which disables SSL/TLS certificate verification. Disabling verification exposes applications to Man-in-the-Middle (MITM) attacks, allowing attackers to intercept and manipulate sensitive data in transit. This checker is flagged as a security issue to ensure SSL certificates are always validated.

Detection Logic
The checker flags the following case:

  • Setting ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE

Recommended Alternatives
Instead of disabling SSL verification, consider:

  • Using OpenSSL::SSL::VERIFY_PEER to verify certificates and ensure secure communications.
  • Properly configuring trusted certificate authorities (CAs) for SSL connections.

Exclusions
To reduce noise, the checker does not flag occurrences in:

  • Test files
  • Vendor dependencies
  • Development-only environments

References

@vercel
Copy link

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
globstar ⬜️ Ignored (Inspect) Visit Preview Feb 25, 2025 2:04am

@Thiru-moorthi Thiru-moorthi force-pushed the ruby_ssl_no_verify branch 4 times, most recently from e8b2d7b to 13bbbb3 Compare February 25, 2025 01:59
@sourya-deepsource sourya-deepsource merged commit 14dc7b8 into DeepSourceCorp:master Mar 6, 2025
2 checks passed
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