When updating an xml policy with wdac wizard, if some of its rules contained file path exceptions, it's fairly common that it becomes corrupt when adding new rules. The IDs of the exceptions are messed, so the file becomes corrupt, it can be checked with a command like this one:
PS C:\Users\xxx\source_code\WDAC\policies> Merge-CIPolicy -OutputFilePath .\kkk.xml -PolicyPaths .\WDAC-BlackList-AllowAll_v1.0.3.36.xml
Merge-CIPolicy : "Documento con formato incorrecto: debe haber un nodo con el ID = ID_ALLOW_A_0015_2_1_1_0_0_0"
En línea: 1 Carácter: 2
+ Merge-CIPolicy -OutputFilePath .\kkk.xml -PolicyPaths .\WDAC-BlackLi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Merge-CIPolicy], CIPolicyException
+ FullyQualifiedErrorId : Microsoft.SecureBoot.UserConfig.CIPolicyException,Microsoft.SecureBoot.UserConfig.MergeCIPolicy
PS C:\Users\xxx\source_code\WDAC\policies>
if I inspect the original policy the original rule was like this:
When updating an xml policy with wdac wizard, if some of its rules contained file path exceptions, it's fairly common that it becomes corrupt when adding new rules. The IDs of the exceptions are messed, so the file becomes corrupt, it can be checked with a command like this one:
if I inspect the original policy the original rule was like this:
in the corrupt policy it has become this:
So the AllowRuleIDs don't match and generates the corruption