Rule.Inclusion Option #2676
-
Does the rule include option support wild cards? e.g. say I only want to include all the APIM rules for execution. Do I have to list each one or is there a better way to achieve this ? i.e. - 'PSRule.Rules.Azure\Azure.APIM.*' ? - (didn't appear to work) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@paulmcclbg If you set
Wildcards were intended to support usage via the If you only want to run Generally, running a subset of rules is supported by a baseline but they don't address your request specifically, because they have the same limitation. However you could generate a baseline by using this script as an example: https://github.com/Azure/PSRule.Rules.Azure/blob/main/scripts/security-baseline.ps1 |
Beta Was this translation helpful? Give feedback.
@paulmcclbg If you set
Rule.Include
toAzure.APIM.*
then it should work. But it wasn't intended to be used like this and there is some limitations.Rule.Include
will only support one entry.Wildcards were intended to support usage via the
-Name
parameter ofInvoke/Assert/Get-PSRule
PowerShell cmdlets.If you only want to run
Azure.APIM.*
rules this option should work.Generally, running a subset of rules is supported by a baseline but they don't address your request specifically, because they have the same limitation. However you could generate a baseline by using this script as an example: https://github.com/Az…