[Attack Discovery][Scheduling] UI: Implement "Attack Discovery Scheduling" rule creation flow (#12006)#216087
Merged
e40pud merged 6 commits intoelastic:mainfrom Mar 27, 2025
Conversation
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
...urity/plugins/security_solution/public/attack_discovery/pages/settings_flyout/index.test.tsx
Outdated
Show resolved
Hide resolved
andrew-goldstein
approved these changes
Mar 26, 2025
Contributor
andrew-goldstein
left a comment
There was a problem hiding this comment.
Thank you @e40pud for the new scheduling rule creation flow! 🙏
✅ Desk tested locally
LGTM 🚀
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
cc @e40pud |
Contributor
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14105001861 |
Contributor
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
e40pud
added a commit
to e40pud/kibana
that referenced
this pull request
Mar 27, 2025
…ling" rule creation flow (elastic#12006) (elastic#216087) ## Summary Main ticket ([internal link](elastic/security-team#12006)) Filgma link: ([internal link](https://www.figma.com/design/1AEgYCsQjCsWxAKoErYfL3/9.1-%5BAttack-Discovery%5D-Scheduling-%26-notifications?node-id=3421-195207&t=Y9ejBkDCojHD95qw-4)) With these changes we add create attack discovery schedule flyout. ## Recording https://github.com/user-attachments/assets/6a1226f2-c45d-4b79-a67d-0e10fac71060 ## NOTES The feature is hidden behind the feature flag: > xpack.securitySolution.enableExperimental: ['assistantAttackDiscoverySchedulingEnabled'] There is no logic to create actual schedule yet. This will be connected once elastic/security-team#12003 is done. For now to see the data returned from the flyout which we gonna use to create schedule later, you can add console log in `x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/hooks/use_edit_form.tsx` file within the `handleFormSubmit` function to print the `formData`. The form data from the recording above looks like this: ```json { "name": "Schedule 1", "connectorId": "gemini-1-5-pro", "alertsSelectionSettings": { "query": { "language": "kuery", "query": "" }, "filters": [], "size": 350, "start": "now-7d", "end": "now" }, "interval": "24h", "actions": [ { "id": "bb9a46e0-46c1-42c7-b186-ddf3ea6fdf84", "actionTypeId": ".email", "group": "default", "params": { "message": "Rule {{context.rule.name}} generated {{state.signals_count}} alerts", "to": [ "test@elastic.co" ], "subject": "Test email 1" }, "frequency": { "notifyWhen": "onActiveAlert", "throttle": null, "summary": true }, "uuid": "78f888f2-aff1-4d34-9ba5-683a6c0d2b5e" } ] } ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [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 (cherry picked from commit ff5d682) # Conflicts: # x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/alert_selection/alert_selection_query/index.tsx
Contributor
Author
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
e40pud
added a commit
that referenced
this pull request
Mar 27, 2025
…Scheduling" rule creation flow (#12006) (#216087) (#216146) # Backport This will backport the following commits from `main` to `8.x`: - [[Attack Discovery][Scheduling] UI: Implement "Attack Discovery Scheduling" rule creation flow (#12006) (#216087)](#216087) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2025-03-27T11:03:34Z","message":"[Attack Discovery][Scheduling] UI: Implement \"Attack Discovery Scheduling\" rule creation flow (#12006) (#216087)\n\n## Summary\n\nMain ticket ([internal\nlink](https://github.com/elastic/security-team/issues/12006))\nFilgma link: ([internal\nlink](https://www.figma.com/design/1AEgYCsQjCsWxAKoErYfL3/9.1-%5BAttack-Discovery%5D-Scheduling-%26-notifications?node-id=3421-195207&t=Y9ejBkDCojHD95qw-4))\n\nWith these changes we add create attack discovery schedule flyout.\n\n## Recording\n\n\nhttps://github.com/user-attachments/assets/6a1226f2-c45d-4b79-a67d-0e10fac71060\n\n## NOTES\n\nThe feature is hidden behind the feature flag:\n\n> xpack.securitySolution.enableExperimental:\n['assistantAttackDiscoverySchedulingEnabled']\n\nThere is no logic to create actual schedule yet. This will be connected\nonce elastic/security-team#12003 is done.\n\nFor now to see the data returned from the flyout which we gonna use to\ncreate schedule later, you can add console log in\n`x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/hooks/use_edit_form.tsx`\nfile within the `handleFormSubmit` function to print the `formData`. The\nform data from the recording above looks like this:\n\n```json\n{\n \"name\": \"Schedule 1\",\n \"connectorId\": \"gemini-1-5-pro\",\n \"alertsSelectionSettings\": {\n \"query\": {\n \"language\": \"kuery\",\n \"query\": \"\"\n },\n \"filters\": [],\n \"size\": 350,\n \"start\": \"now-7d\",\n \"end\": \"now\"\n },\n \"interval\": \"24h\",\n \"actions\": [\n {\n \"id\": \"bb9a46e0-46c1-42c7-b186-ddf3ea6fdf84\",\n \"actionTypeId\": \".email\",\n \"group\": \"default\",\n \"params\": {\n \"message\": \"Rule {{context.rule.name}} generated {{state.signals_count}} alerts\",\n \"to\": [\n \"test@elastic.co\"\n ],\n \"subject\": \"Test email 1\"\n },\n \"frequency\": {\n \"notifyWhen\": \"onActiveAlert\",\n \"throttle\": null,\n \"summary\": true\n },\n \"uuid\": \"78f888f2-aff1-4d34-9ba5-683a6c0d2b5e\"\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"ff5d68224488da40015a9eb9f76e2c5e4a5beea0","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: SecuritySolution","Team:Security Generative AI","backport:version","v9.1.0","v8.19.0"],"title":"[Attack Discovery][Scheduling] UI: Implement \"Attack Discovery Scheduling\" rule creation flow (#12006)","number":216087,"url":"https://github.com/elastic/kibana/pull/216087","mergeCommit":{"message":"[Attack Discovery][Scheduling] UI: Implement \"Attack Discovery Scheduling\" rule creation flow (#12006) (#216087)\n\n## Summary\n\nMain ticket ([internal\nlink](https://github.com/elastic/security-team/issues/12006))\nFilgma link: ([internal\nlink](https://www.figma.com/design/1AEgYCsQjCsWxAKoErYfL3/9.1-%5BAttack-Discovery%5D-Scheduling-%26-notifications?node-id=3421-195207&t=Y9ejBkDCojHD95qw-4))\n\nWith these changes we add create attack discovery schedule flyout.\n\n## Recording\n\n\nhttps://github.com/user-attachments/assets/6a1226f2-c45d-4b79-a67d-0e10fac71060\n\n## NOTES\n\nThe feature is hidden behind the feature flag:\n\n> xpack.securitySolution.enableExperimental:\n['assistantAttackDiscoverySchedulingEnabled']\n\nThere is no logic to create actual schedule yet. This will be connected\nonce elastic/security-team#12003 is done.\n\nFor now to see the data returned from the flyout which we gonna use to\ncreate schedule later, you can add console log in\n`x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/hooks/use_edit_form.tsx`\nfile within the `handleFormSubmit` function to print the `formData`. The\nform data from the recording above looks like this:\n\n```json\n{\n \"name\": \"Schedule 1\",\n \"connectorId\": \"gemini-1-5-pro\",\n \"alertsSelectionSettings\": {\n \"query\": {\n \"language\": \"kuery\",\n \"query\": \"\"\n },\n \"filters\": [],\n \"size\": 350,\n \"start\": \"now-7d\",\n \"end\": \"now\"\n },\n \"interval\": \"24h\",\n \"actions\": [\n {\n \"id\": \"bb9a46e0-46c1-42c7-b186-ddf3ea6fdf84\",\n \"actionTypeId\": \".email\",\n \"group\": \"default\",\n \"params\": {\n \"message\": \"Rule {{context.rule.name}} generated {{state.signals_count}} alerts\",\n \"to\": [\n \"test@elastic.co\"\n ],\n \"subject\": \"Test email 1\"\n },\n \"frequency\": {\n \"notifyWhen\": \"onActiveAlert\",\n \"throttle\": null,\n \"summary\": true\n },\n \"uuid\": \"78f888f2-aff1-4d34-9ba5-683a6c0d2b5e\"\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"ff5d68224488da40015a9eb9f76e2c5e4a5beea0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216087","number":216087,"mergeCommit":{"message":"[Attack Discovery][Scheduling] UI: Implement \"Attack Discovery Scheduling\" rule creation flow (#12006) (#216087)\n\n## Summary\n\nMain ticket ([internal\nlink](https://github.com/elastic/security-team/issues/12006))\nFilgma link: ([internal\nlink](https://www.figma.com/design/1AEgYCsQjCsWxAKoErYfL3/9.1-%5BAttack-Discovery%5D-Scheduling-%26-notifications?node-id=3421-195207&t=Y9ejBkDCojHD95qw-4))\n\nWith these changes we add create attack discovery schedule flyout.\n\n## Recording\n\n\nhttps://github.com/user-attachments/assets/6a1226f2-c45d-4b79-a67d-0e10fac71060\n\n## NOTES\n\nThe feature is hidden behind the feature flag:\n\n> xpack.securitySolution.enableExperimental:\n['assistantAttackDiscoverySchedulingEnabled']\n\nThere is no logic to create actual schedule yet. This will be connected\nonce elastic/security-team#12003 is done.\n\nFor now to see the data returned from the flyout which we gonna use to\ncreate schedule later, you can add console log in\n`x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/hooks/use_edit_form.tsx`\nfile within the `handleFormSubmit` function to print the `formData`. The\nform data from the recording above looks like this:\n\n```json\n{\n \"name\": \"Schedule 1\",\n \"connectorId\": \"gemini-1-5-pro\",\n \"alertsSelectionSettings\": {\n \"query\": {\n \"language\": \"kuery\",\n \"query\": \"\"\n },\n \"filters\": [],\n \"size\": 350,\n \"start\": \"now-7d\",\n \"end\": \"now\"\n },\n \"interval\": \"24h\",\n \"actions\": [\n {\n \"id\": \"bb9a46e0-46c1-42c7-b186-ddf3ea6fdf84\",\n \"actionTypeId\": \".email\",\n \"group\": \"default\",\n \"params\": {\n \"message\": \"Rule {{context.rule.name}} generated {{state.signals_count}} alerts\",\n \"to\": [\n \"test@elastic.co\"\n ],\n \"subject\": \"Test email 1\"\n },\n \"frequency\": {\n \"notifyWhen\": \"onActiveAlert\",\n \"throttle\": null,\n \"summary\": true\n },\n \"uuid\": \"78f888f2-aff1-4d34-9ba5-683a6c0d2b5e\"\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"ff5d68224488da40015a9eb9f76e2c5e4a5beea0"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
cqliu1
pushed a commit
to cqliu1/kibana
that referenced
this pull request
Mar 31, 2025
…ling" rule creation flow (elastic#12006) (elastic#216087) ## Summary Main ticket ([internal link](elastic/security-team#12006)) Filgma link: ([internal link](https://www.figma.com/design/1AEgYCsQjCsWxAKoErYfL3/9.1-%5BAttack-Discovery%5D-Scheduling-%26-notifications?node-id=3421-195207&t=Y9ejBkDCojHD95qw-4)) With these changes we add create attack discovery schedule flyout. ## Recording https://github.com/user-attachments/assets/6a1226f2-c45d-4b79-a67d-0e10fac71060 ## NOTES The feature is hidden behind the feature flag: > xpack.securitySolution.enableExperimental: ['assistantAttackDiscoverySchedulingEnabled'] There is no logic to create actual schedule yet. This will be connected once elastic/security-team#12003 is done. For now to see the data returned from the flyout which we gonna use to create schedule later, you can add console log in `x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/hooks/use_edit_form.tsx` file within the `handleFormSubmit` function to print the `formData`. The form data from the recording above looks like this: ```json { "name": "Schedule 1", "connectorId": "gemini-1-5-pro", "alertsSelectionSettings": { "query": { "language": "kuery", "query": "" }, "filters": [], "size": 350, "start": "now-7d", "end": "now" }, "interval": "24h", "actions": [ { "id": "bb9a46e0-46c1-42c7-b186-ddf3ea6fdf84", "actionTypeId": ".email", "group": "default", "params": { "message": "Rule {{context.rule.name}} generated {{state.signals_count}} alerts", "to": [ "test@elastic.co" ], "subject": "Test email 1" }, "frequency": { "notifyWhen": "onActiveAlert", "throttle": null, "summary": true }, "uuid": "78f888f2-aff1-4d34-9ba5-683a6c0d2b5e" } ] } ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [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
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.
Summary
Main ticket (internal link)
Filgma link: (internal link)
With these changes we add create attack discovery schedule flyout.
Recording
Screen.Recording.2025-03-26.at.17.29.55.mov
NOTES
The feature is hidden behind the feature flag:
There is no logic to create actual schedule yet. This will be connected once https://github.com/elastic/security-team/issues/12003 is done.
For now to see the data returned from the flyout which we gonna use to create schedule later, you can add console log in
x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/hooks/use_edit_form.tsxfile within thehandleFormSubmitfunction to print theformData. The form data from the recording above looks like this:{ "name": "Schedule 1", "connectorId": "gemini-1-5-pro", "alertsSelectionSettings": { "query": { "language": "kuery", "query": "" }, "filters": [], "size": 350, "start": "now-7d", "end": "now" }, "interval": "24h", "actions": [ { "id": "bb9a46e0-46c1-42c7-b186-ddf3ea6fdf84", "actionTypeId": ".email", "group": "default", "params": { "message": "Rule {{context.rule.name}} generated {{state.signals_count}} alerts", "to": [ "test@elastic.co" ], "subject": "Test email 1" }, "frequency": { "notifyWhen": "onActiveAlert", "throttle": null, "summary": true }, "uuid": "78f888f2-aff1-4d34-9ba5-683a6c0d2b5e" } ] }Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.