S3 Lockout check improvements based on PR feedback 2/2
MODIFY
checkov/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py
checkov/terraform/checks/resource/aws/S3ProtectAgainstPolicyLockout.py
@@ -27,11 +27,7 @@ class S3ProtectAgainstPolicyLockout(BaseResourceCheck):
if 'NotAction' in statement.keys():
continue
- if 'Effect' not in statement.keys():
- # Defaults to allow if doesn't exist.
- continue
-
- if statement['Effect'] == 'Allow':
+ if statement.get('Effect') != 'Deny':
continue
principal = statement['Principal']

S3 Lockout check improvements based on PR feedback 2/2