Skip to content

Commit

Permalink
fix(terraform): Fix CloudArmorWAFACLCVE202144228 check (#3696)
Browse files Browse the repository at this point in the history
TF Check fix
  • Loading branch information
ChanochShayner authored Oct 19, 2022
1 parent b5693f7 commit 5da32ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def scan_resource_conf(self, conf: Dict[str, List[Any]]) -> CheckResult:
match = rule.get("match")
if match:
expr = match[0].get("expr")
if expr and expr[0].get("expression") == ["evaluatePreconfiguredExpr('cve-canary')"]:
if expr and isinstance(expr[0], dict) and expr[0].get("expression") == ["evaluatePreconfiguredExpr('cve-canary')"]:
if rule.get("action") == ["allow"]:
return CheckResult.FAILED
if rule.get("preview") == [True]:
Expand Down

0 comments on commit 5da32ec

Please sign in to comment.