-
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
[Defend Workflows] Convert filterQuery to kql #161806
Conversation
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
Hey @marshallmain, could you take a look if this makes sense to you? I hope this resolves the issues you mentioned to @patrykkopycinski . Big thank you in advance 👍 |
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.
Looks great! Verified that the search strategies that can query as internal user are now passing KQL through buildEsQuery
rather than injecting filters directly 👍
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.
looks great! 💯 added one small comment for avoiding some duplication, but that's all 🚀
filter = filter + ` AND ${kql}`; | ||
} | ||
|
||
const filterQuery = getQueryFilter({ filter }); |
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.
what do you think about pushing the responsibility of concatenating the filters into getQueryFilter()
(e.g. getConcatenatedQueryFilter(...filters: string[])
? it would eliminate the need for the duplicated logic above, and inside the function it can simply filter out the empty strings and .join(' AND ')
the others
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.
That totally makes sense, thanks @gergoabraham 👍
# Conflicts: # x-pack/plugins/osquery/server/routes/live_query/find_live_query_route.ts # x-pack/plugins/osquery/server/routes/live_query/get_live_query_details_route.ts # x-pack/plugins/osquery/server/routes/live_query/get_live_query_results_route.ts # x-pack/plugins/osquery/server/search_strategy/osquery/index.ts
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @tomsonpl |
* main: (150 commits) Fixes unnecessary autocompletes on HTTP methods (elastic#163233) [Defend Workflows] Convert filterQuery to kql (elastic#161806) [Fleet] copy `inactivity_timeout` when duplicating agent policy (elastic#164544) Fix 7.17 forward compatibility with 8.2+ (elastic#164274) [ML] Fixes dark mode in flyouts and modals (elastic#164399) [Defend Workflows]Changes to policy settings are not persistent until a refresh (elastic#164403) [Security Solution][Endpoint] Fixes kibana crash when going back to policy details page (elastic#164329) Prepare the Security domain HTTP APIs for Serverless (elastic#162087) skip failing test suite (elastic#160986) [Security Solution] Fix flaky Event Filters test (elastic#164473) [EDR workflows] Osquery serverless tests (elastic#163795) [Fleet] Only show agent dashboard links if there is more than one non-server agent and if the dashboards exist (elastic#164469) [Chrome UI] Fix background color in serverless (elastic#164419) [DOCS] Saved objects - resolve import errors API (elastic#162825) Remove 'Create Rule' button from Rule Group page (elastic#164167) [Security Solution] expandable flyout - fix infinite loop in correlations (elastic#163450) [Remote Clusters] Update copy about port help text (elastic#164442) [api-docs] 2023-08-23 Daily api_docs build (elastic#164524) [data views] Disable scripted fields in serverless environment (elastic#163228) [Reporting] Fix - show diagnostic only when image reporting is enabled (elastic#164336) ...
This PR solves: https://github.com/elastic/security-team/issues/6988