A TLS configuration names a cipher suite that is known to be insecure

tx0/go:insecure-cipher-suiterecommendedwarningsecurity, cwe-327

What it finds

CipherSuites: []uint16{tls.TLS_RSA_WITH_RC4_128_SHA}: some TLS cipher suites use broken ciphers such as RC4 or triple DES, or CBC with SHA-256 constructions that are open to timing attacks, and the standard library lists them in tls.InsecureCipherSuites. A connection that negotiates one can be read or altered. Go's default choice of suites leaves them out.

Reported are uses of the constants of crypto/tls for the suites with RC4, with triple DES, and with AES-CBC and SHA-256, resolved through the imports.

From the rule's source, insecure_cipher_suite.rs.

Example from the rule's tests
package p import "crypto/tls" var config = &tls.Config{	CipherSuites: []uint16{		tls.TLS_RSA_WITH_RC4_128_SHA,tx0 reports: the cipher suite TLS_RSA_WITH_RC4_128_SHA is insecure		tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,	},}
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/go:insecure-cipher-suite" = "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/go:insecure-cipher-suite] reason="..."

tx0 explain tx0/go:insecure-cipher-suite shows the same in the terminal. Found a false positive? Report it.