Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cloud Security] fix 'got types.Null, expected iterable type' error #11098

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.9.0-preview02"
changes:
- description: Fix potential `got types.Null, expected iterable type` error.
type: bugfix
link: https://github.com/elastic/integrations/pull/11098
- version: "1.9.0-preview01"
changes:
- description: Add latest Transform to vulnerability data stream to support CDR
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, body.?data.auditLogEntries.nodes.orValue(null) != 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, body.?data.configurationFindings.nodes.orValue(null) != 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, body.?data.issues.nodes.orValue(null) != 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, body.?data.vulnerabilityFindings.nodes.orValue(null) != 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.9.0-preview01"
version: "1.9.0-preview02"
description: Collect logs from Wiz with Elastic Agent.
type: integration
categories:
Expand Down