Skip to content

Commit 08d6de5

Browse files
Fix error handling for machine data stream and ensure parameter is correctly formatted in vulnerability data stream
1 parent 55439b6 commit 08d6de5

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

packages/microsoft_defender_endpoint/changelog.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# newer versions go on top
2+
- version: "3.1.1"
3+
changes:
4+
- description: Ensure large `$skip` API parameter values are correctly formatted in `vulnerability` data stream.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/1
7+
- description: 'Enhanced error handling in the CEL program for API calls to prevent "no such key: page_size" errors in the machine data stream.'
8+
type: bugfix
9+
link: https://github.com/elastic/integrations/pull/1
210
- version: "3.1.0"
311
changes:
412
- description: Add `vulnerability_workflow` sub category label.

packages/microsoft_defender_endpoint/data_stream/machine/agent/stream/cel.yml.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ program: |
4949
),
5050
},
5151
},
52+
"page_size": state.page_size,
5253
"want_more": false,
5354
}
5455
)

packages/microsoft_defender_endpoint/data_stream/vulnerability/agent/stream/cel.yml.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ program: |-
6060
"GET",
6161
state.url.trim_right("/") + "/api/vulnerabilities/machinesVulnerabilities?" + {
6262
"$top": [string(state.config.product_batch_size)],
63-
"$skip": [string(state.product_skip)],
63+
"$skip": [string(int(state.product_skip))],
6464
}.format_query()
6565
).do_request().as(productResp, (productResp.StatusCode == 200) ?
6666
productResp.Body.decode_json().as(productBody,
@@ -119,7 +119,7 @@ program: |-
119119
"GET",
120120
state.url.trim_right("/") + "/api/machines?" + {
121121
"$top": [string(state.config.machine_batch_size)],
122-
"$skip": [string(res.machine_skip)],
122+
"$skip": [string(int(res.machine_skip))],
123123
}.format_query()
124124
).do_request().as(machineResp, (machineResp.StatusCode == 200) ?
125125
machineResp.Body.decode_json().as(machineBody,
@@ -182,7 +182,7 @@ program: |-
182182
"GET",
183183
state.url.trim_right("/") + "/api/vulnerabilities?" + {
184184
"$top": [string(state.config.vulnerabilities_batch_size)],
185-
"$skip": [string(res.vulnerability_skip)],
185+
"$skip": [string(int(res.vulnerability_skip))],
186186
}.format_query()
187187
).do_request().as(vulnerabilityResp, (vulnerabilityResp.StatusCode == 200) ?
188188
vulnerabilityResp.Body.decode_json().as(vulnerabilityBody,

packages/microsoft_defender_endpoint/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: microsoft_defender_endpoint
33
title: Microsoft Defender for Endpoint
4-
version: "3.1.0"
4+
version: "3.1.1"
55
description: Collect logs from Microsoft Defender for Endpoint with Elastic Agent.
66
categories:
77
- security

0 commit comments

Comments
 (0)