Skip to content

Commit 9e09eb3

Browse files
authored
microsoft_defender_endpoint: ensure $skip parameter is correctly formatted (#15471)
microsoft_defender_endpoint: ensure $skip parameter is correctly formatted The values used to populate this parameter can be greater than the cutover to e-notation for doubles, so convert to int before converting to string. Fix is similar to #15392 as it the same API and CEL program.
1 parent f56f971 commit 9e09eb3

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/microsoft_defender_endpoint/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: "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/15471
27
- version: "3.1.0"
38
changes:
49
- description: Add `vulnerability_workflow` sub category label.

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)