← Back to Pull requests

fix(deps): replace bouncycastle jdk15on with jdk18on 1.85 #4312

Closed
unknown closed this pull request without merging on Aug 17, 2026 04:41 UTC
View on GitHub
unknown unknown commented on Aug 10, 2026 03:36 UTC
Author

What's changed?

Fixes #3540: the project ships BouncyCastle from the abandoned jdk15on line (bcpkix-jdk15on:1.68, 2020) — it no longer receives releases, so its known CVEs will never be patched, and every dependency scan flags it. The maintained jdk18on line shares package and class names, so it is a drop-in replacement; the version is managed once in the root pom:

<bouncycastle.version>1.85</bouncycastle.version>

jdk15on enters the build through two different doors, fixed differently:

1. Direct dependency (hertzbeat-collector-basic)

MqttSslFactory uses BC to parse client certificates/keys for MQTT TLS auth, via a hardcoded bcpkix-jdk15on:1.68 in the module pom. Straight swap to bcpkix-jdk18on:${bouncycastle.version}.

2. Transitive dependency (hertzbeat-collector-nebulagraph)

The vesoft NebulaGraph client brings jdk15on with it — we don't control its pom, so the module now excludes the jdk15on jars from the vesoft dependency and supplies jdk18on explicitly. The vesoft client was compiled against jdk15on, but since both lines expose identical packages/classes it links against jdk18on unchanged — proven by a smoke test that runs its SslUtil on the new jars.

License material

material/licenses is bundled into the binary distribution, so the three manifests and the six per-artifact LICENSE-bc-.txt files are renamed/updated to jdk18on/1.85 — otherwise the release would declare components it no longer ships.

Verification

Dependency tree, before → after:

org.bouncycastle:bcpkix-jdk15on:jar:1.68      →   org.bouncycastle:bcpkix-jdk18on:jar:1.85
                                                  \- org.bouncycastle:bcutil-jdk18on:jar:1.85
                                                     \- org.bouncycastle:bcprov-jdk18on:jar:1.85

jdk15on no longer appears anywhere in the reactor, and the docker image lib/ carries only the three jdk18on jars. Every BC consumer was exercised against 1.85, not just compiled:

  • MQTT client-cert auth — new MqttSslFactoryTest parses generated PKCS#1 and PKCS#8 private keys through the production getMslSocketFactory path.

  • NebulaGraph SSL — new VesoftSslBouncyCastleSmokeTest feeds a BC-generated certificate through the vesoft client's own SslUtil.

  • SSH private-key login (mina-sshd uses BC to parse PEM keys) — SshHelper.getConnectSession completed a real handshake (AUTHED) against OpenSSH 9.6.
  • Full test suites of all modules with BC on the classpath (collector-common, collector-basic, collector-nebulagraph, collector-collector, push) pass.

    Checklist

  • I have read the Contributing Guide

  • I have written the necessary doc or comment.

  • I have added the necessary unit tests and all cases have passed.
  • Add or update API

  • I have added the necessary e2e tests and all cases have passed.
  • Diff: 377 lines (+282 / -95) across 4 files Reviewer: Duansg Review duration: 10145m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.43) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 377 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.355
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4312"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.9% (MEDIUM) · Higher = larger blast radius
    42.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.6% · Safe to merge
    18.6%