Skip to content

fix(security): update deps and base images to clear HIGH/CRITICAL CVEs - #103

Merged
GavinRay97 merged 8 commits into
mainfrom
gavin/vuln-dep-updates-2026-11
Nov 18, 2026
Merged

GavinRay97 merged 8 commits into
mainfrom
gavin/vuln-dep-updates-2026-11

Conversation

@GavinRay97

@GavinRay97 GavinRay97 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

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-jdbc connectors.

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-openjdk for UBI 9 (RHSB-2026-018 is still "Ongoing"; there is no RHSA in the java-21-openjdk CSAF feed). The newest ubi9/openjdk-21(-runtime):1.24 images are from Nov 10 and ship java-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):

ENV JDK_JAVA_OPTIONS="-XX:-UseBASE64Intrinsics"

The java launcher reads JDK_JAVA_OPTIONS, so it applies to both run-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 existing microdnf upgrade. Then remove the ENV line and verify java -version reports 21.0.13.1.x.

Also in this commit:

  • eMudhra distrust (from fix(security): block disclosed eMudhra chains in JVM connector and CLI images #102): blocks emSign Root CA - G1 in the OS trust store if it is still present (this also regenerates the JVM cacerts). The build fails if it is still trusted.
  • The Gradle build stage runs on $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 tests workflow: skip re-installing mysql-client when the runner already has it. The reinstall upgraded the preinstalled mysql-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 3.20.2.1 → 3.20.6.2 (latest patch on the 3.20 LTS line). Fixes the quarkus-vertx-http authorization-bypass CVEs (CVE-2026-39852, CVE-2026-50559).
  • Minimum versions for vulnerable transitive dependencies that the Quarkus 3.20 platform still pins (root build.gradle.kts, resolutionStrategy). Each stays on its current minor line:
    • netty 4.1.124 → 4.1.141.Final. Fixes CVE-2026-75595 (CRITICAL, SNI routing bypass), plus request-smuggling, HTTP/2 and DNS issues.
    • jackson 2.18.2 → 2.18.12. Fixes CVE-2026-54512/54513 (polymorphic typing RCE bypass) and DoS issues.
    • micrometer 1.14.5 → 1.15.12 (CVE-2026-40984)
    • guava 33.4.0 → 33.7.2-jre (CVE-2026-102554)
  • Removed the kotlin-dsl plugin from ndc-ir, ndc-sqlgen and ndc-cli. These are plain Kotlin libraries, not Gradle plugins. kotlin-dsl was pulling the whole gradle-api-8.14.3.jar into every runtime image, which brought old jsoup, plexus-utils, jackson 2.16 and guava. They now use kotlin("jvm").
  • Dockerfiles (mysql, oracle, snowflake, trino, cli):
    • The build stage moves to ubi9/openjdk-21:1.24.
    • The final stage moves from the full JDK image ubi9/openjdk-21:1.23 to the JRE-only ubi9/openjdk-21-runtime:1.24. This drops Maven, the JDK devel tools and their RPM findings.
    • Each build now runs microdnf upgrade so RHEL errata published after the base image are included.
    • The final stage now runs as non-root USER 185. Before, it inherited root from the build stage's USER root.

ndc-connector-phoenix.dockerfile is unchanged. There is no ndc-connector-phoenix Gradle module on main (it isn't in settings.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)

Image Before After
ndc-jvm-oracle:v1.2.4 2 CRITICAL / 217 HIGH (43 jar findings) 0 CRITICAL / 23 HIGH, 0 jar findings (local build of this branch)
ndc-jvm-snowflake:v1.2.0 2 CRITICAL / 219 HIGH 0 CRITICAL / 23 HIGH, 0 jar findings (local build of this branch)
ndc-jvm-mysql:v1.0.20 2 CRITICAL / 217 HIGH 0 CRITICAL / 23 HIGH, 0 jar findings (local build of this branch)
ndc-jvm-trino:v1.0.6 2 CRITICAL / 218 HIGH 0 CRITICAL / 23 HIGH, 0 jar findings (local build of this branch)
ndc-jvm-cli — 0 CRITICAL / 23 HIGH, 0 jar findings (local build of this branch)

The 23 HIGH findings left are all OS RPMs from the RHEL UBI 9 base image:

  • 9 have no fix published by Red Hat yet: expat, sqlite-libs, json-glib, python3-pip-wheel, and java-21-openjdk-headless CVE-2026-91403.
  • 14 are krb5-libs CVEs. Trivy reports their fix as 1.21.1-10.el9_9.2, but that package isn't in the public UBI repos yet, so microdnf upgrade can'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.
  • Built the trino image locally and ran it with ndc-connector-trino/configuration.json. It starts on Quarkus 3.20.6.2 as uid 185, and /health and /capabilities both return 200.
  • Built the CLI image locally; ndc-cli runs.
  • jOOQ Pro connectors (mysql, oracle, snowflake), verified with the jOOQ Pro license: ./gradlew :ndc-connector-{mysql,oracle,snowflake}:build passes; these modules have no unit tests. Each Docker image builds. Each container starts on Quarkus 3.20.6.2 as uid 185 with org.jooq.pro:jooq:3.19.8 on the classpath, and /health and /capabilities both 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/ and trino/ release branches publishes patched ghcr.io/hasura/ndc-jvm-* images.

Originating bot: https://prompt.ql.app/project/hasuraql/promptql-playground/thread/3a3bf742-a20b-4003-b350-59948bbd1585

- 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
@GavinRay97 GavinRay97 self-assigned this Nov 17, 2026
…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).

manasag commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Java4Shell (CVE-2026-114938) mitigation: verification of 6ee4504

Status: mitigated, not fixed. All final images still contain Red Hat's affected java-21-openjdk-headless-21.0.13.0.9-1.2.el9 (Red Hat has not shipped a fix yet; see RHSB-2026-018). Each image has -XX:-UseBASE64Intrinsics set and confirmed active in the JVM.

Built from this commit with docker buildx --platform linux/amd64,linux/arm64 (jOOQ Pro build args) and pushed to a local registry on the build VM. These are local verification builds; nothing was published to ghcr, so release builds will have different digests.

Image Index digest amd64 manifest arm64 manifest
snowflake sha256:6cf2acd269ff54ed06e9ef172a9fd6f52cf21d137a1b8bc6e087542b74d587fe sha256:907cf5fc184a427a1a3908b14fed9ed25eb7adb3b3fd631a0d5e2ff082d7c806 sha256:e7ba4f643f94aaef07a48bf6ea974b03ce9760ffd0ad00e7bda58d740076cfff
mysql sha256:2f075c373ae0cbdbc1ee56801856da14e52ae1ae7172a9ebbc10da330d3b8b66 sha256:f7ceb2f8916df43e28af503d7cc97ca85b216bc5e64aae19ee96a045c48f43c2 sha256:fc1d6b92238c892a1f8612b626f0bf57becbedb188b6dab072e71f2b72e6037a
oracle sha256:b7b59a4741d0d6909ba280e494d849ab28fe783d4d185e15bc879285d6fef1d2 sha256:7026a6182bc6b89c4251f1002d871449b93f6f302d656eba88e039ac64a39667 sha256:02b67289af3061fa46d0ec74508f15cb1466044f8843dbd3e922dd38864eeb4c
trino sha256:3a3e4fe17096fee60a00b50cf3cddc8a639c4e5115368872d7a46949ec3ba77c sha256:dca17d353a0276765422accc2a14ebf16f2ddcc7436eeeaa03ad8614dde83709 sha256:7ff443fc94149c871e202e2a61adf1fbf81cb7a92fbed4f76ef59b53a4851ea1
cli sha256:17c86f03763385006c1c514bbd8f025d27d9a08c37fa462cd9be37a4279ba3b6 sha256:8d76bd89194a59e4a47d120af26b91cb8defca8a87a2e6e00697724462181ab4 sha256:bd7535629537f352e2c96eedb091f38ce5568d498e1d1a9ffd097585188bf06d

Checked inside each final image, on both amd64 (native) and arm64 (QEMU), for all 5 images:

  • rpm -q java-21-openjdk-headless: 21.0.13.0.9-1.2.el9 (x86_64 / aarch64). java -version: Red_Hat-21.0.13.0.9-1 (build 21.0.13+9-LTS).
  • java -XX:+PrintFlagsFinal -version: bool UseBASE64Intrinsics = false {product} {command line}, with NOTE: Picked up JDK_JAVA_OPTIONS: -XX:-UseBASE64Intrinsics.
  • keytool -list -cacerts: 0 emSign entries. The G1 blocklist step passes.
  • id -u: 185.

Smoke tests on the running container (default run-java.sh entrypoint; oracle and trino use their in-repo configuration.json):

  • snowflake, mysql, oracle, trino: /health 200 and /capabilities 200 on amd64 and arm64. Quarkus 3.20.6.2 starts as uid 185, and the launcher logs Picked up JDK_JAVA_OPTIONS. On snowflake I also read /proc/<quarkus pid>/environ and found JDK_JAVA_OPTIONS=-XX:-UseBASE64Intrinsics for amd64 and arm64.
  • cli: /app/bin/ndc-cli help update exits 0 on amd64 and arm64, and the JVM picks up the flag.

CI on 6ee4504:

  • test: ✅
  • validate-test-cases (mysql): ✅. It was red because the "Install MySQL client" step failed with dpkg exit 100; that step is fixed in this commit.
  • validate-test-cases (snowflake): ❌ This is a CI credential problem, not this change. make run-snowflake-cli-introspection fails at login with Multi-factor authentication is required for this account for Snowflake user ci on ak41499.us-east-2. Every PR has failed the same way since May 2026. Fixing it needs whoever owns the SNOWFLAKE_JDBC_URL secret to switch the CI user to key-pair auth or a service user exempt from MFA.

Not covered: no live queries against MySQL/Oracle/Snowflake/Trino databases, and the snowflake introspection path (blocked by the MFA issue above). ndc-connector-phoenix.dockerfile is unchanged (no Gradle module on main). Tagging, publishing and Hub updates are out of scope for this PR.

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.
@codedmart
codedmart marked this pull request as ready for review November 18, 2026 17:29
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.
@GavinRay97
GavinRay97 merged commit 7606ff9 into main Nov 18, 2026
3 checks passed
codedmart added a commit to hasura/ndc-hub that referenced this pull request Nov 19, 2026
… 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants