-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtriage-linux.ssm.yaml
56 lines (56 loc) · 1.55 KB
/
triage-linux.ssm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
schemaVersion: '0.3'
description: |-
**Security incident response automation document for Linux instances**
parameters:
instanceID:
type: String
description: EC2 instance ID to collect triage data from
caseNum:
type: String
description: Case number
bucket:
type: String
description: Output bucket for triage results
mainSteps:
- name: runCommandDocument
action: aws:runCommand
inputs:
DocumentName: triage-linux-command
InstanceIds:
- '{{ instanceID }}'
Parameters:
caseNum: '{{ caseNum }}'
bucket: '{{ bucket }}'
instanceID: '{{ instanceID }}'
- name: update_triage_tag
action: aws:branch
inputs:
Choices:
- Variable: '{{ runCommandDocument.Status }}'
StringEquals: Success
NextStep: createSuccessTag
- Variable: '{{ runCommandDocument.Status }}'
StringEquals: Failed
NextStep: createFailTag
- name: createSuccessTag
action: aws:createTags
description: update triage status tag
inputs:
ResourceType: EC2
ResourceIds:
- '{{ instanceID }}'
Tags:
- Key: IR_Triage_Status
Value: Complete
isEnd: true
- name: createFailTag
action: aws:createTags
description: update triage status tag
inputs:
ResourceType: EC2
ResourceIds:
- '{{ instanceID }}'
Tags:
- Key: IR_Triage_Status
Value: Failed
isEnd: true