Skip to content

fix(deps): update test Handlebars to 4.5.3#783

Open
jbeckwith-oai wants to merge 1 commit into
mainfrom
codex/update-test-handlebars
Open

fix(deps): update test Handlebars to 4.5.3#783
jbeckwith-oai wants to merge 1 commit into
mainfrom
codex/update-test-handlebars

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

  • constrain the WireMock 2 test graphs in openai-java-core and openai-java-client-okhttp to Handlebars core 4.5.3
  • add an end-to-end WireMock response-template test that exercises Handlebars through a real HTTP stub
  • address Dependabot alert 91 for CVE-2026-55760 / GHSA-r4gv-qr8j-p3pg

Version choice

Handlebars 4.5.2 is the first release containing the FileTemplateLoader path-traversal fix. This uses 4.5.3 because it also includes the follow-on SpringTemplateLoader arbitrary-file-read fix.

handlebars-helpers intentionally remains at WireMock's requested 4.3.1. WireMock 2.35.2 links helper classes under com.github.jknack.handlebars.helper, while helpers 4.5.3 moved those classes to a different package; aligning both artifacts breaks response templating with NoClassDefFoundError. The vulnerable artifact is Handlebars core, and the new integration test proves the narrow mixed-version graph preserves WireMock's template behavior.

Compatibility

This change affects test configurations only. Handlebars and WireMock are absent from the generated Maven POMs and Gradle module metadata. Published SDK classes remain Java 8 bytecode (class-file major version 52), and no public API, runtime dependency, or Jackson compatibility floor changes. Handlebars 4.5.3 itself requires Java 17, but it runs only in this repository's JDK 21 test toolchain and is never exposed to consumers.

Validation

  • dependencyInsight for both modules' test runtime classpaths and the core published-Jackson runtime
  • focused response-template test with Jackson 2.14.0 and 2.18.9
  • full Gradle check suite with the repository mock server, including ProGuard and R8 checks
  • scripts/lint
  • scripts/build
  • scripts/detect-breaking-changes origin/main
  • generated Maven POM and Gradle module metadata inspection
  • published core and OkHttp JAR bytecode inspection

Addresses https://github.com/openai/openai-java/security/dependabot/91

@jbeckwith-oai jbeckwith-oai requested a review from a team as a code owner July 15, 2026 22:06
@openai-sdks

openai-sdks Bot commented Jul 15, 2026

Copy link
Copy Markdown

OkTest Summary

237/237 SDK tests passed in 16.084s for Java SDK PR #783.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 310ms
tests/chat-completions-create.test.ts ✅ Passed 883ms
tests/chat-completions-stream.test.ts ✅ Passed 320ms
tests/files-content-binary.test.ts ✅ Passed 250ms
tests/files-create-multipart.test.ts ✅ Passed 418ms
tests/files-list-pagination.test.ts ✅ Passed 322ms
tests/initialize-config.test.ts ✅ Passed 273ms
tests/instance-isolation.test.ts ✅ Passed 190ms
tests/models-list.test.ts ✅ Passed 166ms
tests/responses-background-lifecycle.test.ts ✅ Passed 480ms
tests/responses-body-method-errors.test.ts ✅ Passed 495ms
tests/responses-cancel-timeout.test.ts ✅ Passed 202ms
tests/responses-cancel.test.ts ✅ Passed 248ms
tests/responses-compact-retries.test.ts ✅ Passed 465ms
tests/responses-compact.test.ts ✅ Passed 410ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 240ms
tests/responses-create-advanced.test.ts ✅ Passed 1.535s
tests/responses-create-disconnect.test.ts ✅ Passed 1.064s
tests/responses-create-errors.test.ts ✅ Passed 282ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 296ms
tests/responses-create-retries.test.ts ✅ Passed 264ms
tests/responses-create-stream-failures.test.ts ✅ Passed 223ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 231ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.052s
tests/responses-create-stream.test.ts ✅ Passed 130ms
tests/responses-create-terminal-states.test.ts ✅ Passed 338ms
tests/responses-create-timeout.test.ts ✅ Passed 207ms
tests/responses-create.test.ts ✅ Passed 720ms
tests/responses-delete.test.ts ✅ Passed 322ms
tests/responses-input-items-errors.test.ts ✅ Passed 288ms
tests/responses-input-items-list.test.ts ✅ Passed 319ms
tests/responses-input-items-options.test.ts ✅ Passed 262ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 245ms
tests/responses-input-tokens-count.test.ts ✅ Passed 217ms
tests/responses-malformed-inputs.test.ts ✅ Passed 4.881s
tests/responses-not-found-errors.test.ts ✅ Passed 387ms
tests/responses-parse.test.ts ✅ Passed 623ms
tests/responses-retrieve-retries.test.ts ✅ Passed 399ms
tests/responses-retrieve.test.ts ✅ Passed 260ms
tests/responses-stored-method-errors.test.ts ✅ Passed 984ms
tests/retry-behavior.test.ts ✅ Passed 3.403s
tests/sdk-error-shape.test.ts ✅ Passed 410ms

View OkTest run #29462769367

SDK merge (33879d99f540) · head (9e5437ade0a8) · base (845b2bc87fb0) · OkTest (fd7a761c81c1)

@jbeckwith-oai jbeckwith-oai force-pushed the codex/update-test-handlebars branch from ba16b44 to 9e5437a Compare July 16, 2026 00:55
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.

1 participant