diff --git a/cloud/aws/guardduty/guardduty-findings.yaml b/cloud/aws/guardduty/guardduty-findings.yaml index 8401318ea9..5db0cc8d89 100644 --- a/cloud/aws/guardduty/guardduty-findings.yaml +++ b/cloud/aws/guardduty/guardduty-findings.yaml @@ -1,7 +1,7 @@ id: guardduty-findings info: - name: GuardDuty Findings + name: Open GuardDuty Findings author: DhiyaneshDK severity: medium description: | @@ -23,10 +23,6 @@ flow: | for(let DetectorIds of iterate(template.detectors)){ set("detector", DetectorIds) code(2)} - for(let FindingIds of iterate(template.findings)){ - set("finding", FindingIds) - code(3) - } self-contained: true @@ -50,27 +46,12 @@ code: source: | aws guardduty list-findings --region $region --detector-id $detector --query 'FindingIds' --output json - extractors: - - type: json - name: findings - internal: true - json: - - '.[]' - - - engine: - - sh - - bash - source: | - aws guardduty get-findings --region $region --detector-id $detector --finding-ids $finding --output json - matchers: - - type: word - words: - - '"Title":' - - '"Type":' - condition: and + - type: regex + regex: + - '\"(.*)\"' extractors: - type: dsl dsl: - - '"GuardDuty Findings " + finding + " is present"' \ No newline at end of file + - '"The AWS account has open GuardDuty Findings"' \ No newline at end of file diff --git a/cloud/aws/guardduty/malware-protection-disabled.yaml b/cloud/aws/guardduty/malware-protection-disabled.yaml index 013eaecd30..a78bfb2d63 100644 --- a/cloud/aws/guardduty/malware-protection-disabled.yaml +++ b/cloud/aws/guardduty/malware-protection-disabled.yaml @@ -55,4 +55,4 @@ code: extractors: - type: dsl dsl: - - '"GuardDuty Malware Protection " + detector + " is Disabled"' + - '"GuardDuty Malware Protection " + detector + " is Disabled"' \ No newline at end of file diff --git a/cloud/aws/guardduty/s3-protection-disabled.yaml b/cloud/aws/guardduty/s3-protection-disabled.yaml index 44b7113b73..5e86686296 100644 --- a/cloud/aws/guardduty/s3-protection-disabled.yaml +++ b/cloud/aws/guardduty/s3-protection-disabled.yaml @@ -55,4 +55,4 @@ code: extractors: - type: dsl dsl: - - '"GuardDuty S3 Protection " + detector + " is Disabled"' + - '"GuardDuty S3 Protection " + detector + " is Disabled"' \ No newline at end of file