Closed ms-sambell closed 2 years ago
@ms-sambell This rule is about the number of IP addresses not so much the number of rules. There is a separate rule for a high number of rules. Maybe the documentation can do with some updates and/ or we can make it configurable.
For example:
1.1.1.1 -> 1.1.128 - exposes access from 128 addresses which is above the threshold of 10 although it may only be in a single firewall rule.
Likewise 0.0.0.0 -> 255.255.255.255 is all IPv4 addresses but still could be one firewall rule.
@ms-sambell Just double checking if this is behaving as expected or still a bug?
If so maybe lets convert it to a feature/ documentation request to make sure we don't lose track of adding these improvements.
@BernieWhite agreed, I'll change it to a feature and update the documentation.
Description of the issue
The rule Azure.SQL.FirewallIPRange fails on SQL servers when there's only 1 rule.
To Reproduce
Steps to reproduce the issue:
Run a PsRule for Azure scan against a SQL Server with a Firewall rule (parameter, 1 entry, maxLength 10).
Expected behavior
The rule evaluations that (1) exceeded 10. I would expect that the rule should evaluate as a pass if less than 10 FirewallIpRange.
Module in use and version:
Captured output from
$PSVersionTable
:Update: As this rule is working as designed, this issue will be resolved as a feature request to make this work more as expected by the following: