amazon_security_lake: fix handling of invalid '-' ip values - #14585
Merged
Conversation
IP values are specified to be ocsf ip_t, which does not allow '-', but these are sent, so remove them if they are present. tls.sans.name_ips it is not clear whether name_ips is a scalar or a list, so punt and use a recursive cleaner.
efd6
force-pushed
the
s6140-amazon_security_lake-bad_ip
branch
from
July 17, 2025 22:08
ddddba6 to
2a58e1c
Compare
Contributor
🚀 Benchmarks reportTo see the full report comment with |
Contributor
Author
|
/test |
efd6
marked this pull request as ready for review
July 17, 2025 23:53
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Contributor
Author
|
The sonarqube failure is unrelated. |
| tag: drop_empty_x_originating_ip | ||
| if: ctx.ocsf?.email?.x_originating_ip instanceof List | ||
| source: |- | ||
| ((List) ctx.ocsf.email.x_originating_ip).removeIf(v -> v == '-'); |
Contributor
There was a problem hiding this comment.
The casting isn't necessary here or in cases like this.
It is necessary in the function drop(Object object) because there object does need to be cast from Object to List.
| tag: drop_empty_json_tls_sans_name_ips | ||
| if: ctx.json?.tls?.sans instanceof List | ||
| source: |- | ||
| boolean drop(Object object) { |
Contributor
There was a problem hiding this comment.
dropDashes or dropEmpty?
💚 Build Succeeded
History
cc @efd6 |
|
andrewkroh
approved these changes
Jul 22, 2025
Contributor
|
Package amazon_security_lake - 2.6.1 containing this change is available at https://epr.elastic.co/package/amazon_security_lake/2.6.1/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots