Created
February 5, 2020 19:51
-
-
Save coingraham/b8ff7ea0a43041750254d11eba2e9d76 to your computer and use it in GitHub Desktop.
guard duty cloud custodian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
policies: | |
- name: ec2-guard-remediate | |
resource: ec2 | |
mode: | |
role: arn:aws:iam::{account_id}:role/CustodianPolicyExecution | |
type: guard-duty | |
filters: | |
# Filter for medium and high severity events | |
- type: event | |
key: detail.severity | |
op: gte | |
value: 4.5 | |
actions: | |
- stop | |
- name: iam-guard-remediate | |
resource: iam-user | |
mode: | |
role: arn:aws:iam::{account_id}:role/CustodianPolicyExecution | |
type: guard-duty | |
filters: | |
# Only a particular type of event, go ahead and remove keys | |
- type: event | |
key: detail.type | |
value: "UnauthorizedAccess:IAMUser/TorIPCaller" | |
actions: | |
- remove-keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment