Use Elasticsearch events for automated testing.#289
Conversation
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
This pull request does not have a backport label. Could you fix it @yashtewari? 🙏
|
c7ec7b2 to
737f116
Compare
71d8400 to
36909be
Compare
| @@ -2,6 +2,7 @@ | |||
| This module provides input / output manipulations on streams / files | |||
There was a problem hiding this comment.
since you edited those files, can you please fix the linter comments from running
flake8 --ignore=E501,E126,E123 commonlib36909be to
94b3303
Compare
1 similar comment
Use of OPA decision logs match findings against expected findings is now deprecated.
a05b1f4 to
7208a9e
Compare
1 similar comment
DaveSys911
left a comment
There was a problem hiding this comment.
Approved, please consider addressing the comments on subsequent prs
as part of https://github.com/elastic/security-team/issues/4296 perhaps.
| from munch import Munch, munchify | ||
|
|
||
|
|
||
| def get_events_from_index(elastic_client, index_name: str, rule_tag: str, time_after: datetime) -> list[Munch]: |
There was a problem hiding this comment.
This introduces an additional function that interfaces with ES, I suggest considering moving it to commonlib/elastic_wrapper.py.
In addition, it might be a good idea to patch up the tests in [tests/integration] (https://github.com/elastic/cloudbeat/blob/main/tests/integration/tests/test_cloudbeat_integration.py) to access ES using the same method.
The current convention is a bit confusing.
|
Can you also please open a ticket for the debug mode degradation? |
Use of OPA decision logs to match findings against expected findings is now deprecated.
The deprecated function
get_evaluationhas been renamed toget_logs_evaluationbut not yet deleted, because it's still useful for debugging.Resolves: https://github.com/elastic/security-team/issues/4049