Skip to content

[repo-monitor] High: TLS certificate verification can be disabled with no warning #4

@Liohtml

Description

@Liohtml

Summary

Setting verify_ssl(false) in FetcherConfig disables TLS certificate validation for all requests globally with no log warning, enabling man-in-the-middle attacks.

Location

  • File: src/fetchers/client.rs
  • Line(s): 23

Severity

High

Details

.danger_accept_invalid_certs(!config.verify_ssl);

Setting verify_ssl = false disables TLS certificate validation for all requests. There is no warning to users that this is insecure. The danger_accept_invalid_certs name from reqwest itself signals this should be used with great care.

Suggested Fix

Add a prominent log warning when TLS verification is disabled:

if !config.verify_ssl {
    log::warn!("SSL certificate verification is DISABLED. This is insecure and must not be used in production.");
}

Also add a # Security section to the field's doc comment.


Automated finding by repo-monitor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions