Skip to content

Commit

Permalink
Fix NSGRulePortAccessRestricted crashing on a terraform dynamic block (
Browse files Browse the repository at this point in the history
…#489)

* Fix NSGRulePortAccessRestricted crashing on a terraform dynamic block

See issue: #488

* More appropriate return code

* One more try...

Looking at the rest of the code, seems CheckResult.UNKNOWN is probably more suitable.

* Reduced scope

Co-authored-by: David Nicoll <[email protected]>
  • Loading branch information
davenicoll and David Nicoll authored Aug 19, 2020
1 parent e5b4a65 commit ce003bf
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def is_port_in_range(self, conf):
return False

def scan_resource_conf(self, conf):
if "dynamic" in conf:
return CheckResult.UNKNOWN

rule_confs = [conf]
if 'security_rule' in conf:
rule_confs = conf['security_rule']
Expand Down

0 comments on commit ce003bf

Please sign in to comment.