[9.1] [Security Solution][THI] Create hook to fetch security default patterns and replace useTimelineFilters usage (#226314)#227307
Merged
kibanamachine merged 1 commit intoelastic:9.1from Jul 9, 2025
Conversation
…ns and replace useTimelineFilters usage (elastic#226314) ## Summary Ref: elastic#225925, elastic#226312 This PR creates a hook to return the id and index patterns of the security default data view. This is the default indices specified in advanced settings plus alert index. They are meant to be static across sessions, versus the `SourcererScopeName.default` is based on the data view selected in the data view picker. Additionally, there are features that require security default patterns. It was previously done via `useTimelineFilters`, but it relies on the analyzer scope - when user changes the data view in analyzer, features like the prevalence table, ancestry correlations and entity analytic flyouts are impacted. Changes inclue: - Created a `useSecurityDefaultPatterns` hook in data view manager - Removed `selectedPatterns` in `useTimelineFilters` - Replaced the index patterns with the security default patterns where applicable - Renamed some variables to be more explicit, and separate from the patterns return based on `SourcererScopeName.default` Enable `newDataViewPickerEnabled` ### After Investigating an event always opens timeline with the default security data view. Opening a timeline from timelines page should have the specified data view https://github.com/user-attachments/assets/5ea88e6e-0266-4b6b-802e-5c299c03b894 Changing data view in analyzer does not change the results observed host table https://github.com/user-attachments/assets/33646b24-8235-4740-975f-a423f2dcfd3f ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit 73e1264)
2 tasks
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
|
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.
Backport
This will backport the following commits from
mainto9.1:Questions ?
Please refer to the Backport tool documentation