Skip to content

fix: Replace the unsafe Yaml instantiation in ReferenceVisitor.getYam…#2344

Merged
ewaostrowska merged 1 commit into
masterfrom
snakeyaml-constructor
Jun 11, 2026
Merged

fix: Replace the unsafe Yaml instantiation in ReferenceVisitor.getYam…#2344
ewaostrowska merged 1 commit into
masterfrom
snakeyaml-constructor

Conversation

@ewaostrowska

Copy link
Copy Markdown
Contributor

This pull request strengthens YAML parsing security in the ReferenceVisitor class by ensuring only safe YAML tags are allowed, and adds a test to verify that unsafe tags are rejected.

  • Updated the getYaml() method in ReferenceVisitor to always use SafeConstructor and LoaderOptions, ensuring that only safe YAML tags are processed and preventing deserialization of potentially unsafe Java objects.
  • Added imports for SafeConstructor, Representer, and DumperOptions to support the new YAML instantiation approach

@ewaostrowska ewaostrowska force-pushed the snakeyaml-constructor branch from 4e12bd1 to 6523a97 Compare June 11, 2026 09:16
@ewaostrowska ewaostrowska merged commit 119fa73 into master Jun 11, 2026
7 checks passed
@ewaostrowska ewaostrowska deleted the snakeyaml-constructor branch June 11, 2026 09:24
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.

2 participants