Error publishing rules when they contain an NSG #1313
-
When I add an NSG to my bicep deployment it causes an error when publishing the xml output: ##[warning]Failed to read D:\a\1\s\results\psrule-report.xml. Error : 'any' is an unexpected token. Expecting white space. Line 1, position 4074.. looking at the xml it appears to be this section causing the issue: "Network security groups (NSGs) should avoid rules that allow "any" as an inbound source." assert is working fine its just publishing the output where I have an issue In my environment I have to supply NSGs with a deny all inbound and outbound rule which the product teams will then populate with white list rules. The NSG parameters are being supplied by a parameter file:
Am I doing something in my deployment to cause this issue? Any help in working through this so I can publish would be really appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
@andywills133 There seems to be a few separate issues occurring.
To address Azure.NSG.AnyInboundSource, check if there is any inbound rules with a lower priority that are If you does not have any inbound rules with If the rule is failing but to do not want to fix the issue for some reason you can suppress the issue by following these steps. https://azure.github.io/PSRule.Rules.Azure/creating-your-pipeline/#ignoring-rules I hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Hi, this is the what the section looks like:
input:
pathIgnore:
# Ignore other files in the repository.
- 'reports/'
…On Tue, Oct 18, 2022 at 3:52 PM Bernie White ***@***.***> wrote:
@andywills133 <https://github.com/andywills133> Thanks for logging the
issue. Just to clarify, did you ignore configuration in ps-rule.yaml look
like this:
input:
pathIgnore:
- 'reports/'
—
Reply to this email directly, view it on GitHub
<#1313 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUQDFKFSDAMHETVHG3OOWSDWD22UVANCNFSM6AAAAAARFB2ZDI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This was a bug fixed in PSRule v2.5.3. |
Beta Was this translation helpful? Give feedback.
This was a bug fixed in PSRule v2.5.3.