-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[EDR Workflows][Process descendants filter] Transform event filter entry for filtering process descendant #187141
[EDR Workflows][Process descendants filter] Transform event filter entry for filtering process descendant #187141
Conversation
/ci |
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
): TranslatedExceptionListItem[] { | ||
const entrySet = new Set(); | ||
const entriesFiltered: TranslatedExceptionListItem[] = []; | ||
const deduplicatedItems: TranslatedExceptionListItem[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: naming
const deduplicatedItems: TranslatedExceptionListItem[] = []; | |
const uniqueItems: TranslatedExceptionListItem[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
): TranslatedExceptionListItem[] { | ||
const entrySet = new Set(); | ||
const entriesFiltered: TranslatedExceptionListItem[] = []; | ||
const deduplicatedItems: TranslatedExceptionListItem[] = []; | ||
const storeDeduplicatedItem = (item: TranslatedExceptionListItem) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: naming
const storeDeduplicatedItem = (item: TranslatedExceptionListItem) => { | |
const storeUniqueItem = (item: TranslatedExceptionListItem) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
This PR adds logic to server side artifact logic, in order to transform Event Filter entries to the expected format, if process descendant filtering is enabled.
Conditions:
xpack.securitySolution.enableExperimental.filterProcessDescendantsForEventFiltersEnabled
tags
, there is thefilter_process_descendants
tagOutput: the output contains a new operator called
descendent_of
, with all the original entries listed as the operator's values, and one additionalevent.category is process
entry.Example input entry (only relevant fields):
Example output entry:
e2e testing
process.args
isIGNOREMYCHILDREN
:test.sh
on your VM with the following content:(alternatively you can use the python script from the endpoint tests, https://github.com/elastic/endpoint-dev/blob/790c611325998c6ef8578144844d9260b8f73044/Python/endpoint/test/test_event_filtering.py#L439-L450)
sh test.sh 6 DO_NOT_IGNOREMYCHILDREN
sh test.sh 9 IGNOREMYCHILDREN
Checklist
Delete any items that are not applicable to this PR.