security: fix all bandit issues

This commit is contained in:
Iain Learmonth 2022-05-16 12:47:40 +01:00
parent c25367d95c
commit 014596d271
5 changed files with 31 additions and 13 deletions

View file

@ -74,7 +74,8 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
"""
def import_state(self, state: Any) -> None:
assert(isinstance(state, dict))
if not isinstance(dict, state):
raise RuntimeError("The Terraform state object returned was not a dict.")
if "child_modules" not in state['values']['root_module']:
# There are no CloudFront proxies deployed to import state for
return