Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [SecuritySolution] Add service enrichment to detection engine (#…
…206582) (#207708) # Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution] Add service enrichment to detection engine (#206582)](#206582) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-21T16:54:20Z","message":"[SecuritySolution] Add service enrichment to detection engine (#206582)\n\n## Summary\n\n* Add alert enrichment for `service.asset.criticality`,\n`service.risk.calculated_level` and `service.risk.calculated_score_norm`\nfields\n\n* Add `Service Risk Level` and `Service Criticality` columns to the\nalerts table\n\n![Screenshot 2025-01-17 at 11 58\n50](https://github.com/user-attachments/assets/0871dce3-338f-4123-a868-6d23b3a35763)\n\n\n### How to test?\n* Enable the flag `serviceEntityStoreEnabled `\n* Start an empty kibana instance\n* Add data using the document generator with the `yarn start\nentity-store` command.\n * Add a seed when prompted\n* Assign asset criticality for the service entity you are testing with\n* Ensure the service entity you are testing with has a risk score. \n * You can run the engine from the Risk score page if needed.\n* Add more data using the same seed\n* Force the created rule to run so it generates new alerts\n* Check if the alerts created for the new batch of data have the new\nfield populated.\n\n### How does enrichment work?\nWhen alerts are created, the current asset criticality and risk score\nare fetched and merged into the alert document. These values won't get\nupdated if the risk score or asset changes.\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] [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\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"888dd240bdcaa93340767083653521a44c115845","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","Feature:Detection Rules","release_note:feature","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v8.18.0"],"title":"[SecuritySolution] Add service enrichment to detection engine","number":206582,"url":"https://github.com/elastic/kibana/pull/206582","mergeCommit":{"message":"[SecuritySolution] Add service enrichment to detection engine (#206582)\n\n## Summary\n\n* Add alert enrichment for `service.asset.criticality`,\n`service.risk.calculated_level` and `service.risk.calculated_score_norm`\nfields\n\n* Add `Service Risk Level` and `Service Criticality` columns to the\nalerts table\n\n![Screenshot 2025-01-17 at 11 58\n50](https://github.com/user-attachments/assets/0871dce3-338f-4123-a868-6d23b3a35763)\n\n\n### How to test?\n* Enable the flag `serviceEntityStoreEnabled `\n* Start an empty kibana instance\n* Add data using the document generator with the `yarn start\nentity-store` command.\n * Add a seed when prompted\n* Assign asset criticality for the service entity you are testing with\n* Ensure the service entity you are testing with has a risk score. \n * You can run the engine from the Risk score page if needed.\n* Add more data using the same seed\n* Force the created rule to run so it generates new alerts\n* Check if the alerts created for the new batch of data have the new\nfield populated.\n\n### How does enrichment work?\nWhen alerts are created, the current asset criticality and risk score\nare fetched and merged into the alert document. These values won't get\nupdated if the risk score or asset changes.\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] [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\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"888dd240bdcaa93340767083653521a44c115845"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206582","number":206582,"mergeCommit":{"message":"[SecuritySolution] Add service enrichment to detection engine (#206582)\n\n## Summary\n\n* Add alert enrichment for `service.asset.criticality`,\n`service.risk.calculated_level` and `service.risk.calculated_score_norm`\nfields\n\n* Add `Service Risk Level` and `Service Criticality` columns to the\nalerts table\n\n![Screenshot 2025-01-17 at 11 58\n50](https://github.com/user-attachments/assets/0871dce3-338f-4123-a868-6d23b3a35763)\n\n\n### How to test?\n* Enable the flag `serviceEntityStoreEnabled `\n* Start an empty kibana instance\n* Add data using the document generator with the `yarn start\nentity-store` command.\n * Add a seed when prompted\n* Assign asset criticality for the service entity you are testing with\n* Ensure the service entity you are testing with has a risk score. \n * You can run the engine from the Risk score page if needed.\n* Add more data using the same seed\n* Force the created rule to run so it generates new alerts\n* Check if the alerts created for the new batch of data have the new\nfield populated.\n\n### How does enrichment work?\nWhen alerts are created, the current asset criticality and risk score\nare fetched and merged into the alert document. These values won't get\nupdated if the risk score or asset changes.\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] [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\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"888dd240bdcaa93340767083653521a44c115845"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
- Loading branch information