Skip to content

Commit

Permalink
Fix flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmithv11 committed Jun 10, 2023
1 parent 2f6181c commit 5bef2fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def __init__(self):
def scan_resource_conf(self, conf):
self.evaluated_keys = ['boot_disk', 'boot_disk/[0]/disk_encryption_key_raw', 'boot_disk/[0]/kms_key_self_link']
if 'boot_disk' in conf.keys() and (('disk_encryption_key_raw' in conf['boot_disk'][0] and
conf['boot_disk'][0]['disk_encryption_key_raw'][0] != None) or
conf['boot_disk'][0]['disk_encryption_key_raw'][0] is not None) or
('kms_key_self_link' in conf['boot_disk'][0] and
conf['boot_disk'][0]['kms_key_self_link'][0] != None)):
conf['boot_disk'][0]['kms_key_self_link'][0] is not None)):
return CheckResult.PASSED
return CheckResult.FAILED

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def scan_resource_conf(self, conf):
self.evaluated_keys.append('service_account/[0]/email')
if re.match(DEFAULT_SERVICE_ACCOUNT, service_account_conf['email'][0]):
if len(service_account_conf['scopes']) > 0 and (FULL_ACCESS_API in service_account_conf['scopes'][0]
or FULL_ACCESS_API2 in service_account_conf['scopes'][0]):
or FULL_ACCESS_API2 in service_account_conf['scopes'][0]):
return CheckResult.FAILED
elif len(service_account_conf['scopes']) > 0 and (FULL_ACCESS_API in service_account_conf['scopes'][0] or
FULL_ACCESS_API2 in service_account_conf['scopes'][0]):
FULL_ACCESS_API2 in service_account_conf['scopes'][0]):
return CheckResult.FAILED
return CheckResult.PASSED

Expand Down

0 comments on commit 5bef2fe

Please sign in to comment.