forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-TestIsValueInArray.yml
377 lines (377 loc) · 7.02 KB
/
playbook-TestIsValueInArray.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
id: TestIsValueInArray
version: -1
name: TestIsValueInArray
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: e2f0f3a2-eb36-44e4-83d8-671747784ce7
type: start
task:
id: e2f0f3a2-eb36-44e4-83d8-671747784ce7
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "1"
view: |-
{
"position": {
"x": 450,
"y": -112
}
}
"1":
id: "1"
taskid: fac3fc32-8742-4b7e-8825-c599a9627833
type: regular
task:
id: fac3fc32-8742-4b7e-8825-c599a9627833
version: -1
name: Create array in context
description: Find all users associated with a role
scriptName: Set
type: regular
iscommand: false
brand: Builtin
nexttasks:
'#none#':
- "2"
scriptarguments:
append: ""
key: myArray
roles: ""
value: ${.=function(obj){return ['value1','value2','value3']}(val)}
view: |-
{
"position": {
"x": 450,
"y": 224
}
}
"2":
id: "2"
taskid: 9e2e1318-804a-4921-8378-263b82298222
type: condition
task:
id: 9e2e1318-804a-4921-8378-263b82298222
version: -1
name: Check existing value
description: Look for value in a list
scriptName: IsValueInArray
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "3"
"yes":
- "4"
scriptarguments:
array: ${myArray}
left: ""
list: ${myList}
right: ""
value: value2
view: |-
{
"position": {
"x": 450,
"y": 398
}
}
"3":
id: "3"
taskid: 1e25a61e-2dc9-453c-8e77-358de77b7466
type: regular
task:
id: 1e25a61e-2dc9-453c-8e77-358de77b7466
version: -1
name: Bad...
type: regular
iscommand: false
brand: ""
view: |-
{
"position": {
"x": 22,
"y": 571
}
}
"4":
id: "4"
taskid: bc351afb-8624-44dc-8aad-7c96ee9566ad
type: condition
task:
id: bc351afb-8624-44dc-8aad-7c96ee9566ad
version: -1
name: Check a non exist value
scriptName: IsValueInArray
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "6"
"yes":
- "5"
scriptarguments:
array: ${myArray}
left: ""
list: ${myList}
right: ""
value: value5
view: |-
{
"position": {
"x": 450,
"y": 697
}
}
"5":
id: "5"
taskid: 01f69064-3654-4af6-80a3-5665c404c9ba
type: regular
task:
id: 01f69064-3654-4af6-80a3-5665c404c9ba
version: -1
name: Bad...
type: regular
iscommand: false
brand: ""
view: |-
{
"position": {
"x": 46,
"y": 875
}
}
"6":
id: "6"
taskid: d114f093-6ab6-4f0a-8e71-cc8bf9e17d04
type: condition
task:
id: d114f093-6ab6-4f0a-8e71-cc8bf9e17d04
version: -1
name: 'Check two equal strings '
scriptName: IsValueInArray
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "7"
"yes":
- "8"
scriptarguments:
array: value
left: ""
list: value
right: ""
value: value
view: |-
{
"position": {
"x": 450,
"y": 1012
}
}
"7":
id: "7"
taskid: 35493b65-809a-4b61-8632-ab4ec83589b5
type: regular
task:
id: 35493b65-809a-4b61-8632-ab4ec83589b5
version: -1
name: Bad...
type: regular
iscommand: false
brand: ""
view: |-
{
"position": {
"x": 46,
"y": 1173
}
}
"8":
id: "8"
taskid: 1407ba9c-7f56-44d9-81fc-1eacb6235a9a
type: condition
task:
id: 1407ba9c-7f56-44d9-81fc-1eacb6235a9a
version: -1
name: 'Check two non equal strings '
scriptName: IsValueInArray
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "11"
"yes":
- "9"
scriptarguments:
array: value
left: ""
list: value
right: ""
value: other
view: |-
{
"position": {
"x": 450,
"y": 1351
}
}
"9":
id: "9"
taskid: 4b451ade-dae8-403f-8caf-44fd88d62e91
type: regular
task:
id: 4b451ade-dae8-403f-8caf-44fd88d62e91
version: -1
name: Bad...
type: regular
iscommand: false
brand: ""
view: |-
{
"position": {
"x": 46,
"y": 1519
}
}
"10":
id: "10"
taskid: 96d3f556-19d5-44f1-8bc4-b7807cb80de3
type: regular
task:
id: 96d3f556-19d5-44f1-8bc4-b7807cb80de3
version: -1
name: Close
scriptName: CloseInvestigation
type: regular
iscommand: false
brand: ""
scriptarguments:
notes: ""
reason: ""
view: |-
{
"position": {
"x": 450,
"y": 2430
}
}
"11":
id: "11"
taskid: 275f5466-11e2-4e95-81b6-e150cea4b331
type: condition
task:
id: 275f5466-11e2-4e95-81b6-e150cea4b331
version: -1
name: Check empty array
scriptName: IsValueInArray
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "13"
"yes":
- "12"
scriptarguments:
array: ""
left: ""
list: value
right: ""
value: other
view: |-
{
"position": {
"x": 450,
"y": 1729
}
}
"12":
id: "12"
taskid: 9a4e6353-e317-45aa-86a1-ca03a740485b
type: regular
task:
id: 9a4e6353-e317-45aa-86a1-ca03a740485b
version: -1
name: Bad...
type: regular
iscommand: false
brand: ""
view: |-
{
"position": {
"x": 46,
"y": 1893
}
}
"13":
id: "13"
taskid: ae168c25-afaa-4e35-8d5a-e7ff12f4f49b
type: condition
task:
id: ae168c25-afaa-4e35-8d5a-e7ff12f4f49b
version: -1
name: Check empty value
scriptName: IsValueInArray
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "10"
"yes":
- "14"
scriptarguments:
array: ${myArray}
left: ""
list: value
right: ""
value: ""
view: |-
{
"position": {
"x": 450,
"y": 2056
}
}
"14":
id: "14"
taskid: c18d1e9d-4e7c-4bdc-8183-10207b84930f
type: regular
task:
id: c18d1e9d-4e7c-4bdc-8183-10207b84930f
version: -1
name: Bad...
type: regular
iscommand: false
brand: ""
view: |-
{
"position": {
"x": 46,
"y": 2225
}
}
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 2637,
"width": 808,
"x": 22,
"y": -112
}
}
}
inputs: []