The verification of TLS certificates is turned off
What it finds
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL) or curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 0L): the connection is encrypted but the peer is not checked, so anyone on the path can pose as the server.
From the rule's source, tls_verification_disabled.rs.
#include <curl/curl.h>#include <openssl/ssl.h> void setup(CURL *h, SSL_CTX *ctx){ curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 0L);tx0 reports: this turns off the verification of the peer's certificate curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 1L); SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);tx0 reports: this turns off the verification SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);} Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/c:tls-verification-disabled" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/c:tls-verification-disabled] reason="..."tx0 explain tx0/c:tls-verification-disabled shows the same in the terminal. Found a false positive? Report it.