Skip to content

Commit c78a937

Browse files
committed
m365_defender: fix construction of file.path fields in the incident data stream
The ECS definition states that the file.path field should include the file's basename as well as the directory.
1 parent bea876f commit c78a937

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

packages/m365_defender/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: "5.0.2"
3+
changes:
4+
- description: Fix construction of `file.path` fields in the incident data stream to conform to ECS.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/15728
27
- version: "5.0.1"
38
changes:
49
- description: Update transform to filter out documents containing an error.message from vulnerability latest index

packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log-expected.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"MsSense.exe"
3939
],
4040
"path": [
41-
"C:\\Program Files\\temp"
41+
"C:\\Program Files\\temp\\MsSense.exe"
4242
],
4343
"size": [
4444
6136392
@@ -364,7 +364,7 @@
364364
"MsSense.exe"
365365
],
366366
"path": [
367-
"C:\\Program Files\\temp"
367+
"C:\\Program Files\\temp\\MsSense.exe"
368368
],
369369
"size": [
370370
6136392
@@ -849,7 +849,7 @@
849849
"K3V15.1安装盘访问密码i5fy.zip"
850850
],
851851
"path": [
852-
"E:"
852+
"E:\\K3V15.1安装盘访问密码i5fy.zip"
853853
],
854854
"size": [
855855
36864
@@ -1040,7 +1040,7 @@
10401040
"K3V15.1安装盘访问密码i5fy.zip"
10411041
],
10421042
"path": [
1043-
"E:"
1043+
"E:\\K3V15.1安装盘访问密码i5fy.zip"
10441044
],
10451045
"size": [
10461046
36864
@@ -1345,7 +1345,7 @@
13451345
"PDFpower.exe"
13461346
],
13471347
"path": [
1348-
"C:\\Users\\user6\\Downloads"
1348+
"C:\\Users\\user6\\Downloads\\PDFpower.exe"
13491349
],
13501350
"size": [
13511351
1086184
@@ -1546,7 +1546,7 @@
15461546
"PDFpower.exe"
15471547
],
15481548
"path": [
1549-
"C:\\Users\\user6\\Downloads"
1549+
"C:\\Users\\user6\\Downloads\\PDFpower.exe"
15501550
],
15511551
"size": [
15521552
1086184

packages/m365_defender/data_stream/incident/elasticsearch/ingest_pipeline/default.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,9 +1412,14 @@ processors:
14121412
processor:
14131413
append:
14141414
field: file.path
1415-
value: '{{{_ingest._value.file_details.path}}}'
1415+
value: '{{{_ingest._value.file_details.path}}}\{{{_ingest._value.file_details.name}}}'
14161416
allow_duplicates: false
14171417
ignore_failure: true
1418+
- script:
1419+
tag: script_remove_backslash
1420+
if: ctx.file?.path instanceof List
1421+
source: |-
1422+
ctx.file.path.removeIf(v -> v == '\\');
14181423
- foreach:
14191424
field: json.alerts.evidence
14201425
if: ctx.json?.alerts?.evidence instanceof List

packages/m365_defender/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.4.0"
22
name: m365_defender
33
title: Microsoft Defender XDR
4-
version: "5.0.1"
4+
version: "5.0.2"
55
description: Collect logs from Microsoft Defender XDR with Elastic Agent.
66
categories:
77
- "security"

0 commit comments

Comments
 (0)