Skip to content

Commit b6c89eb

Browse files
authored
Merge pull request #3 from yannickvr/fixes
fixed some issues
2 parents 6783fd6 + 2a78697 commit b6c89eb

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

custom-policy-crossguard-pkg/pyawsguard/src/pyawsguard/ec2_checks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import datetime
3131
import os
3232

33-
from pyawsguard.metric_object import metric
34-
3533

3634
###################################
3735
# EC2 - Security Groups

custom-policy-crossguard-pkg/pyawsguard/src/pyawsguard/s3_checks.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,11 @@ def s3_public_access_block_validator(args: ResourceValidationArgs, report_violat
5454
# S3 Bucket policy validator
5555
def s3_ssl_requests_validator(args: ResourceValidationArgs, report_violation: ReportViolation):
5656
if args.resource_type == "aws:s3/bucketPolicy:BucketPolicy":
57-
f = open('data.txt', 'w')
5857
if "policy" in args.props:
5958
flag = 0
6059
policy = json.loads(args.props["policy"])
61-
if "Statement" in policy:
60+
if 'Statement' in policy:
6261
for stmt in policy["Statement"]:
63-
print(stmt["Condition"])
64-
print(stmt["Condition"]["Bool"])
6562
if "Condition" in stmt and "Bool" in stmt["Condition"] and "aws:SecureTransport" in stmt["Condition"]["Bool"] and stmt["Condition"]["Bool"]["aws:SecureTransport"] == "false":
6663
flag = 1
6764
break

0 commit comments

Comments
 (0)