Skip to content

Commit f240fef

Browse files
[Crowdstrike Falcon] Fix parse of CommandLine in Falcon pipeline (elastic#4758)
* Fix parse of CommandLine in Falcon pipeline Closes elastic#4746 * Bump up the version * Revert the test case * Add a new test case
1 parent b3d514d commit f240fef

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

packages/crowdstrike/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.8.2"
3+
changes:
4+
- description: Fix parse of CommandLine in Falcon pipeline
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/4758
27
- version: "1.8.1"
38
changes:
49
- description: Fix parse of flattened `process` fields in Falcon data stream.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"event": {
3+
"CommandLine": "here are two spaces-> <-. see https://github.com/elastic/integrations/issues/4746"
4+
}
5+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"expected": [
3+
{
4+
"crowdstrike": {
5+
"event": {
6+
"CommandLine": "here are two spaces-> <-. see https://github.com/elastic/integrations/issues/4746"
7+
}
8+
},
9+
"ecs": {
10+
"version": "8.5.0"
11+
},
12+
"event": {
13+
"original": "{\n \"event\": {\n \"CommandLine\": \"here are two spaces-> <-. see https://github.com/elastic/integrations/issues/4746\"\n }\n}",
14+
"outcome": "unknown"
15+
},
16+
"process": {
17+
"args": [
18+
"here",
19+
"are",
20+
"two",
21+
"spaces->",
22+
"<-.",
23+
"see",
24+
"https://github.com/elastic/integrations/issues/4746"
25+
],
26+
"command_line": "here are two spaces-> <-. see https://github.com/elastic/integrations/issues/4746",
27+
"executable": "here"
28+
},
29+
"tags": [
30+
"preserve_original_event"
31+
]
32+
}
33+
]
34+
}

packages/crowdstrike/data_stream/falcon/elasticsearch/ingest_pipeline/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ processors:
309309
commandLine = commandLine.trim();
310310
311311
if (commandLine != "") {
312-
def args = Arrays.asList(/ /.split(commandLine));
312+
def args = new ArrayList(Arrays.asList(/ /.split(commandLine)));
313313
args.removeIf(arg -> arg == "");
314314
315315
ctx.process = [

packages/crowdstrike/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: crowdstrike
22
title: CrowdStrike
3-
version: "1.8.1"
3+
version: "1.8.2"
44
description: Collect logs from Crowdstrike with Elastic Agent.
55
type: integration
66
format_version: 1.0.0

0 commit comments

Comments
 (0)