PSRule icon indicating copy to clipboard operation
PSRule copied to clipboard

Fix aggregation of reasons with $Assert.AnyOf()

Open BernieWhite opened this issue 1 year ago • 0 comments

Description of the issue

When using $Assert.AnyOf reasons by child statements are not returned.

Example case: https://github.com/Azure/PSRule.Rules.Azure/pull/2872

To Reproduce

Steps to reproduce the issue:

$Assert.AnyOf(
                $Assert.HasFieldValue($firewall, 'properties.publicNetworkAccess', 'Disabled'),
                $Assert.HasFieldValue($firewall, 'properties.defaultAction', 'Deny')
            )

Module in use and version:

  • Module: PSRule
  • Version: 2.9.0

BernieWhite avatar May 24 '24 05:05 BernieWhite