Skip to content

test: add YamlCodec security tests#16282

Open
jay666mnj wants to merge 1 commit into
apache:3.3from
jay666mnj:test-yaml-codec-security
Open

test: add YamlCodec security tests#16282
jay666mnj wants to merge 1 commit into
apache:3.3from
jay666mnj:test-yaml-codec-security

Conversation

@jay666mnj
Copy link
Copy Markdown

What is the purpose of the change

Add tests for YamlCodec to ensure YAML Java class tags are checked by Dubbo serialization security.

Brief changelog

  • Add YamlCodecTest
  • Verify normal YAML decoding to POJO
  • Verify unsafe YAML class tag is rejected in STRICT mode

Verifying this change

  • $env:JAVA_TOOL_OPTIONS='-Dfile.encoding=UTF-8'; .\mvnw.cmd -pl dubbo-remoting/dubbo-remoting-http12 -Dtest=YamlCodecTest test

Fixes #13799

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.78%. Comparing base (3dbba26) to head (86fed5f).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16282      +/-   ##
============================================
- Coverage     60.85%   60.78%   -0.08%     
+ Complexity    11779    11769      -10     
============================================
  Files          1953     1953              
  Lines         89186    89186              
  Branches      13454    13454              
============================================
- Hits          54277    54209      -68     
- Misses        29353    29413      +60     
- Partials       5556     5564       +8     
Flag Coverage Δ
integration-tests-java21 32.11% <ø> (-0.06%) ⬇️
integration-tests-java8 32.26% <ø> (+<0.01%) ⬆️
samples-tests-java21 32.12% <ø> (-0.11%) ⬇️
samples-tests-java8 29.76% <ø> (-0.14%) ⬇️
unit-tests-java11 59.00% <ø> (-0.08%) ⬇️
unit-tests-java17 58.50% <ø> (-0.09%) ⬇️
unit-tests-java21 58.49% <ø> (-0.11%) ⬇️
unit-tests-java25 58.45% <ø> (-0.09%) ⬇️
unit-tests-java8 59.02% <ø> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@RainYuY RainYuY left a comment

Choose a reason for hiding this comment

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

LGTM

@jay666mnj
Copy link
Copy Markdown
Author

jay666mnj commented May 29, 2026 via email

@jay666mnj
Copy link
Copy Markdown
Author

jay666mnj commented May 29, 2026 via email

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.

Test YamlCodec to ensure no CVE issue

4 participants