Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testcase to check for related_integrations based on index #4096

Merged
merged 19 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions detection_rules/schemas/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,22 @@ 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-*']
INTEGRATION_TO_INDEX_MAP = {'endpoint': "logs-endpoint*", 'aws': "logs-aws*",
'azure': "logs-azure*", 'okta': "logs-okta*",
'o365': "logs-o365*", 'gcp': "logs-gcp*",
'google_workspace': "logs-google_workspace*", 'cloud_defend': "logs-cloud_defend*",
'kubernetes': "logs-kubernetes.*", 'apm': "apm-*",
'sentinel_one_cloud_funnel': "logs-sentinel_one_cloud_funnel.*",
'cyberarkpas': "logs-cyberarkpas.audit*", 'm365_defender': "logs-m365_defender.event-*",
'windows': "logs-windows.*", 'fim': "logs-fim.event-*",
'system': "logs-system.*", 'network_traffic': "logs-network_traffic.*",
'auditd_manager': "logs-auditd_manager.auditd-*", 'github': "logs-github.audit-*",
'jamf_protect': "logs-jamf_protect*", 'panw': "logs-panw.*"}
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.13.0 for SentinelOne Integration."
min_stack_version = "8.13.0"
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,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.13.0 for SentinelOne Integration."
min_stack_version = "8.13.0"
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_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.13.0 for SentinelOne Integration."
min_stack_version = "8.13.0"
updated_date = "2024/09/09"
updated_date = "2024/09/23"

[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"]
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 = "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"]
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[transform]
[[transform.osquery]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2022/04/30"
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/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"]
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 = "2021/12/25"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic", "Austin Songer"]
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/08/07"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
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
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/12/23"
integration = ["endpoint"]
integration = ["endpoint", "windows"]
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/07/07"
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/08/21"
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 = "2021/07/07"
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/03/25"
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/03/25"
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/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"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[transform]
[[transform.osquery]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/08/24"
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/11/18"
integration = ["endpoint", "windows", "m365_defender"]
integration = ["endpoint", "windows", "m365_defender", "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/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"]
integration = ["endpoint", "windows"]
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,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.13.0 for SentinelOne Integration."
min_stack_version = "8.13.0"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[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"]
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/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/08/07"
updated_date = "2024/09/23"

[transform]
[[transform.osquery]]
Expand Down
4 changes: 2 additions & 2 deletions rules/windows/discovery_group_policy_object_discovery.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2023/01/18"
integration = ["windows", "endpoint"]
integration = ["windows", "endpoint", "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/discovery_peripheral_device.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/11/02"
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/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"]
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/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"]
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/execution_via_compiled_html_file.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/02/18"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "system"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

[transform]
[[transform.osquery]]
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.13.0 for Sentinel One Cloud Funnel Integration"
min_stack_version = "8.13.0"
updated_date = "2024/08/07"
updated_date = "2024/09/23"

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

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