Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
feat: Support Inspector 2
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittig committed Jul 10, 2023
1 parent db66b9b commit f2de4b8
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions marbot.yml
Expand Up @@ -71,6 +71,7 @@ Metadata:
- AppFlowFailed
- EC2FleetFailed
- ElasticBeanstalkFailed
- Inspector2Finding
- Label:
default: 'Notifications'
Parameters:
Expand Down Expand Up @@ -375,6 +376,11 @@ Parameters:
Type: String
Default: true
AllowedValues: [true, false]
Inspector2Finding:
Description: 'Receive an alert, if an Inspector2 finding is created.'
Type: String
Default: true
AllowedValues: [true, false]
Conditions:
NorthVirginia: !Equals [!Ref 'AWS::Region', 'us-east-1']
TestEnabled: !Equals [!Ref Test, 'true']
Expand Down Expand Up @@ -439,6 +445,7 @@ Conditions:
EC2FleetFailedEnabled: !Equals [!Ref EC2FleetFailed, 'true']
ECSDeploymentNotificationsEnabled: !Equals [!Ref ECSDeploymentNotifications, 'true']
ElasticBeanstalkFailedEnabled: !Equals [!Ref ElasticBeanstalkFailed, 'true']
Inspector2FindingEnabled: !Equals [!Ref Inspector2Finding, 'true']
Resources:
##########################################################################
# #
Expand Down Expand Up @@ -1705,7 +1712,7 @@ Resources:
DependsOn: TopicEndpointSubscription
Type: 'AWS::Events::Rule'
Properties:
Description: 'Findings from AWS ECR Image Scans. (created by marbot)'
Description: 'Findings (severity >= medium) from AWS ECR Image Scans. (created by marbot)'
EventPattern:
source:
- 'aws.ecr'
Expand Down Expand Up @@ -1996,6 +2003,29 @@ Resources:
Targets:
- Arn: !Ref Topic
Id: marbot
Inspector2FindingEvent:
Condition: Inspector2FindingEnabled
DependsOn: TopicEndpointSubscription
Type: 'AWS::Events::Rule'
Properties:
Description: 'Findings (severity >= medium) from Amazon Inspector2. (created by marbot)'
EventPattern:
source:
- 'aws.inspector2'
detail-type:
- 'Inspector2 Finding'
detail:
severity:
- MEDIUM
- HIGH
- CRITICAL
- UNTRIAGED
status:
- ACTIVE
State: ENABLED
Targets:
- Arn: !Ref Topic
Id: marbot
##########################################################################
# #
# TEST #
Expand Down Expand Up @@ -2094,7 +2124,7 @@ Outputs:
Value: 'marbot'
StackVersion:
Description: 'Stack version.'
Value: '3.1.1'
Value: '3.2.0'
TopicName:
Description: 'The name of the SNS topic.'
Value: !GetAtt 'Topic.TopicName'
Expand Down

0 comments on commit f2de4b8

Please sign in to comment.