SSL 3.0, TLS 1.0 or TLS 1.1 is selected explicitly, protocols with known attacks

tx0/csharp:obsolete-tls-versionrecommendedwarningsecurity/cryptodepth fastsecurity, cwe-327

What it finds

SSL 3.0 and TLS 1.0 and 1.1 are deprecated by RFC 8996 and disabled by current operating systems; choosing them by name keeps them enabled where the system default would not. Leaving the protocol to the operating system, or naming TLS 1.2 and 1.3, is safer.

From the rule's source, obsolete_tls_version.rs.

Example from the rule's tests
using System.Net;using System.Security.Authentication; class Transport{    void Configure()    {        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;tx0 reports: Tls11 is an obsolete protocol version        var modern = SslProtocols.Tls12;    }}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

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:

tx0.toml
[rules]
"tx0/csharp:obsolete-tls-version" = "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/csharp:obsolete-tls-version] reason="..."

tx0 explain tx0/csharp:obsolete-tls-version shows the same in the terminal. Found a false positive? Report it.