Skip to content

Guard crypto XML XSLT tests on dynamic code support#128820

Merged
vcsjones merged 2 commits into
mainfrom
copilot/ci-scan-fix-tvos-arm64-xslt-tests
Jun 1, 2026
Merged

Guard crypto XML XSLT tests on dynamic code support#128820
vcsjones merged 2 commits into
mainfrom
copilot/ci-scan-fix-tvos-arm64-xslt-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

Cryptography XML XSLT tests fail on tvOS arm64 because XSLT requires dynamic code support, and that platform throws NotSupportedException before the tests reach their expected crypto failure path.

  • Test guards
    • Converted the affected XSLT tests from [Fact] to the existing dynamic-code guard:
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
  • Affected tests
    • SignedXml_EncryptedDataWithInfiniteXslTransform
    • EncryptedKey_InfiniteLoopXsltTransform
    • EncryptedXml_BillionLaughsXsltTransform

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
See info in area-owners.md if you want to be subscribed.

Co-authored-by: vcsjones <361677+vcsjones@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 31, 2026 21:53
Copilot AI changed the title [WIP] Fix XSLT tests for tvos-arm64 build failure Guard crypto XML XSLT tests on dynamic code support May 31, 2026
Copilot AI requested a review from vcsjones May 31, 2026 21:54
@vcsjones vcsjones marked this pull request as ready for review May 31, 2026 22:58
Copilot AI review requested due to automatic review settings May 31, 2026 22:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates XSLT-related System.Security.Cryptography.Xml tests to skip on platforms without dynamic code support, matching the capability required by XslCompiledTransform before these tests can reach their intended cryptographic failure assertions.

Changes:

  • Replaces [Fact] with [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] for three XSLT security tests.
  • Keeps the existing expected CryptographicException coverage on platforms where reflection emit/dynamic code is supported.
Show a summary per file
File Description
src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs Guards the signed XML encrypted-data XSLT test on reflection emit support.
src/libraries/System.Security.Cryptography.Xml/tests/EncryptedXmlTests.cs Guards two encrypted XML XSLT transform tests on reflection emit support.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@vcsjones vcsjones merged commit 480e3c8 into main Jun 1, 2026
94 of 98 checks passed
@vcsjones vcsjones deleted the copilot/ci-scan-fix-tvos-arm64-xslt-tests branch June 1, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci-scan] Test failure: Cryptography.Xml XSLT tests on tvos-arm64 (no dynamic code support)

4 participants