updated template

patch-12
Prince Chaddha 2024-10-28 14:10:05 +05:30
parent d9a40f5fa6
commit 4db79f8d10
3 changed files with 7 additions and 26 deletions

View File

@ -1,7 +1,7 @@
id: guardduty-findings id: guardduty-findings
info: info:
name: GuardDuty Findings name: Open GuardDuty Findings
author: DhiyaneshDK author: DhiyaneshDK
severity: medium severity: medium
description: | description: |
@ -23,10 +23,6 @@ flow: |
for(let DetectorIds of iterate(template.detectors)){ for(let DetectorIds of iterate(template.detectors)){
set("detector", DetectorIds) set("detector", DetectorIds)
code(2)} code(2)}
for(let FindingIds of iterate(template.findings)){
set("finding", FindingIds)
code(3)
}
self-contained: true self-contained: true
@ -50,27 +46,12 @@ code:
source: | source: |
aws guardduty list-findings --region $region --detector-id $detector --query 'FindingIds' --output json 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: matchers:
- type: word - type: regex
words: regex:
- '"Title":' - '\"(.*)\"'
- '"Type":'
condition: and
extractors: extractors:
- type: dsl - type: dsl
dsl: dsl:
- '"GuardDuty Findings " + finding + " is present"' - '"The AWS account has open GuardDuty Findings"'

View File

@ -55,4 +55,4 @@ code:
extractors: extractors:
- type: dsl - type: dsl
dsl: dsl:
- '"GuardDuty Malware Protection " + detector + " is Disabled"' - '"GuardDuty Malware Protection " + detector + " is Disabled"'

View File

@ -55,4 +55,4 @@ code:
extractors: extractors:
- type: dsl - type: dsl
dsl: dsl:
- '"GuardDuty S3 Protection " + detector + " is Disabled"' - '"GuardDuty S3 Protection " + detector + " is Disabled"'