fix(aws): break loop after FAIL in SQS and SNS checks (#3618)

This commit is contained in:
Kay Agahd
2024-03-27 12:03:04 +00:00
committed by GitHub
parent 98cb4fa2cb
commit dabb2acfcc
2 changed files with 3 additions and 0 deletions
@@ -43,6 +43,7 @@ class sns_topics_not_publicly_accessible(Check):
else:
report.status = "FAIL"
report.status_extended = f"SNS topic {topic.name} is public because its policy allows public access."
break
findings.append(report)
@@ -41,9 +41,11 @@ class sqs_queues_not_publicly_accessible(Check):
else:
report.status = "FAIL"
report.status_extended = f"SQS queue {queue.id} is public because its policy allows public access, and the condition does not limit access to resources within the same account."
break
else:
report.status = "FAIL"
report.status_extended = f"SQS queue {queue.id} is public because its policy allows public access."
break
findings.append(report)
return findings