Skip to content

Commit c8cd89b

Browse files
authored
ti_misp: harmonise distribution type to long (#5908)
There was a type mapping conflict between misp.event.distribution in the two datastreams. The numeric type was chosen over the keyword since in the MISP documentation the distribution value is an ordered entity, so this make the fields use as such possible in ES.
1 parent d3bdb16 commit c8cd89b

File tree

12 files changed

+86
-65
lines changed

12 files changed

+86
-65
lines changed

packages/ti_misp/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.12.1"
3+
changes:
4+
- description: Harmonise distribution fields to type long.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/5908
27
- version: "1.12.0"
38
changes:
49
- description: Add Attributes datastream

packages/ti_misp/data_stream/threat/_dev/test/pipeline/test-misp-attributes-ndjson.log-expected.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"attribute_count": 1,
3232
"date": "2021-05-21",
3333
"disable_correlation": false,
34-
"distribution": "1",
34+
"distribution": 1,
3535
"extends_uuid": "",
3636
"id": "3631",
3737
"info": "Test event 1 just atrributes",
@@ -108,7 +108,7 @@
108108
"attribute_count": 4,
109109
"date": "2021-05-21",
110110
"disable_correlation": false,
111-
"distribution": "1",
111+
"distribution": 1,
112112
"extends_uuid": "",
113113
"id": "3632",
114114
"info": "Test event 2 just more atrributes",
@@ -185,7 +185,7 @@
185185
"attribute_count": 4,
186186
"date": "2021-05-21",
187187
"disable_correlation": false,
188-
"distribution": "1",
188+
"distribution": 1,
189189
"extends_uuid": "",
190190
"id": "3632",
191191
"info": "Test event 2 just more atrributes",
@@ -260,7 +260,7 @@
260260
"attribute_count": 4,
261261
"date": "2021-05-21",
262262
"disable_correlation": false,
263-
"distribution": "1",
263+
"distribution": 1,
264264
"extends_uuid": "",
265265
"id": "3632",
266266
"info": "Test event 2 just more atrributes",
@@ -333,7 +333,7 @@
333333
"attribute_count": 4,
334334
"date": "2021-05-21",
335335
"disable_correlation": false,
336-
"distribution": "1",
336+
"distribution": 1,
337337
"extends_uuid": "",
338338
"id": "3632",
339339
"info": "Test event 2 just more atrributes",
@@ -426,7 +426,7 @@
426426
"attribute_count": 6,
427427
"date": "2021-05-21",
428428
"disable_correlation": false,
429-
"distribution": "1",
429+
"distribution": 1,
430430
"extends_uuid": "",
431431
"id": "3633",
432432
"info": "Test event 3 objects and attributes",
@@ -517,7 +517,7 @@
517517
"attribute_count": 6,
518518
"date": "2021-05-21",
519519
"disable_correlation": false,
520-
"distribution": "1",
520+
"distribution": 1,
521521
"extends_uuid": "",
522522
"id": "3633",
523523
"info": "Test event 3 objects and attributes",
@@ -607,7 +607,7 @@
607607
"attribute_count": 6,
608608
"date": "2021-05-21",
609609
"disable_correlation": false,
610-
"distribution": "1",
610+
"distribution": 1,
611611
"extends_uuid": "",
612612
"id": "3633",
613613
"info": "Test event 3 objects and attributes",
@@ -703,7 +703,7 @@
703703
"attribute_count": 6,
704704
"date": "2021-05-21",
705705
"disable_correlation": false,
706-
"distribution": "1",
706+
"distribution": 1,
707707
"extends_uuid": "",
708708
"id": "3633",
709709
"info": "Test event 3 objects and attributes",
@@ -799,7 +799,7 @@
799799
"attribute_count": 6,
800800
"date": "2021-05-21",
801801
"disable_correlation": false,
802-
"distribution": "1",
802+
"distribution": 1,
803803
"extends_uuid": "",
804804
"id": "3633",
805805
"info": "Test event 3 objects and attributes",
@@ -876,7 +876,7 @@
876876
"attribute_count": 3,
877877
"date": "2021-05-21",
878878
"disable_correlation": false,
879-
"distribution": "1",
879+
"distribution": 1,
880880
"extends_uuid": "",
881881
"id": "3634",
882882
"info": "Test event 4 with object",
@@ -948,7 +948,7 @@
948948
"attribute_count": 3,
949949
"date": "2021-05-21",
950950
"disable_correlation": false,
951-
"distribution": "1",
951+
"distribution": 1,
952952
"extends_uuid": "",
953953
"id": "3634",
954954
"info": "Test event 4 with object",
@@ -1026,7 +1026,7 @@
10261026
"attribute_count": 3,
10271027
"date": "2021-05-21",
10281028
"disable_correlation": false,
1029-
"distribution": "1",
1029+
"distribution": 1,
10301030
"extends_uuid": "",
10311031
"id": "3634",
10321032
"info": "Test event 4 with object",
@@ -1103,7 +1103,7 @@
11031103
"attribute_count": 5,
11041104
"date": "2021-05-21",
11051105
"disable_correlation": false,
1106-
"distribution": "1",
1106+
"distribution": 1,
11071107
"extends_uuid": "",
11081108
"id": "3635",
11091109
"info": "Test event 5 with an object",
@@ -1176,7 +1176,7 @@
11761176
"attribute_count": 5,
11771177
"date": "2021-05-21",
11781178
"disable_correlation": false,
1179-
"distribution": "1",
1179+
"distribution": 1,
11801180
"extends_uuid": "",
11811181
"id": "3635",
11821182
"info": "Test event 5 with an object",
@@ -1249,7 +1249,7 @@
12491249
"attribute_count": 5,
12501250
"date": "2021-05-21",
12511251
"disable_correlation": false,
1252-
"distribution": "1",
1252+
"distribution": 1,
12531253
"extends_uuid": "",
12541254
"id": "3635",
12551255
"info": "Test event 5 with an object",
@@ -1321,7 +1321,7 @@
13211321
"attribute_count": 5,
13221322
"date": "2021-05-21",
13231323
"disable_correlation": false,
1324-
"distribution": "1",
1324+
"distribution": 1,
13251325
"extends_uuid": "",
13261326
"id": "3635",
13271327
"info": "Test event 5 with an object",
@@ -1399,7 +1399,7 @@
13991399
"attribute_count": 5,
14001400
"date": "2021-05-21",
14011401
"disable_correlation": false,
1402-
"distribution": "1",
1402+
"distribution": 1,
14031403
"extends_uuid": "",
14041404
"id": "3635",
14051405
"info": "Test event 5 with an object",
@@ -1494,7 +1494,7 @@
14941494
"attribute_count": 9,
14951495
"date": "2021-05-28",
14961496
"disable_correlation": false,
1497-
"distribution": "0",
1497+
"distribution": 0,
14981498
"extends_uuid": "",
14991499
"id": "3636",
15001500
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -1585,7 +1585,7 @@
15851585
"attribute_count": 9,
15861586
"date": "2021-05-28",
15871587
"disable_correlation": false,
1588-
"distribution": "0",
1588+
"distribution": 0,
15891589
"extends_uuid": "",
15901590
"id": "3636",
15911591
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -1676,7 +1676,7 @@
16761676
"attribute_count": 9,
16771677
"date": "2021-05-28",
16781678
"disable_correlation": false,
1679-
"distribution": "0",
1679+
"distribution": 0,
16801680
"extends_uuid": "",
16811681
"id": "3636",
16821682
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -1767,7 +1767,7 @@
17671767
"attribute_count": 9,
17681768
"date": "2021-05-28",
17691769
"disable_correlation": false,
1770-
"distribution": "0",
1770+
"distribution": 0,
17711771
"extends_uuid": "",
17721772
"id": "3636",
17731773
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -1858,7 +1858,7 @@
18581858
"attribute_count": 9,
18591859
"date": "2021-05-28",
18601860
"disable_correlation": false,
1861-
"distribution": "0",
1861+
"distribution": 0,
18621862
"extends_uuid": "",
18631863
"id": "3636",
18641864
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -1948,7 +1948,7 @@
19481948
"attribute_count": 9,
19491949
"date": "2021-05-28",
19501950
"disable_correlation": false,
1951-
"distribution": "0",
1951+
"distribution": 0,
19521952
"extends_uuid": "",
19531953
"id": "3636",
19541954
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -2044,7 +2044,7 @@
20442044
"attribute_count": 9,
20452045
"date": "2021-05-28",
20462046
"disable_correlation": false,
2047-
"distribution": "0",
2047+
"distribution": 0,
20482048
"extends_uuid": "",
20492049
"id": "3636",
20502050
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -2140,7 +2140,7 @@
21402140
"attribute_count": 9,
21412141
"date": "2021-05-28",
21422142
"disable_correlation": false,
2143-
"distribution": "0",
2143+
"distribution": 0,
21442144
"extends_uuid": "",
21452145
"id": "3636",
21462146
"info": "Test event 6 with multiple objects and multiple attributes",

packages/ti_misp/data_stream/threat/_dev/test/pipeline/test-misp-long-ndjson.log-expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"attribute_count": 9,
5151
"date": "2021-05-28",
5252
"disable_correlation": false,
53-
"distribution": "0",
53+
"distribution": 0,
5454
"extends_uuid": "",
5555
"id": "3636",
5656
"info": "Test event 6 with multiple objects and multiple attributes",
@@ -136,7 +136,7 @@
136136
"attribute_count": 9,
137137
"date": "2021-05-28",
138138
"disable_correlation": false,
139-
"distribution": "0",
139+
"distribution": 0,
140140
"extends_uuid": "",
141141
"id": "3636",
142142
"info": "Test event 6 with multiple objects and multiple attributes",

packages/ti_misp/data_stream/threat/_dev/test/pipeline/test-misp-sample-ndjson.log-expected.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"attribute_count": 7,
3232
"date": "2017-08-25",
3333
"disable_correlation": false,
34-
"distribution": "3",
34+
"distribution": 3,
3535
"extends_uuid": "",
3636
"id": "5",
3737
"info": "OSINT - New Arena Crysis Ransomware Variant Released",
@@ -112,7 +112,7 @@
112112
"attribute_count": 7,
113113
"date": "2017-08-25",
114114
"disable_correlation": false,
115-
"distribution": "3",
115+
"distribution": 3,
116116
"extends_uuid": "",
117117
"id": "5",
118118
"info": "OSINT - New Arena Crysis Ransomware Variant Released",
@@ -192,7 +192,7 @@
192192
"attribute_count": 100,
193193
"date": "2017-03-30",
194194
"disable_correlation": false,
195-
"distribution": "3",
195+
"distribution": 3,
196196
"extends_uuid": "",
197197
"id": "4",
198198
"info": "OSINT - Carbon Paper: Peering into Turla’s second stage backdoor",
@@ -272,7 +272,7 @@
272272
"attribute_count": 29,
273273
"date": "2014-10-03",
274274
"disable_correlation": false,
275-
"distribution": "3",
275+
"distribution": 3,
276276
"extends_uuid": "",
277277
"id": "2",
278278
"info": "OSINT New Indicators of Compromise for APT Group Nitro Uncovered blog post by Palo Alto Networks",
@@ -350,7 +350,7 @@
350350
"attribute_count": 29,
351351
"date": "2014-10-03",
352352
"disable_correlation": false,
353-
"distribution": "3",
353+
"distribution": 3,
354354
"extends_uuid": "",
355355
"id": "2",
356356
"info": "OSINT New Indicators of Compromise for APT Group Nitro Uncovered blog post by Palo Alto Networks",
@@ -424,7 +424,7 @@
424424
"attribute_count": 29,
425425
"date": "2014-10-03",
426426
"disable_correlation": false,
427-
"distribution": "3",
427+
"distribution": 3,
428428
"extends_uuid": "",
429429
"id": "2",
430430
"info": "OSINT New Indicators of Compromise for APT Group Nitro Uncovered blog post by Palo Alto Networks",
@@ -501,7 +501,7 @@
501501
"attribute_count": 29,
502502
"date": "2014-10-03",
503503
"disable_correlation": false,
504-
"distribution": "3",
504+
"distribution": 3,
505505
"extends_uuid": "",
506506
"id": "2",
507507
"info": "OSINT New Indicators of Compromise for APT Group Nitro Uncovered blog post by Palo Alto Networks",
@@ -573,7 +573,7 @@
573573
"attribute_count": 29,
574574
"date": "2014-10-03",
575575
"disable_correlation": false,
576-
"distribution": "3",
576+
"distribution": 3,
577577
"extends_uuid": "",
578578
"id": "2",
579579
"info": "OSINT New Indicators of Compromise for APT Group Nitro Uncovered blog post by Palo Alto Networks",
@@ -651,7 +651,7 @@
651651
"attribute_count": 29,
652652
"date": "2014-10-03",
653653
"disable_correlation": false,
654-
"distribution": "3",
654+
"distribution": 3,
655655
"extends_uuid": "",
656656
"id": "2",
657657
"info": "OSINT New Indicators of Compromise for APT Group Nitro Uncovered blog post by Palo Alto Networks",
@@ -727,7 +727,7 @@
727727
"attribute_count": 61,
728728
"date": "2018-01-08",
729729
"disable_correlation": false,
730-
"distribution": "3",
730+
"distribution": 3,
731731
"extends_uuid": "",
732732
"id": "158",
733733
"info": "Turla: Mosquito Whitepaper",
@@ -809,7 +809,7 @@
809809
"attribute_count": 61,
810810
"date": "2018-01-08",
811811
"disable_correlation": false,
812-
"distribution": "3",
812+
"distribution": 3,
813813
"extends_uuid": "",
814814
"id": "158",
815815
"info": "Turla: Mosquito Whitepaper",
@@ -883,7 +883,7 @@
883883
"attribute_count": 61,
884884
"date": "2018-01-08",
885885
"disable_correlation": false,
886-
"distribution": "3",
886+
"distribution": 3,
887887
"extends_uuid": "",
888888
"id": "158",
889889
"info": "Turla: Mosquito Whitepaper",
@@ -963,7 +963,7 @@
963963
"attribute_count": 133,
964964
"date": "2015-12-08",
965965
"disable_correlation": false,
966-
"distribution": "3",
966+
"distribution": 3,
967967
"extends_uuid": "",
968968
"id": "22",
969969
"info": "Packrat: Seven Years of a South American Threat Actor",
@@ -1038,7 +1038,7 @@
10381038
"attribute_count": 133,
10391039
"date": "2015-12-08",
10401040
"disable_correlation": false,
1041-
"distribution": "3",
1041+
"distribution": 3,
10421042
"extends_uuid": "",
10431043
"id": "22",
10441044
"info": "Packrat: Seven Years of a South American Threat Actor",
@@ -1113,7 +1113,7 @@
11131113
"attribute_count": 15,
11141114
"date": "2020-12-09",
11151115
"disable_correlation": false,
1116-
"distribution": "3",
1116+
"distribution": 3,
11171117
"extends_uuid": "",
11181118
"id": "10",
11191119
"info": "Recent Qakbot (Qbot) activity",

0 commit comments

Comments
 (0)