forked from Shuffle/python-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.yaml
More file actions
1453 lines (1442 loc) · 45.9 KB
/
Copy pathapi.yaml
File metadata and controls
1453 lines (1442 loc) · 45.9 KB
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
app_version: 1.2.0
name: Shuffle Tools
description: A tool app for Shuffle. Gives access to most missing features along with Liquid.
tags:
- Testing
- Shuffle
categories:
- Other
contact_info:
name: "@frikkylikeme"
url: https://shuffler.io
email: frikky@shuffler.io
actions:
- name: repeat_back_to_me
description: Repeats the call parameter
parameters:
- name: call
description: The message to repeat
required: true
multiline: true
example: "REPEATING: Hello world"
schema:
type: string
returns:
schema:
type: string
- name: execute_python
description: Runs python with the data input. Any prints will be returned.
parameters:
- name: code
description: The code to run. Can be a file ID from within Shuffle.
required: true
multiline: true
example: print("hello world")
schema:
type: string
- name: search_datastore_category
description: Checks whether keys within a list are already in datastore, and returns whether they existed or not. They will be automatically appended.
parameters:
- name: input_list
description: The list to check from. Don't use .# in this.
required: true
multiline: true
example: '[{"data": "1.2.3.4"}, {"data": "1.2.3.5"}]'
schema:
type: string
- name: key
description: The key to use for deduplication. MUST be a part of each key in the input_list.
required: true
multiline: false
example: "ticketname+username"
schema:
type: string
- name: category
description: The category you want to upload to. This can be a new category, or an existing one.
required: true
multiline: false
example: "tickets"
schema:
type: string
- name: get_datastore_value
description: Get a value saved to your organization in Shuffle
parameters:
- name: key
description: The key to get
required: true
multiline: false
example: "timestamp"
schema:
type: string
- name: category
description: The category to get the value from. Not required.
required: false
multiline: false
example: "tickets"
schema:
type: string
returns:
schema:
type: string
- name: set_datastore_value
description: Set a value to be saved to your organization in Shuffle.
parameters:
- name: key
description: The key to set the value for
required: true
multiline: false
example: "timestamp"
schema:
type: string
- name: value
description: The value to set
required: true
multiline: true
example: "1621959545"
schema:
type: string
- name: category
description: The category to get the value from. Not required.
required: false
multiline: false
example: "tickets"
schema:
type: string
returns:
schema:
type: string
- name: delete_datastore_value
description: Delete a value saved to your organization in Shuffle
parameters:
- name: key
description: The key to delete
required: true
multiline: false
example: "timestamp"
schema:
type: string
- name: category
description: The category to get the value from. Not required.
required: false
multiline: false
example: "tickets"
schema:
type: string
returns:
schema:
type: string
- name: send_sms_shuffle
description: Send an SMS from Shuffle
parameters:
- name: apikey
description: Your https://shuffler.io organization apikey
multiline: false
example: "https://shuffler.io apikey"
required: true
schema:
type: string
- name: phone_numbers
description: The receivers of the SMS
multiline: false
example: "+4741323535,+8151023022"
required: true
schema:
type: string
- name: body
description: The SMS to add to the numbers
multiline: true
example: "This is an alert from Shuffle :)"
required: true
schema:
type: string
returns:
schema:
type: string
#- name: send_email_shuffle
# description: Send an email from Shuffle
# parameters:
# - name: apikey
# description: Your https://shuffler.io organization apikey
# multiline: false
# example: "https://shuffler.io apikey"
# required: true
# schema:
# type: string
# - name: recipients
# description: The recipients of the email
# multiline: false
# example: "test@example.com,frikky@shuffler.io"
# required: true
# schema:
# type: string
# - name: subject
# description: The subject to use
# multiline: false
# example: "SOS this is an alert :o"
# required: true
# schema:
# type: string
# - name: body
# description: The body to add to the email
# multiline: true
# example: "This is an email alert from Shuffler.io :)"
# required: true
# schema:
# type: string
# - name: attachments
# description: The ID of files in Shuffle to add as attachments
# multiline: false
# example: "file_id1,file_id2,file_id3"
# required: false
# schema:
# type: string
# returns:
# schema:
# type: string
- name: dedup_and_merge
description: Merges data from multiple apps within a set timeframe. Returns action as SKIPPED if the data is a duplicate. Returns with a list of all data if the data at the end
parameters:
- name: key
description: The key to use for deduplication
required: true
multiline: false
example: "ticketname+username"
schema:
type: string
- name: value
description: The full value of the item
required: true
multiline: true
example: "1208301599081"
schema:
type: string
- name: timeout
description: The timeout before returning
required: true
options:
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 15
- 20
- 25
multiline: false
example: "1"
schema:
type: string
- name: set_skipped
description: Whether to set the action SKIPPED or not IF it matches another workflow in the same timeframe
required: true
options:
- true
- false
multiline: false
example: "true"
schema:
type: string
- name: filter_list
description: Takes a list and filters based on your data
skip_multicheck: true
parameters:
- name: input_list
description: The list to filter from. Don't use .# into this.
required: true
multiline: false
example: '[{"data": "1.2.3.4"}, {"data": "1.2.3.5"}]'
schema:
type: string
- name: field
description: The field to check in the input list
required: true
multiline: false
example: "data"
schema:
type: string
- name: check
description: Type of check
required: false
example: "equals"
options:
- equals
- 'equals any of'
- 'larger than'
- 'less than'
- is empty
- contains
- contains any of
- in cache key
- starts with
- ends with
- field is unique
- files by extension
schema:
type: string
- name: value
description: The value to compare with
required: false
multiline: false
example: "1.2.3.4"
schema:
type: string
- name: opposite
description: Whether to add or to NOT add
required: false
options:
- False
- True
multiline: false
example: "false"
schema:
type: string
returns:
schema:
type: string
#- name: multi_list_filter
# description: Takes a list and filters based on your data
# skip_multicheck: true
# parameters:
# - name: input_list
# description: The list to check
# required: true
# multiline: false
# example: '[{"data": "1.2.3.4"}, {"data": "1.2.3.5"}]'
# schema:
# type: string
# - name: field
# description: The field to check
# required: true
# multiline: false
# example: "data"
# schema:
# type: string
# - name: check
# description: Type of check
# required: true
# example: "equals,equals"
# schema:
# type: string
# - name: value
# description: The value to check with
# required: true
# multiline: false
# example: "1.2.3.4"
# schema:
# type: string
# returns:
# schema:
# type: string
- name: parse_ioc
description: "Parse IOC's based on https://github.com/fhightower/ioc-finder. Specify input type to optimize speed: domains, urls, email_addresses, ipv4s, ipv4_cidrs, md5s, sha256s, sha1s, cves and more.."
parameters:
- name: input_string
description: The string to check
required: true
multiline: true
example: "123ijq192.168.3.6kljqwiejs8 https://shuffler.io"
schema:
type: string
- name: input_type
description: The string to check
required: false
multiline: false
example: "domains,urls,email_addresses,ipv4s,ipv4_cidrs,ipv6s,md5s,sha256s,sha1s,cves"
value: "domains,urls,ipv4s,md5s,sha1s,email_addresses"
multiselect: true
schema:
type: string
returns:
schema:
type: string
- name: parse_file_ioc
description: Parse IOC's based on https://github.com/fhightower/ioc-finder
parameters:
- name: file_ids
description: The shuffle file to check
required: true
multiline: false
schema:
type: string
- name: input_type
description: The string to check
required: false
multiline: false
example: "md5s"
schema:
type: string
returns:
schema:
type: string
- name: replace_value
description: Takes a list of values and translates it in your input data
parameters:
- name: input_data
description: The input data to use
required: true
multiline: true
example: Hello this is an md5
schema:
type: string
- name: translate_from
description: The source items to look for
required: true
multiline: false
example: sha256,md5,sha1
schema:
type: string
- name: translate_to
description: The destination data to change to
required: true
multiline: true
example: hash
schema:
type: string
- name: else_value
description: The value to set if it DOESNT match. Default to nothing.
required: false
multiline: false
example:
schema:
type: string
returns:
schema:
type: string
- name: replace_value_from_dictionary
description: Takes a mapping dictionary and translates the input data. This is a search and replace for multiple fields.
parameters:
- name: input_data
description: The input data to use
required: true
multiline: true
example: $exec.field1
schema:
type: string
- name: mapping
description: The mapping dictionary
required: true
multiline: true
example: |
{
"Low": 1,
"Medium": 2,
"High": 3,
}
schema:
type: string
returns:
schema:
type: string
- name: regex_capture_group
description: Returns objects matching the capture group(s)
parameters:
- name: input_data
description: The input data to use
required: true
multiline: true
example: This is some text <with.com> a domain that is with.com
schema:
type: string
- name: regex
description: Your regular expression
multiline: false
example: "some text <[a-zA-Z0-9.]+> a domain"
required: true
schema:
type: string
returns:
schema:
type: string
- name: regex_replace
description: Replace all instances matching a regular expression
parameters:
- name: input_data
description: The input data to use
required: true
multiline: true
example: This is some text <with.com> a domain that is with.com
schema:
type: string
- name: regex
description: Your regular expression
multiline: false
example: "some text <[a-zA-Z0-9.]+> a domain"
required: true
schema:
type: string
- name: replace_string
description: Replacement string (capture groups with \1 \2)
multiline: true
example: "some text <domain was here> a domain"
required: false
schema:
type: string
- name: ignore_case
description: "Make regex case insensitive (Default: False)"
multiline: false
options:
- false
- true
example: "False"
required: false
schema:
type: string
returns:
schema:
type: string
- name: list_file_category_ids
description: Lists the IDs within a File namespace (category)
parameters:
- name: file_category
description: The category to get files from
required: true
multiline: false
example: "default"
schema:
type: string
returns:
schema:
type: string
- name: get_file_value
description: This function is made for reading file(s), printing their data
parameters:
- name: filedata
description: The files
required: true
multiline: false
example: "a2f89576-a9ec-479e-8c83-da69f468c90a"
schema:
type: string
returns:
schema:
type: string
- name: create_file
description: Returns uploaded file data
parameters:
- name: filename
description:
required: true
multiline: false
example: "test.csv"
schema:
type: string
- name: data
description:
required: true
multiline: true
example: "EventID,username\n4137,frikky"
schema:
type: string
- name: category
description: The category the file belongs to
required: false
multiline: false
example: "yara-rules"
schema:
type: string
- name: download_remote_file
description: Downloads a file from a URL
parameters:
- name: url
description:
required: true
multiline: false
example: "https://secure.eicar.org/eicar.com.txt"
schema:
type: string
- name: custom_filename
description:
required: false
multiline: false
example: "newfile.txt"
schema:
type: string
returns:
schema:
type: string
- name: get_file_meta
description: Gets the file meta
parameters:
- name: file_id
description:
required: true
multiline: false
example: ""
schema:
type: string
returns:
schema:
type: string
- name: delete_file
description: Deletes a file based on ID
parameters:
- name: file_id
description:
required: true
multiline: false
example: "Some data to put in the file"
schema:
type: string
returns:
schema:
type: string
- name: extract_archive
description: Extract compressed files, return file ids
parameters:
- name: file_id
description:
required: true
multiline: false
schema:
type: string
- name: fileformat
description:
required: true
multiline: false
options:
- zip
- rar
- 7zip
- tar
- tar.gz
schema:
type: string
- name: password
description:
required: false
multiline: false
schema:
type: string
returns:
schema:
type: string
- name: create_archive
description: Compress files in archive, return archive's file id
parameters:
- name: file_ids
description:
required: true
multiline: true
schema:
type: string
- name: fileformat
description:
required: true
multiline: false
options:
- zip
- 7zip
schema:
type: string
- name: name
description:
required: false
multiline: false
schema:
type: string
- name: password
description:
required: false
multiline: false
schema:
type: string
returns:
schema:
type: string
- name: xml_json_convertor
description: Converts xml or html to json and vice versa.
parameters:
- name: convertto
required: true
multiline: false
options:
- json
- xml
schema:
type: string
- name: data
description:
required: true
multiline: true
example: 'xml data / json data'
schema:
type: string
returns:
schema:
type: string
- name: date_to_epoch
description: 'Converts a date field in a JSON blob to epoch format. Same as {{ "now" | date: "%s" }} in Liquid.'
parameters:
- name: input_data
description: The input data to use
required: true
multiline: true
example: '{\n"currentDateTime": "2010-11-04T04:15:22.123Z"\n}'
schema:
type: dict
- name: date_field
description: The field containing the date to parse
required: true
multiline: false
example: currentDateTime
schema:
type: string
- name: date_format
# yamllint disable-line rule:line-length
description: The datetime format of the field to parse (strftime format).
required: true
multiline: false
example: '%Y-%m-%dT%H:%M:%S.%f%Z'
schema:
type: string
returns:
schema:
type: dict
- name: compare_relative_date
# yamllint disable-line rule:line-length
description: Compares an input date to a relative date and returns a True/False result
parameters:
- name: timestamp
description: The input data to use
required: true
multiline: true
example: 2010-11-04T04:15:22.123Z
schema:
type: string
- name: date_format
description: The format of the input date field (strftime format)
required: true
multiline: false
example: '%Y-%m-%dT%H:%M:%S.%f%Z'
options:
- 'autodetect'
- '%Y-%m-%dT%H:%M%z'
- '%Y-%m-%dT%H:%M:%SZ'
- '%Y-%m-%dT%H:%M:%S%Z'
- '%Y-%m-%dT%H:%M:%S%z'
- '%Y-%m-%dT%H:%M:%S.%f%z'
- '%Y-%m-%d'
- '%H:%M:%S'
- '%s'
schema:
type: string
- name: equality_test
description: How to compare the input date and offset date
required: true
multiline: false
example: '>'
options:
- '>'
- '<'
- '='
- '!='
- '>='
- '<='
schema:
type: string
- name: offset
description: Numeric offset from current time
required: true
multiline: false
example: 60
schema:
type: string
- name: units
description: The units of the provided value
required: true
multiline: false
example: 'seconds'
options:
- seconds
- minutes
- hours
- days
schema:
type: string
- name: direction
description: Whether the comparison should be in the past or future
required: true
multiline: false
example: 'ago'
options:
- ago
- ahead
schema:
type: string
returns:
schema:
type: strings
- name: parse_list
description: Parses a list and returns it as a json object
parameters:
- name: items
description: List of items
required: true
multiline: true
example: shuffler.io,test.com,test.no
schema:
type: string
- name: splitter
description: The splitter to use
required: false
multiline: false
example: ","
schema:
type: string
returns:
schema:
type: string
- name: add_list_to_list
description: Adds items of second list (list_two) to the first one (list_one). Can also append a single item (dict) to a list.
parameters:
- name: list_one
description: The first list
multiline: true
example: "{'key': 'value'}"
required: true
schema:
type: string
- name: list_two
description: The second list to use
multiline: true
required: true
example: "{'key2': 'value2'}"
schema:
type: string
- name: merge_lists
description: Merges two lists of same type AND length.
parameters:
- name: list_one
description: The first list
multiline: true
example: "{'key': 'value'}"
required: true
schema:
type: string
- name: list_two
description: The second list to use
multiline: true
required: true
example: "{'key2': 'value2'}"
schema:
type: string
- name: set_field
description: If items in list 2 are strings, but first is JSON, sets the values to the specified key. Defaults to key "new_shuffle_key"
required: false
example: "json_key"
schema:
type: string
- name: sort_key_list_one
description: Sort by this key before using list one for merging
required: false
example: "json_key"
schema:
type: string
- name: sort_key_list_two
description: Sort by this key before using list two for merging
required: false
example: "json_key"
schema:
type: string
- name: merge_json_objects
description: Merges two lists of same type AND length.
parameters:
- name: list_one
description: The first list
multiline: true
example: "{'key': 'value'}"
required: true
schema:
type: string
- name: list_two
description: The second list to use
multiline: true
required: true
example: "{'key2': 'value2'}"
schema:
type: string
- name: set_field
description: If items in list 2 are strings, but first is JSON, sets the values to the specified key. Defaults to key "new_shuffle_key"
required: false
example: "json_key"
schema:
type: string
- name: sort_key_list_one
description: Sort by this key before using list one for merging
required: false
example: "json_key"
schema:
type: string
- name: sort_key_list_two
description: Sort by this key before using list two for merging
required: false
example: "json_key"
schema:
type: string
- name: diff_lists
description: Diffs two lists of strings or integers and finds what's missing
parameters:
- name: list_one
description: The first list
multiline: true
example: "{'key': 'value'}"
required: true
schema:
type: string
- name: list_two
description: The second list to use
multiline: true
required: true
example: "{'key2': 'value2'}"
schema:
type: string
- name: set_json_key
description: Adds a JSON key to an existing object
parameters:
- name: json_object
description: The object to edit
multiline: true
example: '{"sender": "me@test.com"}'
required: true
schema:
type: string
- name: key
description: The object to add
multiline: false
example: "recipients"
required: true
schema:
type: string
- name: value
description: The value to set it to in the JSON object
multiline: true
required: true
example: "colleague@test.com"
schema:
type: string
- name: delete_json_keys
description: Deletes keys in a json object
parameters:
- name: json_object
description: The object to edit
multiline: true
example: "{'key': 'value', 'key2': 'value2', 'key3': 'value3'}"
required: true
schema:
type: string
- name: keys
description: The key(s) to remove
multiline: true
required: true
example: "key, key3"
schema:
type: string
- name: convert_json_to_tags
description: Creates key:value pairs and
parameters:
- name: json_object
description: The object to make into a key:value pair
multiline: true
example: "{'key': 'value', 'key2': 'value2', 'key3': 'value3'}"
required: true
schema:
type: string
- name: split_value
description: The way to split the values. Defaults to comma.
multiline: false
required: false
example: ","
schema:
type: string
- name: include_key
description: Whether it should include the key or not
options:
- true
- false
schema:
type: string
- name: lowercase
description: Whether it should be lowercase or not
options:
- true
- false
schema:
type: string
#- name: escape_html
# description: Performs HTML escaping on a field. Can be done with Liquid formatting instead!!
# parameters:
# - name: input_data
# description: The input data to use
# required: true
# multiline: true
# example: '<body>hello</body>'
# schema:
# type: string
# returns:
# schema:
# type: string
- name: base64_conversion
description: Encode or decode a Base64 string
parameters:
- name: string
description: string to process
multiline: true
example: "This is a string to be encoded"
required: true
schema:
type: string
- name: operation
description: Choose to encode or decode the string