Files
Patrick Meinecke 98400b8cf5 Merged PR 41073: [release/v7.4.19] Add the xsd validation back for CIM cmdlets
<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->

### PR Summary

Add the xsd validation back for CIM cmdlets for PowerShell v7.

1. Instead of baking the huge `.xsd` file in a `.resx` resource file (which is what PS 5.1 does and depends on `System.Windows.Forms`), it's better to directly embed the `.xsd` file in the assembly as resource.
2. Refactored the static constructor of `ScriptWriter` to enable `DtdProcessing.Parse` for PowerShell 7.

----
#### AI description  (iteration 1)
#### PR Classification
This PR fixes a security vulnerability by re-enabling XSD validation for CIM cmdlets to prevent injection attacks in CDXML files.

#### PR Summary
Restores XSD schema validation for CIM cmdletization that was previously disabled in CoreCLR, addressing a security issue where malicious code could be injected through invalid CDXML files. The XSD schema file is now embedded as a manifest resource and validation is enforced across all platforms.

- `ScriptWriter.cs`: Re-enabled XSD validation for all platforms (removed CORECLR conditional compilation), refactored XML reader settings initialization, and embedded XSD schema loaded from manifest resources
- `Cdxml.Tests.ps1` and `invalid_verb.cdxml`: Added test case to verify that CDXML files with injection attempts in the Verb attribute are properly blocked by validation
- `System.Management.Automation.csproj`: Added `cmdlets-over-objects.xsd` as an embedded resource to enable schema validation
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2026-08-10 22:22:21 +00:00
..
2023-01-31 12:06:29 -08:00