A TLS configuration allows SSL 3.0, TLS 1.0 or TLS 1.1
What it finds
tls.Config{MinVersion: tls.VersionTLS10}: TLS 1.0 and 1.1 are deprecated by RFC 8996 and SSL 3.0 is broken, so a peer that offers only those is accepted with weak ciphers and known attacks. Go's default minimum for clients and servers is TLS 1.2, so leaving MinVersion out is usually right.
Reported are MinVersion and MaxVersion set to VersionSSL30, VersionTLS10 or VersionTLS11 of crypto/tls, resolved through the imports, in a composite literal or an assignment to a field of that name.
From the rule's source, old_tls_version.rs.
package p import "crypto/tls" func configs() []*tls.Config { a := &tls.Config{MinVersion: tls.VersionTLS10}tx0 reports: TLS 1.0 is deprecated and weak b := &tls.Config{} b.MinVersion = tls.VersionSSL30tx0 reports: SSL 3.0 is deprecated and weak c := &tls.Config{MinVersion: tls.VersionTLS12, MaxVersion: tls.VersionTLS13} return []*tls.Config{a, b, c}} Turn it on, off or suppress it
The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:
[rules]
"tx0/go:old-tls-version" = "off"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/go:old-tls-version] reason="..."tx0 explain tx0/go:old-tls-version shows the same in the terminal. Found a false positive? Report it.