Skip to content

Change ibm-mq-metrics to use snake yaml engine v2#2872

Merged
jaydeluca merged 4 commits into
open-telemetry:mainfrom
jack-berg:ibm-mq-snakeyaml-safe-constructor
May 27, 2026
Merged

Change ibm-mq-metrics to use snake yaml engine v2#2872
jaydeluca merged 4 commits into
open-telemetry:mainfrom
jack-berg:ibm-mq-snakeyaml-safe-constructor

Conversation

@jack-berg

Copy link
Copy Markdown
Member

Upgrade ibm-mq-metrics to use snake yaml engine v2. In addition to this being the latest version of the library, and the same version used in opentelemetry-java for declarative config, it also removes the possibility of arbitrary java type instantiation using custom YAML tags since support for that feature was dropped.

@github-actions
github-actions Bot requested review from atoulme and breedx-splk May 27, 2026 19:05
@jack-berg
jack-berg marked this pull request as ready for review May 27, 2026 19:16
@jack-berg
jack-berg requested a review from a team as a code owner May 27, 2026 19:16
Copilot AI review requested due to automatic review settings May 27, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates ibm-mq-metrics to use SnakeYAML Engine v2 for YAML parsing, aligning with newer YAML tooling and reducing the risk of unsafe custom-tag behavior.

Changes:

  • Replaced org.yaml:snakeyaml with org.snakeyaml:snakeyaml-engine in the module dependencies.
  • Migrated ConfigWrapper.parse(...) to SnakeYAML Engine v2’s Load API.
  • Added a regression test asserting Java-type YAML tags are rejected.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
ibm-mq-metrics/src/main/java/io/opentelemetry/ibm/mq/opentelemetry/ConfigWrapper.java Switches YAML parsing implementation to SnakeYAML Engine v2 (Load / LoadSettings).
ibm-mq-metrics/src/test/java/io/opentelemetry/ibm/mq/opentelemetry/ConfigWrapperTest.java Updates AssertJ imports and adds a test for rejecting custom Java-type YAML tags.
ibm-mq-metrics/build.gradle.kts Replaces the SnakeYAML dependency with snakeyaml-engine.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@jaydeluca
jaydeluca added this pull request to the merge queue May 27, 2026
Merged via the queue into open-telemetry:main with commit ed56622 May 27, 2026
22 checks passed
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.

4 participants