Repository navigation
fix(security): update deps and base images to clear HIGH/CRITICAL CVEs - #103
Conversation
- Quarkus 3.20.2.1 -> 3.20.6.2 (quarkus-vertx-http authz bypass CVEs) - Floor netty 4.1.141.Final, jackson 2.18.12, micrometer 1.15.12, guava 33.7.2-jre - Drop kotlin-dsl from library modules so gradle-api jar no longer ships in images - Final image: ubi9/openjdk-21-runtime:1.24 + microdnf upgrade, run as uid 185
…1 blocklist Red Hat has not yet shipped a fixed java-21-openjdk for UBI 9 (RHSB-2026-018), so the snowflake, mysql, oracle, trino and CLI images keep the ubi9/openjdk-21 1.24 bases and set JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics, Red Hat's documented temporary workaround. This is a mitigation, not a fixed JDK; remove it once a fixed RPM is in the base image. Also ports #102's emSign Root CA - G1 trust-store blocklist, builds the arch-independent Gradle stage on the build platform, and stops the NDC tests workflow re-installing the MySQL client (the runner already has it; the reinstall broke on a mysql-server postinst).
Java4Shell (CVE-2026-114938) mitigation: verification of 6ee4504Status: mitigated, not fixed. All final images still contain Red Hat's affected Built from this commit with
Checked inside each final image, on both amd64 (native) and arm64 (QEMU), for all 5 images:
Smoke tests on the running container (default
CI on 6ee4504:
Not covered: no live queries against MySQL/Oracle/Snowflake/Trino databases, and the snowflake introspection path (blocked by the MFA issue above). |
Unqualified table names resolve to the connection's default schema at query time, but introspection scanned every schema in the database and merged same-named tables, so the generated schema depended on which copy Snowflake returned last.
Generated by CI run 44341361224 with --schemas=CI_DATA.
The URL can contain credentials (password or private_key_base64), and the script's output is written to dev-setup-connector.log, which the NDC tests workflow uploads as an artifact. GitHub secret masking does not apply to artifact contents.
The newest UBI 9.9 image builds include fixes that are not yet in the UBI package repos, so microdnf upgrade on top of openjdk-21-runtime:1.24 could not install them. Notably krb5-libs stayed at 1.21.1-10.el9_8.1, affected by ~19 krb5 CVEs (mostly Important) fixed in 1.21.1-10.el9_9.2. Runtime stages now start from ubi9/ubi-minimal:9.9, install the same java-21-openjdk-headless (21.0.13), and copy Red Hat's run-java.sh launcher from openjdk-21-runtime:1.24 so JVM defaults and JAVA_* env handling are unchanged. User 185 (default), HOME and JBOSS_* env match the previous base. Tested locally (arm64) with the apps from the latest published images: all four connectors start and return /health 200 with identical JVM flags; the CLI runs. Image is ~146 MB smaller.
… v1.0.7 (#776) Adds the ndc-jvm-mono releases cut from [hasura/ndc-jvm-mono@7606ff9](hasura/ndc-jvm-mono@7606ff9) (merge of [ndc-jvm-mono#103](hasura/ndc-jvm-mono#103)) and bumps each connector's `latest_version`: | Connector | Version | Connector image | CLI image | |---|---|---|---| | `hasura/mysql` | v1.0.21 | `ghcr.io/hasura/ndc-jvm-mysql:v1.0.21` | `ghcr.io/hasura/ndc-jvm-cli:v1.0.21-mysql` | | `hasura/snowflake` | v1.2.1 | `ghcr.io/hasura/ndc-jvm-snowflake:v1.2.1` | `ghcr.io/hasura/ndc-jvm-cli:v1.2.1-snowflake` | | `hasura/oracle` | v1.2.5 | `ghcr.io/hasura/ndc-jvm-oracle:v1.2.5` | `ghcr.io/hasura/ndc-jvm-cli:v1.2.5-oracle` | | `hasura/trino` | v1.0.7 | `ghcr.io/hasura/ndc-jvm-trino:v1.0.7` | `ghcr.io/hasura/ndc-jvm-cli:v1.0.7-trino` | Each `connector-packaging.json` points at the `<db>-connector-v<ver>.tar.gz` asset on the matching GitHub Release; the sha256 values were computed from the downloaded assets and re-checked against the URIs. `source.hash` is 7606ff9 for all four. **What changed in these releases** (ndc-jvm-mono#103): security update. Runtime images move to `ubi9/ubi-minimal:9.9` + `java-21-openjdk-headless` with all RHEL errata, dependency bumps to clear HIGH/CRITICAL CVEs, the emSign Root CA - G1 distrust, and `JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics` as Red Hat's temporary mitigation for Java4Shell (CVE-2026-114938) until a fixed JDK RPM ships. **Verification:** all 8 images (amd64 + arm64) were pulled from ghcr and checked: provenance revision 7606ff9, uid 185, mitigation flag active in the JVM, `/health` and `/capabilities` 200. The Snowflake image was also queried live against the CI Snowflake account (schema validation, ndc-test replay, hand-written queries).
Summary
Dependency and base-image updates so the
ndc-jvm-*connector and CLI images have no fixable HIGH/CRITICAL Trivy findings in the application layer. This is part of the DDN connector vulnerability sweep for the non-ndc-jdbcconnectors.Java4Shell (CVE-2026-114938): temporary mitigation only. The JDK is not fixed yet.
OpenJDK advisory: this is a HotSpot Base64 intrinsic bug, fixed upstream in 21.0.13.1+2. As of 2026-11-18, Red Hat has not shipped a fixed
java-21-openjdkfor UBI 9 (RHSB-2026-018 is still "Ongoing"; there is no RHSA in the java-21-openjdk CSAF feed). The newestubi9/openjdk-21(-runtime):1.24images are from Nov 10 and shipjava-21-openjdk-headless-21.0.13.0.9-1.2.el9, which is still affected.This PR keeps the UBI 1.24 bases and applies Red Hat's documented workaround to all five images (snowflake, mysql, oracle, trino, cli):
The
javalauncher readsJDK_JAVA_OPTIONS, so it applies to bothrun-java.sh(connectors) and/app/bin/ndc-cli. No startup changes. The CVE stays open for these images. When Red Hat publishes the fixed RPM, a rebuild picks it up through the existingmicrodnf upgrade. Then remove theENVline and verifyjava -versionreports 21.0.13.1.x.Also in this commit:
emSign Root CA - G1in the OS trust store if it is still present (this also regenerates the JVMcacerts). The build fails if it is still trusted.$BUILDPLATFORM; the fast-jar/installDist output is arch-independent. arm64 images therefore no longer run Gradle under QEMU, and only the final stage is built per platform.NDC testsworkflow: skip re-installingmysql-clientwhen the runner already has it. The reinstall upgraded the preinstalledmysql-server, whose postinst failed (dpkg exit 100). That was the MySQL check's failure.Per-image digests and verification for amd64 and arm64 are in the PR comment below.
Changes
quarkus-vertx-httpauthorization-bypass CVEs (CVE-2026-39852, CVE-2026-50559).build.gradle.kts,resolutionStrategy). Each stays on its current minor line:kotlin-dslplugin fromndc-ir,ndc-sqlgenandndc-cli. These are plain Kotlin libraries, not Gradle plugins.kotlin-dslwas pulling the wholegradle-api-8.14.3.jarinto every runtime image, which brought old jsoup, plexus-utils, jackson 2.16 and guava. They now usekotlin("jvm").ubi9/openjdk-21:1.24.ubi9/openjdk-21:1.23to the JRE-onlyubi9/openjdk-21-runtime:1.24. This drops Maven, the JDK devel tools and their RPM findings.microdnf upgradeso RHEL errata published after the base image are included.USER 185. Before, it inheritedrootfrom the build stage'sUSER root.ndc-connector-phoenix.dockerfileis unchanged. There is nondc-connector-phoenixGradle module onmain(it isn't insettings.gradle.kts), so that image can't be rebuilt from this branch.Trivy results (HIGH/CRITICAL,
trivy 0.76.2, DB as of 2026-11-17)ndc-jvm-oracle:v1.2.4ndc-jvm-snowflake:v1.2.0ndc-jvm-mysql:v1.0.20ndc-jvm-trino:v1.0.6ndc-jvm-cliThe 23 HIGH findings left are all OS RPMs from the RHEL UBI 9 base image:
krb5-libsCVEs. Trivy reports their fix as1.21.1-10.el9_9.2, but that package isn't in the public UBI repos yet, somicrodnf upgradecan't install it.A later rebuild after Red Hat publishes those errata will clear them with no further changes, because the build runs
microdnf upgrade.Verification
./gradlew :ndc-ir:test :ndc-sqlgen:test :ndc-app:test :ndc-connector-trino:test: passes.ndc-connector-trino/configuration.json. It starts on Quarkus 3.20.6.2 as uid 185, and/healthand/capabilitiesboth return 200.ndc-cliruns../gradlew :ndc-connector-{mysql,oracle,snowflake}:buildpasses; these modules have no unit tests. Each Docker image builds. Each container starts on Quarkus 3.20.6.2 as uid 185 withorg.jooq.pro:jooq:3.19.8on the classpath, and/healthand/capabilitiesboth return 200. Each image scans at 0 CRITICAL / 23 HIGH with 0 jar findings, the same RHEL-only residuals as trino. No queries were run against live MySQL/Oracle/Snowflake databases.NDC tests: mysql now passes (fixed in this PR). The snowflake job has been failing on every PR since May 2026 because the CI Snowflake user requires MFA, so a red result there isn't a regression signal.Release
Once this is merged, cutting new
snowflake/,oracle/,mysql/andtrino/release branches publishes patchedghcr.io/hasura/ndc-jvm-*images.Originating bot: https://prompt.ql.app/project/hasuraql/promptql-playground/thread/3a3bf742-a20b-4003-b350-59948bbd1585