fix(GuardDuty): only execute checks if GuardDuty enabled (#3028)

This commit is contained in:
Sergio Garcia
2023-11-14 14:14:05 +01:00
committed by GitHub
parent f8e713a544
commit 3a3bb44f11
4 changed files with 50 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ class guardduty_centrally_managed(Check):
def execute(self):
findings = []
for detector in guardduty_client.detectors:
if detector.id:
if detector.id and detector.enabled_in_account:
report = Check_Report_AWS(self.metadata())
report.region = detector.region
report.resource_id = detector.id

View File

@@ -6,7 +6,7 @@ class guardduty_no_high_severity_findings(Check):
def execute(self):
findings = []
for detector in guardduty_client.detectors:
if detector.id:
if detector.id and detector.enabled_in_account:
report = Check_Report_AWS(self.metadata())
report.region = detector.region
report.resource_id = detector.id