forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SIEM] [Detections] Fixes filtering with large value lists to use "an…
…ds" between lists (elastic#72304) * wip - comment and sample json for exceptions * promise.all for OR-ing exception items and quick-start script * logging, added/updated json sample scripts, fixed missing await on filter with lists * WIP * bug fix where two lists when 'anded' together were not filtering down result set * undo changes from testing * fix changes to example json and fixes missed conflict with master * update log message and fix type errors * change log statement and add unit test for when exception items without a value list are passed in to the filter function * fix failing test * update expect on one test and adds a new test to ensure anding of value lists when appearing in different exception items * update test after rebasing with master * properly ands exception item entries together with proper test cases * fix test (log statement tests - need to come up with a better way to cover these) * cleans up json examples * rename test and use 'every' in lieu of 'some' when determining if the filter logic should execute
- Loading branch information
Showing
10 changed files
with
467 additions
and
70 deletions.
There are no files selected for viewing
This file contains 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
24 changes: 24 additions & 0 deletions
24
...lugins/lists/server/scripts/exception_lists/new/exception_list_item_with_bad_ip_list.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"list_id": "endpoint_list", | ||
"item_id": "endpoint_list_item_good_rock01", | ||
"_tags": ["endpoint", "process", "malware", "os:windows"], | ||
"tags": ["user added string for a tag", "malware"], | ||
"type": "simple", | ||
"description": "Don't signal when agent.name is rock01 and source.ip is in the goodguys.txt list", | ||
"name": "Filter out good guys ip and agent.name rock01", | ||
"comments": [], | ||
"entries": [ | ||
{ | ||
"field": "agent.name", | ||
"operator": "excluded", | ||
"type": "match", | ||
"value": ["rock01"] | ||
}, | ||
{ | ||
"field": "source.ip", | ||
"operator": "excluded", | ||
"type": "list", | ||
"list": { "id": "goodguys.txt", "type": "ip" } | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
x-pack/plugins/lists/server/scripts/lists/new/list_ip_item.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"id": "hand_inserted_item_id", | ||
"value": "127.0.0.1" | ||
} |
4 changes: 4 additions & 0 deletions
4
x-pack/plugins/lists/server/scripts/lists/new/list_keyword_item.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"list_id": "keyword_list", | ||
"value": "sh" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
./hard_reset.sh && \ | ||
./post_list.sh lists/new/lists/keyword.json && \ | ||
./post_list_item.sh lists/new/list_keyword_item.json && \ | ||
./post_exception_list.sh && \ | ||
./post_exception_list_item.sh ./exception_lists/new/exception_list_item_with_list.json |
This file contains 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
This file contains 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
Oops, something went wrong.