A TLS connection allows SSL 3.0, TLS 1.0 or TLS 1.1

tx0/ts:weak-tls-versionrecommendedwarningsecurity, cwe-326

What it finds

SSL 3.0, TLS 1.0 and TLS 1.1 have known attacks and are no longer accepted by current browsers and standards. A server or client that allows them lets an attacker push the connection down to one of them.

Reported are Node's TLS options minVersion with "TLSv1" or "TLSv1.1", and secureProtocol with a method that selects SSL 3.0, TLS 1.0 or TLS 1.1.

From the rule's source, weak_tls_version.rs.

Example from the rule's tests
import tls from "tls";export const a = tls.createSecureContext({ minVersion: "TLSv1" });tx0 reports: TLSv1 allows a protocol versionexport const b = tls.createSecureContext({ secureProtocol: "SSLv3_method" });tx0 reports: SSLv3_method allowsexport const c = tls.createSecureContext({ minVersion: "TLSv1.2" });
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/ts:weak-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/ts:weak-tls-version] reason="..."

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