Skip to content

Commit

Permalink
Add testcase to check for related_integrations based on index (#4096)
Browse files Browse the repository at this point in the history
(cherry picked from commit 275c728)
  • Loading branch information
shashank-elastic authored and github-actions[bot] committed Oct 21, 2024
1 parent f406267 commit 021e528
Show file tree
Hide file tree
Showing 54 changed files with 137 additions and 114 deletions.
8 changes: 8 additions & 0 deletions detection_rules/schemas/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,11 @@ def validator(value):
'geo_point', 'geo_shape', 'point', 'shape',
'percolator'
]

# definitions for the integration to index mapping unit test case
IGNORE_IDS = ["eb079c62-4481-4d6e-9643-3ca499df7aaa", "699e9fdb-b77c-4c01-995c-1c15019b9c43",
"0c9a14d9-d65d-486f-9b5b-91e4e6b22bd0", "a198fbbd-9413-45ec-a269-47ae4ccf59ce",
"0c41e478-5263-4c69-8f9e-7dfd2c22da64", "aab184d3-72b3-4639-b242-6597c99d8bca",
"a61809f3-fb5b-465c-8bff-23a8a068ac60", "f3e22c8b-ea47-45d1-b502-b57b6de950b3"]
IGNORE_INDICES = ['.alerts-security.*', 'logs-*', 'metrics-*', 'traces-*', 'endgame-*',
'filebeat-*', 'packetbeat-*', 'auditbeat-*', 'winlogbeat-*']
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2022/09/03"
integration = ["endpoint"]
integration = ["endpoint", "auditd_manager"]
maturity = "production"
updated_date = "2024/09/10"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/04/03"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
4 changes: 2 additions & 2 deletions rules/windows/command_and_control_rdp_tunnel_plink.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2020/10/14"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
maturity = "production"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
min_stack_version = "8.14.0"
updated_date = "2024/10/15"
updated_date = "2024/10/17"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2024/03/27"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
maturity = "production"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
min_stack_version = "8.14.0"
updated_date = "2024/10/15"
updated_date = "2024/10/17"

[rule]
author = ["Elastic"]
Expand Down
4 changes: 2 additions & 2 deletions rules/windows/command_and_control_tunnel_vscode.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2024/09/09"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
maturity = "production"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
min_stack_version = "8.14.0"
updated_date = "2024/10/15"
updated_date = "2024/10/17"

[rule]
author = ["Elastic"]
Expand Down
4 changes: 2 additions & 2 deletions rules/windows/credential_access_cmdline_dump_tool.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/11/24"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "system"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2022/12/19"
integration = ["windows"]
integration = ["windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2021/03/18"
integration = ["endpoint", "m365_defender"]
integration = ["endpoint", "m365_defender", "windows"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/credential_access_saved_creds_vaultcmd.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2021/01/19"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "system"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2021/11/27"
integration = ["windows"]
integration = ["windows", "system"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/defense_evasion_cve_2020_0601.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/03/19"
integration = ["windows"]
integration = ["windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/12/23"
integration = ["endpoint", "windows", "m365_defender"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/defense_evasion_from_unusual_directory.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/10/30"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/defense_evasion_sip_provider_mod.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2021/01/20"
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2020/09/03"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
maturity = "production"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
min_stack_version = "8.14.0"
updated_date = "2024/10/15"
updated_date = "2024/10/17"

[transform]
[[transform.osquery]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/08/19"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/defense_evasion_via_filter_manager.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/02/18"
integration = ["endpoint", "windows", "m365_defender"]
integration = ["endpoint", "windows", "m365_defender", "system"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/execution_com_object_xwizard.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2021/01/20"
integration = ["endpoint", "windows", "m365_defender"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "system"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/execution_suspicious_pdf_reader.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/03/30"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2024/06/19"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
maturity = "production"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
min_stack_version = "8.14.0"
updated_date = "2024/10/15"
updated_date = "2024/10/17"

[rule]
author = ["Elastic"]
Expand Down
4 changes: 2 additions & 2 deletions rules/windows/impact_stop_process_service_threshold.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/12/03"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/02/18"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/11/11"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/07/16"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
4 changes: 2 additions & 2 deletions rules/windows/persistence_registry_uncommon.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/11/18"
integration = ["endpoint"]
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/08/17"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "system"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2024/05/29"
integration = ["endpoint"]
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2024/09/12"
integration = ["endpoint", "sentinel_one_cloud_funnel", "m365_defender"]
integration = ["endpoint", "sentinel_one_cloud_funnel", "m365_defender", "windows"]
maturity = "production"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
min_stack_version = "8.14.0"
updated_date = "2024/10/15"
updated_date = "2024/10/17"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/11/26"
integration = ["endpoint"]
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2024/10/15"
updated_date = "2024/10/17"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/08/24"
integration = ["endpoint"]
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
4 changes: 2 additions & 2 deletions rules_building_block/collection_outlook_email_archive.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/08/21"
integration = ["endpoint"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/09"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/08/21"
integration = ["endpoint"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/09"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/08/21"
integration = ["endpoint"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/09"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/08/23"
integration = ["endpoint"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/09"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down
Loading

0 comments on commit 021e528

Please sign in to comment.