[Security Solution] Implement prebuilt rules import test plan (#223421)

**Addresses:** https://github.com/elastic/kibana/issues/202079

## Summary

This PR implement prebuilt rules import [test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_import.md).

Prior existing tests were superseded by the new ones.

## Discovered issues

It turned out that the current implementation behaves slightly differently than described the test plan. Failed test scenarios are skipped and the following tickets have been created for tracking

- https://github.com/elastic/kibana/issues/223099https://github.com/elastic/kibana/issues/223099
- https://github.com/elastic/kibana/issues/223280
- https://github.com/elastic/kibana/issues/223253

## Extra changes

Some diff like in `alert_threat_enrichments.cy.ts` has been caused by disabling errors swallowing upon rule creation. It's important to have tests properly preparing the testing environment to reduce chances of test dependencies and flakiness. In particular some prebuilt rules import test scenarios require custom rules to be created. Swallowing rule creation errors reduces tests coverage. 

## Flaky test runner

-   [`detection_engine_security` package related prebuilt rules import integration tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8365) (100 iterations)
-  [prebuilt rules import ECH integration tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8366) (100 iterations)
-  [prebuilt rules import Serverless integration tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8367) (100 iterations)
This commit is contained in:
Maxim Palenov 2025-06-24 14:24:10 +02:00 committed by GitHub
parent c1563c2f45
commit 87c8b882c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 2918 additions and 473 deletions

View file

@ -76,6 +76,7 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_update/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_update/basic_license_essentials_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/serverless_essentials_tier.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_disabled/configs/serverless_essentials_tier.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_enabled/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_enabled/upgrade_prebuilt_rules/diffable_rule_fields/common_fields/configs/serverless.config.ts

View file

@ -60,6 +60,8 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_update/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_update/basic_license_essentials_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/ess_basic_license.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/ess_air_gapped.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_disabled/configs/ess_basic_license.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_enabled/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_enabled/upgrade_prebuilt_rules/diffable_rule_fields/common_fields/configs/ess.config.ts