Skip to content

Commit 368710b

Browse files
authored
bitdefender: ensure remediation actions are correlated with their file paths (#11013)
The .filePaths, .fileSizes and .remediationActions are correlated arrays, so ensure that empty actions are not removed from the array to maintain their cardinality relationships.
1 parent 1573efb commit 368710b

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed

packages/bitdefender/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: "2.1.1"
3+
changes:
4+
- description: Ensure remediation actions are correlated with their file paths.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/11013
27
- version: "2.1.0"
38
changes:
49
- description: "Allow @custom pipeline access to event.original without setting preserve_original_event."

packages/bitdefender/data_stream/push_notifications/_dev/test/pipeline/test-push-notification-jsonrpc.json-expected.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,6 +1612,7 @@
16121612
"module": "network-sandboxing",
16131613
"remediationActions": [
16141614
"1",
1615+
"-",
16151616
"1"
16161617
],
16171618
"threatType": "RANSOMWARE"

packages/bitdefender/data_stream/push_notifications/_dev/test/pipeline/test-push-notification.json-expected.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@
953953
"module": "network-sandboxing",
954954
"remediationActions": [
955955
"1",
956+
"-",
956957
"1"
957958
],
958959
"threatType": "RANSOMWARE"

packages/bitdefender/data_stream/push_notifications/elasticsearch/ingest_pipeline/default.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,13 @@ processors:
15371537
}
15381538
return false;
15391539
}
1540+
// Prevent empty fields in correlated arrays from being removed.
1541+
// The first two cases should never happen, but are included
1542+
// defensively. The remediationActions elements may be validly
1543+
// empty.
1544+
ctx.bitdefender?.event?.filePath?.replaceAll(e -> e == "" ? "-" : e);
1545+
ctx.bitdefender?.event?.fileSizes?.replaceAll(e -> e == "" ? "-" : e);
1546+
ctx.bitdefender?.event?.remediationActions?.replaceAll(e -> e == "" ? "-" : e);
15401547
dropEmptyFields(ctx);
15411548
15421549
- remove:

packages/bitdefender/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.2"
22
name: bitdefender
33
title: "BitDefender"
4-
version: "2.1.0"
4+
version: "2.1.1"
55
source:
66
license: "Elastic-2.0"
77
description: "Ingest BitDefender GravityZone logs and data"

0 commit comments

Comments
 (0)