Skip to content

Backport: Bump cyclonedx-core-java and json-schema-validtor libs - #6963

Merged
nscuro merged 2 commits into
DependencyTrack:4.14.xfrom
nscuro:backport-pr-6515
Aug 12, 2026
Merged

nscuro merged 2 commits into
DependencyTrack:4.14.xfrom
nscuro:backport-pr-6515

Conversation

@nscuro

@nscuro nscuro commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Description

Bumps cyclonedx-core-java to 12.2.0 and json-schema-validator to 2.0.3 (the latter was blocking the former).

Addresses a variety of breaking changes in json-schema-validator, among them:

  • Renaming and relocation of classes
  • Changes in default error message content

Additionally, moves the schema validation logic entirely into our own CycloneDxValidator instead of delegating to cyclonedx-core-java. The reason for this is that I noticed during testing that cyclonedx-core-java does not cache schemas after first use, so every validation call would reload schemas from disk, and recompile them, which is just wasted work.

Addressed Issue

Backports #6515

Additional Details

This is a prerequisite for backporting CycloneDX 1.7 support.

It was necessary to migrate all remaining tests that still used mockserver to WireMock, because mockserver depends on a json-schema-validator version that is incompatible with what cyclondedx-core needs. Unfortunately that creates a lot of noise in this PR, but it's all test code.

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have updated the migration changelog accordingly
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly
  • This PR is a substantial change (per the ADR criteria), and I have added an ADR under docs/adr/

@nscuro nscuro added this to the 4.14.4 milestone Aug 12, 2026
@nscuro nscuro added the enhancement New feature or request label Aug 12, 2026
@owasp-dt-bot

owasp-dt-bot commented Aug 12, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production

codacy-production Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 1 critical

Results:
1 new issue

Category Results
Security 1 critical

View in Codacy

🟢 Metrics 9 complexity

Metric Results
Complexity 9

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

nscuro added 2 commits August 12, 2026 13:27
MockServer 5.15.0 depends on json-schema-validator 1.0.76, and every MockServer
release since (7.0.0 through 7.5.0) requires json-schema-validator 3.x. Every
cyclonedx-core-java release from 12.2.0 onwards requires json-schema-validator
2.x. There is no version pairing in which MockServer and an up-to-date
cyclonedx-core-java can coexist, so MockServer blocks that dependency from ever
being bumped again.

WireMock is already used for HTTP mocking throughout the test suite, and the
shaded wiremock-jre8-standalone artifact carries no json-schema-validator
dependency of its own. Migrating the five remaining MockServer test classes to
WireMock lets MockServer be dropped entirely.

Signed-off-by: nscuro <nscuro@protonmail.com>
Bumps cyclonedx-core-java to 12.2.0 and json-schema-validator to 2.0.3 (the latter was blocking the former).

Addresses a variety of breaking changes in json-schema-validator, among them:

* Renaming and relocation of classes
* Changes in default error message content

Additionally, moves the schema validation logic entirely into our own `CycloneDxValidator` instead of delegating to cyclonedx-core-java. The reason for this is that I noticed during testing that cyclonedx-core-java does not cache schemas after first use, so every validation call would reload schemas from disk, and recompile them, which is just wasted work.

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro
nscuro merged commit 1598882 into DependencyTrack:4.14.x Aug 12, 2026
9 checks passed
@nscuro
nscuro deleted the backport-pr-6515 branch August 12, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants