Skip to content

Commit

Permalink
fix 'got types.Null, expected iterable type' error
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcold committed Sep 11, 2024
1 parent feaf240 commit 34e2102
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions packages/wiz/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.8.1"
changes:
- description: Fix potential `got types.Null, expected iterable type` error.
type: bugfix
link: tba
- version: "1.8.0"
changes:
- description: Add host.name for the vulnerability data stream.
Expand Down
2 changes: 1 addition & 1 deletion packages/wiz/data_stream/audit/agent/stream/cel.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ program: |
}
}.encode_json()
).do_request().as(resp, resp.StatusCode == 200 ?
bytes(resp.Body).decode_json().as(body, has(body.?data.auditLogEntries.nodes) ?
bytes(resp.Body).decode_json().as(body, has(body.?data.auditLogEntries.nodes) && body.data.auditLogEntries.nodes != null ?
{
"events": body.data.auditLogEntries.nodes.map(e, {
"message": e.encode_json(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ program: |
}
}.encode_json()
).do_request().as(resp, resp.StatusCode == 200 ?
bytes(resp.Body).decode_json().as(body, has(body.?data.configurationFindings.nodes) ?
bytes(resp.Body).decode_json().as(body, has(body.?data.configurationFindings.nodes) && body.data.configurationFindings.nodes != null ?
{
"events": body.data.configurationFindings.nodes.map(e, {
"message": e.encode_json(),
Expand Down
2 changes: 1 addition & 1 deletion packages/wiz/data_stream/issue/agent/stream/cel.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ program: |
}
}.encode_json()
).do_request().as(resp, resp.StatusCode == 200 ?
bytes(resp.Body).decode_json().as(body, has(body.?data.issues.nodes) ?
bytes(resp.Body).decode_json().as(body, has(body.?data.issues.nodes) && body.data.issues.nodes != null ?
{
"events": body.data.issues.nodes.map(e, {
"message": e.encode_json(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ program: |
}
}.encode_json()
).do_request().as(resp, resp.StatusCode == 200 ?
bytes(resp.Body).decode_json().as(body, has(body.?data.vulnerabilityFindings.nodes) ?
bytes(resp.Body).decode_json().as(body, has(body.?data.vulnerabilityFindings.nodes) && body.data.vulnerabilityFindings.nodes != null ?
{
"events": body.data.vulnerabilityFindings.nodes.map(e, {
"message": e.encode_json(),
Expand Down
2 changes: 1 addition & 1 deletion packages/wiz/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 3.0.2
name: wiz
title: Wiz
version: "1.8.0"
version: "1.8.1"
description: Collect logs from Wiz with Elastic Agent.
type: integration
categories:
Expand Down

0 comments on commit 34e2102

Please sign in to comment.