← All recipes
Moderne licensed

Find TLS protocol configuration

Recipe IDio.moderne.cryptography.pqc.FindTlsProtocolConfigurationArtifactio.moderne.recipe:rewrite-cryptography

Inventories every place a Java source decides which TLS protocol versions and cipher suites may be negotiated, and classifies each by whether TLS 1.3 — the only version JEP 527 hybrid key exchange exists for — remains reachable. Covers SSLContext.getInstance (whose algorithm name is a *ceiling*, never a floor), the setProtocols/setEnabledProtocols and setCipherSuites/setEnabledCipherSuites sinks, the setSSLParameters sink that applies a parameter bundle assembled elsewhere, the jdk.tls.client.protocols, jdk.tls.server.protocols, https.protocols, jdk.tls.client.cipherSuites and jdk.tls.server.cipherSuites system properties, BouncyCastle getSupportedVersions and getSupportedCipherSuites overrides, and default-acquisition sites that configure no floor at all. A pinned cipher list with no RFC 8446 suite blocks TLS 1.3 even when the protocol floor allows it. Findings land in the TLS configuration inventory data table. Scope is JSSE and BouncyCastle: Netty, OkHttp, Apache HttpClient and servlet-container configuration are not scanned, and -D flags in build files and launch scripts are invisible, so an absent row is not evidence of a modern floor.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe io.moderne.cryptography.pqc.FindTlsProtocolConfiguration

If the recipe isn’t available locally, install it with:

mod config recipes jar install io.moderne.recipe:rewrite-cryptography:RELEASE

Options

NameTypeDescription
detectAbsenceBooleanEmit no-explicit-floor rows for default-acquisition call sites — SSLContext.getDefault(), SSLSocketFactory.getDefault(), HttpClient.newHttpClient(), an HttpClient builder chain without sslContext/sslParameters, and an HttpsURLConnection acquired in a file that pins no socket factory. Set to false to restrict the inventory to explicit protocol configuration. Default true.
reportCompliantBooleanInclude modern-floor-tls12 and modern-floor-tls13 rows so the inventory is a complete census rather than a defect list. Set to false to report only PQC-blocking, legacy or ambiguous configurations. Default true.

Data tables

Structured output this recipe can produce.

  • TLS configuration inventoryTLS protocol version and cipher suite configuration detected in Java sources and in Spring Boot `.properties`/`.yaml` files, classified by whether TLS 1.3 — and therefore JEP 527 / BouncyCastle 1.81 hybrid key exchange — remains reachable. Non-JSSE TLS stacks (Netty, OkHttp, Tomcat and Jetty server configuration, `-D` flags in build files and launch scripts) are out of scope, so an absent row is not evidence that a module has no legacy TLS floor.io.moderne.cryptography.pqc.table.TlsConfigurationInventoryTable
  • Cryptography inventoryEvery cryptographic finding this module detects, joined into one sparse table so that a consumer does not have to match the per-detector tables on source location. A row carries the columns of whichever detectors reported at its location and leaves the others empty; the `Finding type` column names those detectors. The per-detector tables (`Cipher inventory`, `PQC readiness`, `TLS configuration inventory`, `TLS named groups inventory`) are still emitted unchanged, and carry the same findings unjoined.io.moderne.cryptography.table.CryptographyInventoryTable
  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats