From cb3c4f8448de45d954e1dbffc051f8d54519537f Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sat, 11 Apr 2020 15:51:39 -0500 Subject: [PATCH 01/20] Move server code into NP folder * NP config is not yet used * Relative imports are somewhat broken --- x-pack/legacy/plugins/siem/index.ts | 4 +- .../plugins/siem/scripts/combined_schema.ts | 2 +- x-pack/legacy/plugins/siem/server/index.ts | 12 -- x-pack/legacy/plugins/siem/server/plugin.ts | 200 ------------------ .../plugins/siem/server/client/client.test.ts | 0 .../plugins/siem/server/client/client.ts | 2 +- .../siem/server/client/factory.test.ts | 2 +- .../plugins/siem/server/client/factory.ts | 2 +- .../plugins/siem/server/client/index.ts | 0 .../server/graphql/authentications/index.ts | 0 .../graphql/authentications/resolvers.ts | 0 .../graphql/authentications/schema.gql.ts | 0 .../plugins/siem/server/graphql/ecs/index.ts | 0 .../siem/server/graphql/ecs/resolvers.ts | 0 .../siem/server/graphql/ecs/schema.gql.ts | 0 .../siem/server/graphql/events/index.ts | 0 .../siem/server/graphql/events/resolvers.ts | 0 .../siem/server/graphql/events/schema.gql.ts | 0 .../siem/server/graphql/hosts/index.ts | 0 .../siem/server/graphql/hosts/resolvers.ts | 0 .../siem/server/graphql/hosts/schema.gql.ts | 0 .../plugins/siem/server/graphql/index.ts | 4 +- .../siem/server/graphql/ip_details/index.ts | 0 .../server/graphql/ip_details/resolvers.ts | 0 .../server/graphql/ip_details/schema.gql.ts | 0 .../siem/server/graphql/kpi_hosts/index.ts | 0 .../server/graphql/kpi_hosts/resolvers.ts | 0 .../server/graphql/kpi_hosts/schema.gql.ts | 0 .../siem/server/graphql/kpi_network/index.ts | 0 .../server/graphql/kpi_network/resolvers.ts | 0 .../server/graphql/kpi_network/schema.gql.ts | 0 .../server/graphql/matrix_histogram/index.ts | 0 .../graphql/matrix_histogram/resolvers.ts | 0 .../graphql/matrix_histogram/schema.gql.ts | 0 .../siem/server/graphql/network/index.ts | 0 .../siem/server/graphql/network/resolvers.ts | 0 .../siem/server/graphql/network/schema.gql.ts | 0 .../plugins/siem/server/graphql/note/index.ts | 0 .../siem/server/graphql/note/resolvers.ts | 0 .../siem/server/graphql/note/schema.gql.ts | 0 .../siem/server/graphql/overview/index.ts | 0 .../siem/server/graphql/overview/resolvers.ts | 0 .../server/graphql/overview/schema.gql.ts | 0 .../siem/server/graphql/pinned_event/index.ts | 0 .../server/graphql/pinned_event/resolvers.ts | 0 .../server/graphql/pinned_event/schema.gql.ts | 0 .../siem/server/graphql/scalar_date/index.ts | 0 .../graphql/scalar_date/resolvers.test.ts | 0 .../server/graphql/scalar_date/resolvers.ts | 0 .../server/graphql/scalar_date/schema.gql.ts | 0 .../server/graphql/scalar_to_any/index.ts | 0 .../server/graphql/scalar_to_any/resolvers.ts | 0 .../graphql/scalar_to_any/schema.gql.ts | 0 .../graphql/scalar_to_boolean_array/index.ts | 0 .../scalar_to_boolean_array/resolvers.test.ts | 0 .../scalar_to_boolean_array/resolvers.ts | 0 .../scalar_to_boolean_array/schema.gql.ts | 0 .../graphql/scalar_to_date_array/index.ts | 0 .../scalar_to_date_array/resolvers.test.ts | 0 .../graphql/scalar_to_date_array/resolvers.ts | 0 .../scalar_to_date_array/schema.gql.ts | 0 .../graphql/scalar_to_number_array/index.ts | 0 .../scalar_to_number_array/resolvers.test.ts | 0 .../scalar_to_number_array/resolvers.ts | 0 .../scalar_to_number_array/schema.gql.ts | 0 .../server/graphql/source_status/index.ts | 0 .../server/graphql/source_status/resolvers.ts | 0 .../graphql/source_status/schema.gql.ts | 0 .../siem/server/graphql/sources/index.ts | 0 .../siem/server/graphql/sources/resolvers.ts | 0 .../siem/server/graphql/sources/schema.gql.ts | 0 .../siem/server/graphql/timeline/index.ts | 0 .../siem/server/graphql/timeline/resolvers.ts | 0 .../server/graphql/timeline/schema.gql.ts | 0 .../plugins/siem/server/graphql/tls/index.ts | 0 .../siem/server/graphql/tls/resolvers.ts | 0 .../siem/server/graphql/tls/schema.gql.ts | 0 .../plugins/siem/server/graphql/types.ts | 0 .../graphql/uncommon_processes/index.ts | 0 .../graphql/uncommon_processes/resolvers.ts | 0 .../graphql/uncommon_processes/schema.gql.ts | 0 .../siem/server/graphql/who_am_i/index.ts | 0 .../siem/server/graphql/who_am_i/resolvers.ts | 0 .../server/graphql/who_am_i/schema.gql.ts | 0 .../plugins/siem/server/init_server.ts | 0 .../elasticsearch_adapter.test.ts | 0 .../authentications/elasticsearch_adapter.ts | 2 +- .../siem/server/lib/authentications/index.ts | 0 .../server/lib/authentications/query.dsl.ts | 0 .../siem/server/lib/authentications/types.ts | 0 .../plugins/siem/server/lib/compose/kibana.ts | 0 .../server/lib/configuration/adapter_types.ts | 0 .../siem/server/lib/configuration/index.ts | 0 .../inmemory_configuration_adapter.ts | 0 .../server/lib/detection_engine/README.md | 0 .../errors/bad_request_error.ts | 0 .../detection_engine/feature_flags.test.ts | 0 .../lib/detection_engine/feature_flags.ts | 0 .../index/create_bootstrap_index.ts | 0 .../index/delete_all_index.ts | 0 .../detection_engine/index/delete_policy.ts | 0 .../detection_engine/index/delete_template.ts | 0 .../index/get_index_exists.test.ts | 0 .../index/get_index_exists.ts | 0 .../index/get_policy_exists.ts | 0 .../index/get_template_exists.ts | 0 .../lib/detection_engine/index/read_index.ts | 0 .../lib/detection_engine/index/set_policy.ts | 0 .../detection_engine/index/set_template.ts | 0 .../notifications/add_tags.test.ts | 2 +- .../notifications/add_tags.ts | 2 +- .../notifications/build_signals_query.test.ts | 0 .../notifications/build_signals_query.ts | 0 .../create_notifications.test.ts | 2 +- .../notifications/create_notifications.ts | 6 +- .../delete_notifications.test.ts | 2 +- .../notifications/delete_notifications.ts | 0 .../notifications/find_notifications.test.ts | 2 +- .../notifications/find_notifications.ts | 4 +- .../notifications/get_signals_count.ts | 2 +- .../notifications/read_notifications.test.ts | 2 +- .../notifications/read_notifications.ts | 4 +- .../rules_notification_alert_type.test.ts | 2 +- .../rules_notification_alert_type.ts | 2 +- .../schedule_notification_actions.ts | 2 +- .../notifications/types.test.ts | 0 .../detection_engine/notifications/types.ts | 8 +- .../update_notifications.test.ts | 2 +- .../notifications/update_notifications.ts | 4 +- .../notifications/utils.test.ts | 0 .../detection_engine/notifications/utils.ts | 0 .../privileges/read_privileges.ts | 0 .../routes/__mocks__/index.ts | 0 .../routes/__mocks__/request.ts | 2 +- .../routes/__mocks__/request_context.ts | 10 +- .../routes/__mocks__/request_responses.ts | 4 +- .../routes/__mocks__/response_factory.ts | 2 +- .../routes/__mocks__/server.ts | 4 +- .../routes/__mocks__/test_adapters.ts | 0 .../routes/__mocks__/utils.ts | 0 .../routes/index/create_index_route.ts | 4 +- .../routes/index/delete_index_route.ts | 4 +- .../routes/index/ecs_mapping.json | 0 .../routes/index/get_signals_template.test.ts | 0 .../routes/index/get_signals_template.ts | 0 .../routes/index/read_index_route.ts | 4 +- .../routes/index/signals_mapping.json | 0 .../routes/index/signals_policy.json | 0 .../privileges/read_privileges_route.test.ts | 2 +- .../privileges/read_privileges_route.ts | 4 +- .../rules/add_prepackaged_rules_route.test.ts | 0 .../rules/add_prepackaged_rules_route.ts | 4 +- .../rules/create_rules_bulk_route.test.ts | 2 +- .../routes/rules/create_rules_bulk_route.ts | 4 +- .../routes/rules/create_rules_route.test.ts | 2 +- .../routes/rules/create_rules_route.ts | 4 +- .../rules/delete_rules_bulk_route.test.ts | 2 +- .../routes/rules/delete_rules_bulk_route.ts | 4 +- .../routes/rules/delete_rules_route.test.ts | 2 +- .../routes/rules/delete_rules_route.ts | 4 +- .../routes/rules/export_rules_route.ts | 4 +- .../routes/rules/find_rules_route.test.ts | 2 +- .../routes/rules/find_rules_route.ts | 4 +- .../rules/find_rules_status_route.test.ts | 2 +- .../routes/rules/find_rules_status_route.ts | 4 +- ...get_prepackaged_rules_status_route.test.ts | 0 .../get_prepackaged_rules_status_route.ts | 4 +- .../routes/rules/import_rules_route.test.ts | 2 +- .../routes/rules/import_rules_route.ts | 6 +- .../rules/patch_rules_bulk_route.test.ts | 2 +- .../routes/rules/patch_rules_bulk_route.ts | 4 +- .../routes/rules/patch_rules_route.test.ts | 2 +- .../routes/rules/patch_rules_route.ts | 4 +- .../routes/rules/read_rules_route.test.ts | 2 +- .../routes/rules/read_rules_route.ts | 4 +- .../rules/update_rules_bulk_route.test.ts | 2 +- .../routes/rules/update_rules_bulk_route.ts | 4 +- .../routes/rules/update_rules_route.test.ts | 2 +- .../routes/rules/update_rules_route.ts | 4 +- .../routes/rules/utils.test.ts | 10 +- .../detection_engine/routes/rules/utils.ts | 4 +- .../routes/rules/validate.test.ts | 2 +- .../detection_engine/routes/rules/validate.ts | 2 +- .../add_prepackaged_rules_schema.test.ts | 4 +- .../schemas/add_prepackaged_rules_schema.ts | 2 +- .../schemas/create_rules_bulk_schema.test.ts | 0 .../schemas/create_rules_bulk_schema.ts | 0 .../schemas/create_rules_schema.test.ts | 4 +- .../routes/schemas/create_rules_schema.ts | 2 +- .../schemas/export_rules_schema.test.ts | 0 .../routes/schemas/export_rules_schema.ts | 0 .../routes/schemas/find_rules_schema.test.ts | 0 .../routes/schemas/find_rules_schema.ts | 0 .../schemas/find_rules_statuses_schema.ts | 0 .../schemas/import_rules_schema.test.ts | 4 +- .../routes/schemas/import_rules_schema.ts | 2 +- .../schemas/patch_rules_bulk_schema.test.ts | 0 .../routes/schemas/patch_rules_bulk_schema.ts | 0 .../routes/schemas/patch_rules_schema.test.ts | 4 +- .../routes/schemas/patch_rules_schema.ts | 0 .../schemas/query_rules_bulk_schema.test.ts | 0 .../routes/schemas/query_rules_bulk_schema.ts | 0 .../routes/schemas/query_rules_schema.test.ts | 0 .../routes/schemas/query_rules_schema.ts | 0 .../query_signals_index_schema.test.ts | 0 .../schemas/query_signals_index_schema.ts | 0 .../schemas/response/__mocks__/utils.ts | 0 .../response/check_type_dependents.test.ts | 0 .../schemas/response/check_type_dependents.ts | 2 +- .../schemas/response/error_schema.test.ts | 0 .../routes/schemas/response/error_schema.ts | 0 .../schemas/response/exact_check.test.ts | 0 .../routes/schemas/response/exact_check.ts | 0 .../response/find_rules_schema.test.ts | 0 .../schemas/response/find_rules_schema.ts | 0 .../response/import_rules_schema.test.ts | 0 .../schemas/response/import_rules_schema.ts | 0 .../response/prepackaged_rules_schema.test.ts | 0 .../response/prepackaged_rules_schema.ts | 0 .../prepackaged_rules_status_schema.test.ts | 0 .../prepackaged_rules_status_schema.ts | 0 .../response/rules_bulk_schema.test.ts | 0 .../schemas/response/rules_bulk_schema.ts | 0 .../schemas/response/rules_schema.test.ts | 0 .../routes/schemas/response/rules_schema.ts | 0 .../routes/schemas/response/schemas.ts | 0 .../type_timeline_only_schema.test.ts | 0 .../response/type_timeline_only_schema.ts | 0 .../routes/schemas/response/utils.test.ts | 0 .../routes/schemas/response/utils.ts | 0 .../routes/schemas/schemas.ts | 0 .../schemas/set_signal_status_schema.test.ts | 0 .../schemas/set_signal_status_schema.ts | 0 .../schemas/types/iso_date_string.test.ts | 0 .../routes/schemas/types/iso_date_string.ts | 0 .../schemas/types/lists_default_array.test.ts | 0 .../schemas/types/lists_default_array.ts | 0 .../routes/schemas/types/positive_integer.ts | 0 ...positive_integer_greater_than_zero.test.ts | 0 .../positive_integer_greater_than_zero.ts | 0 .../schemas/types/postive_integer.test.ts | 0 .../types/references_default_array.test.ts | 0 .../schemas/types/references_default_array.ts | 0 .../routes/schemas/types/risk_score.test.ts | 0 .../routes/schemas/types/risk_score.ts | 0 .../routes/schemas/types/uuid.test.ts | 0 .../routes/schemas/types/uuid.ts | 0 .../schemas/update_rules_bulk_schema.test.ts | 0 .../schemas/update_rules_bulk_schema.ts | 0 .../schemas/update_rules_schema.test.ts | 4 +- .../routes/schemas/update_rules_schema.ts | 2 +- .../routes/signals/open_close_signals.test.ts | 2 +- .../signals/open_close_signals_route.ts | 4 +- .../signals/query_signals_route.test.ts | 2 +- .../routes/signals/query_signals_route.ts | 4 +- .../routes/tags/read_tags_route.ts | 4 +- .../lib/detection_engine/routes/utils.test.ts | 2 +- .../lib/detection_engine/routes/utils.ts | 10 +- .../create_rule_actions_saved_object.ts | 4 +- .../delete_rule_actions_saved_object.ts | 2 +- .../get_rule_actions_saved_object.ts | 4 +- .../rule_actions/saved_object_mappings.ts | 0 .../detection_engine/rule_actions/types.ts | 2 +- ...ate_or_create_rule_actions_saved_object.ts | 4 +- .../update_rule_actions_saved_object.ts | 4 +- .../detection_engine/rule_actions/utils.ts | 2 +- .../detection_engine/rules/add_tags.test.ts | 2 +- .../lib/detection_engine/rules/add_tags.ts | 2 +- .../rules/create_rules.test.ts | 4 +- .../detection_engine/rules/create_rules.ts | 6 +- .../create_rules_stream_from_ndjson.test.ts | 0 .../rules/create_rules_stream_from_ndjson.ts | 2 +- .../rules/delete_rules.test.ts | 4 +- .../detection_engine/rules/delete_rules.ts | 0 .../detection_engine/rules/find_rules.test.ts | 2 +- .../lib/detection_engine/rules/find_rules.ts | 4 +- .../get_existing_prepackaged_rules.test.ts | 2 +- .../rules/get_existing_prepackaged_rules.ts | 4 +- .../rules/get_export_all.test.ts | 2 +- .../detection_engine/rules/get_export_all.ts | 2 +- .../rules/get_export_by_object_ids.test.ts | 2 +- .../rules/get_export_by_object_ids.ts | 2 +- .../rules/get_export_details_ndjson.test.ts | 0 .../rules/get_export_details_ndjson.ts | 0 .../rules/get_prepackaged_rules.test.ts | 0 .../rules/get_prepackaged_rules.ts | 0 .../rules/get_rules_to_install.test.ts | 0 .../rules/get_rules_to_install.ts | 0 .../rules/get_rules_to_update.test.ts | 0 .../rules/get_rules_to_update.ts | 0 .../rules/install_prepacked_rules.ts | 6 +- .../rules/patch_rules.test.ts | 6 +- .../lib/detection_engine/rules/patch_rules.ts | 2 +- .../403_response_to_a_post.json | 0 .../405_response_method_not_allowed.json | 0 ..._security_adversary_behavior_detected.json | 0 ...dpoint_security_cred_dumping_detected.json | 0 ...point_security_cred_dumping_prevented.json | 0 ...t_security_cred_manipulation_detected.json | 0 ..._security_cred_manipulation_prevented.json | 0 ...ic_endpoint_security_exploit_detected.json | 0 ...c_endpoint_security_exploit_prevented.json | 0 ...ic_endpoint_security_malware_detected.json | 0 ...c_endpoint_security_malware_prevented.json | 0 ...nt_security_permission_theft_detected.json | 0 ...t_security_permission_theft_prevented.json | 0 ...t_security_process_injection_detected.json | 0 ..._security_process_injection_prevented.json | 0 ...endpoint_security_ransomware_detected.json | 0 ...ndpoint_security_ransomware_prevented.json | 0 ...den_file_attribute_with_via_attribexe.json | 0 .../eql_adobe_hijack_persistence.json | 0 .../eql_clearing_windows_event_logs.json | 0 ...delete_volume_usn_journal_with_fsutil.json | 0 ...deleting_backup_catalogs_with_wbadmin.json | 0 .../eql_direct_outbound_smb_connection.json | 0 ...ble_windows_firewall_rules_with_netsh.json | 0 ...coding_or_decoding_files_via_certutil.json | 0 .../eql_local_scheduled_task_commands.json | 0 .../eql_local_service_commands.json | 0 ...ql_msbuild_making_network_connections.json | 0 .../eql_mshta_making_network_connections.json | 0 .../eql_psexec_lateral_movement_command.json | 0 ...ql_suspicious_ms_office_child_process.json | 0 ...l_suspicious_ms_outlook_child_process.json | 0 .../eql_system_shells_via_services.json | 0 ...usual_network_connection_via_rundll32.json | 0 .../eql_unusual_parentchild_relationship.json | 0 ...ql_unusual_process_network_connection.json | 0 .../eql_user_account_creation.json | 0 ...ume_shadow_copy_deletion_via_vssadmin.json | 0 ..._volume_shadow_copy_deletion_via_wmic.json | 0 ...l_windows_script_executing_powershell.json | 0 .../rules/prepackaged_rules/index.ts | 0 .../linux_anomalous_network_activity.json | 0 ...linux_anomalous_network_port_activity.json | 0 .../linux_anomalous_network_service.json | 0 .../linux_anomalous_network_url_activity.json | 0 .../linux_anomalous_process_all_hosts.json | 0 .../linux_anomalous_user_name.json | 0 .../linux_hping_activity.json | 0 .../linux_iodine_activity.json | 0 .../linux_kernel_module_activity.json | 0 .../linux_mknod_activity.json | 0 .../linux_netcat_network_connection.json | 0 .../linux_nmap_activity.json | 0 .../linux_nping_activity.json | 0 ...nux_process_started_in_temp_directory.json | 0 .../linux_shell_activity_by_web_server.json | 0 .../linux_socat_activity.json | 0 .../linux_strace_activity.json | 0 .../linux_tcpdump_activity.json | 0 .../linux_whoami_commmand.json | 0 .../network_dns_directly_to_the_internet.json | 0 ...fer_protocol_activity_to_the_internet.json | 0 ...hat_protocol_activity_to_the_internet.json | 0 .../network_nat_traversal_port_activity.json | 0 .../network_port_26_activity.json | 0 ...rk_port_8000_activity_to_the_internet.json | 0 ..._to_point_tunneling_protocol_activity.json | 0 ...k_proxy_port_activity_to_the_internet.json | 0 ...te_desktop_protocol_from_the_internet.json | 0 ...mote_desktop_protocol_to_the_internet.json | 0 ...mote_procedure_call_from_the_internet.json | 0 ...remote_procedure_call_to_the_internet.json | 0 ...file_sharing_activity_to_the_internet.json | 0 .../network_smtp_to_the_internet.json | 0 ..._server_port_activity_to_the_internet.json | 0 ...rk_ssh_secure_shell_from_the_internet.json | 0 ...work_ssh_secure_shell_to_the_internet.json | 0 .../network_telnet_port_activity.json | 0 .../network_tor_activity_to_the_internet.json | 0 ...l_network_computing_from_the_internet.json | 0 ...ual_network_computing_to_the_internet.json | 0 .../rules/prepackaged_rules/notice.ts | 0 .../prepackaged_rules/null_user_agent.json | 0 .../packetbeat_dns_tunneling.json | 0 .../packetbeat_rare_dns_question.json | 0 .../packetbeat_rare_server_domain.json | 0 .../packetbeat_rare_urls.json | 0 .../packetbeat_rare_user_agent.json | 0 .../rare_process_by_host_linux.json | 0 .../rare_process_by_host_windows.json | 0 .../prepackaged_rules/sqlmap_user_agent.json | 0 .../suspicious_login_activity.json | 0 .../windows_anomalous_network_activity.json | 0 .../windows_anomalous_path_activity.json | 0 .../windows_anomalous_process_all_hosts.json | 0 .../windows_anomalous_process_creation.json | 0 .../windows_anomalous_script.json | 0 .../windows_anomalous_service.json | 0 .../windows_anomalous_user_name.json | 0 .../windows_certutil_network_connection.json | 0 ...and_prompt_connecting_to_the_internet.json | 0 ...s_command_shell_started_by_powershell.json | 0 ...dows_command_shell_started_by_svchost.json | 0 .../windows_credential_dumping_msbuild.json | 0 .../windows_cve_2020_0601.json | 0 ...ws_defense_evasion_via_filter_manager.json | 0 ...ecution_msbuild_started_by_office_app.json | 0 ...s_execution_msbuild_started_by_script.json | 0 ...ion_msbuild_started_by_system_process.json | 0 ...ows_execution_msbuild_started_renamed.json | 0 ...cution_msbuild_started_unusal_process.json | 0 ...dows_execution_via_compiled_html_file.json | 0 ...dows_execution_via_net_com_assemblies.json | 0 .../windows_execution_via_regsvr32.json | 0 ...ution_via_trusted_developer_utilities.json | 0 ...le_program_connecting_to_the_internet.json | 0 .../windows_injection_msbuild.json | 0 ...isc_lolbin_connecting_to_the_internet.json | 0 .../windows_modification_of_boot_config.json | 0 .../windows_msxsl_network.json | 0 .../windows_net_command_system_account.json | 0 ..._persistence_via_application_shimming.json | 0 ...escalation_via_accessibility_features.json | 0 ...rocess_discovery_via_tasklist_command.json | 0 .../windows_rare_user_runas_event.json | 0 ...windows_rare_user_type10_remote_login.json | 0 ...er_program_connecting_to_the_internet.json | 0 ...windows_signed_binary_proxy_execution.json | 0 .../windows_suspicious_pdf_reader.json | 0 ...uspicious_process_started_by_a_script.json | 0 .../windows_uac_bypass_event_viewer.json | 0 .../windows_whoami_command_activity.json | 0 .../detection_engine/rules/read_rules.test.ts | 2 +- .../lib/detection_engine/rules/read_rules.ts | 4 +- .../rules/saved_object_mappings.ts | 0 .../lib/detection_engine/rules/types.ts | 8 +- .../rules/update_prepacked_rules.test.ts | 6 +- .../rules/update_prepacked_rules.ts | 4 +- .../rules/update_rules.test.ts | 6 +- .../detection_engine/rules/update_rules.ts | 4 +- .../rules/update_rules_notifications.ts | 4 +- .../lib/detection_engine/rules/utils.test.ts | 0 .../lib/detection_engine/rules/utils.ts | 0 .../scripts/add_prepackaged_rules.sh | 0 .../scripts/check_env_variables.sh | 0 .../scripts/convert_saved_search_to_rules.sh | 0 .../scripts/delete_all_actions.sh | 0 .../scripts/delete_all_alert_tasks.sh | 0 .../scripts/delete_all_alerts.sh | 0 .../scripts/delete_all_api_keys.sh | 0 .../scripts/delete_all_statuses.sh | 0 .../detection_engine/scripts/delete_bulk.sh | 0 .../scripts/delete_rule_by_id.sh | 0 .../scripts/delete_rule_by_rule_id.sh | 0 .../scripts/delete_signal_index.sh | 0 .../detection_engine/scripts/export_rules.sh | 0 .../scripts/export_rules_by_rule_id.sh | 0 .../export_rules_by_rule_id_to_file.sh | 0 .../scripts/export_rules_to_file.sh | 0 .../scripts/find_rule_by_filter.sh | 0 .../detection_engine/scripts/find_rules.sh | 0 .../scripts/find_rules_sort.sh | 0 .../scripts/find_rules_statuses_by_ids.sh | 0 .../scripts/find_saved_object.sh | 0 .../scripts/get_action_instances.sh | 0 .../scripts/get_action_types.sh | 0 .../scripts/get_alert_instances.sh | 0 .../scripts/get_alert_tasks.sh | 0 .../scripts/get_alert_types.sh | 0 .../scripts/get_prepackaged_rules_status.sh | 0 .../scripts/get_privileges.sh | 0 .../scripts/get_rule_by_id.sh | 0 .../scripts/get_rule_by_rule_id.sh | 0 .../scripts/get_saved_objects.sh | 0 .../scripts/get_signal_index.sh | 0 .../lib/detection_engine/scripts/get_tags.sh | 0 .../detection_engine/scripts/hard_reset.sh | 0 .../detection_engine/scripts/import_rules.sh | 0 .../scripts/import_rules_no_overwrite.sh | 0 .../detection_engine/scripts/patch_rule.sh | 0 .../scripts/patch_rule_bulk.sh | 0 .../lib/detection_engine/scripts/post_rule.sh | 0 .../scripts/post_rule_bulk.sh | 0 .../scripts/post_signal_index.sh | 0 .../detection_engine/scripts/post_x_rules.sh | 0 .../scripts/regen_prepackge_rules_index.sh | 0 .../scripts/rules/bulk/delete_by_rule_id.json | 0 .../rules/bulk/multiple_ruleid_queries.json | 0 .../rules/bulk/multiple_simplest_queries.json | 0 .../scripts/rules/bulk/patch_names.json | 0 .../scripts/rules/export/ruleid_queries.json | 0 .../import/multiple_ruleid_queries.ndjson | 0 .../scripts/rules/patches/README.md | 0 .../scripts/rules/patches/disable_rule.json | 0 .../scripts/rules/patches/enabled_rule.json | 0 .../simplest_update_risk_score_by_id.json | 0 ...simplest_update_risk_score_by_rule_id.json | 0 .../rules/patches/simplest_updated_name.json | 0 .../rules/patches/update_interval.json | 0 .../scripts/rules/patches/update_list.json | 0 .../patches/update_machine_learning.json | 0 .../scripts/rules/patches/update_note.json | 0 .../patches/update_query_everything.json | 0 .../scripts/rules/patches/update_tags.json | 0 .../rules/patches/update_timelineid.json | 0 .../scripts/rules/patches/update_version.json | 0 .../scripts/rules/queries/README.md | 0 .../scripts/rules/queries/query_disabled.json | 0 .../scripts/rules/queries/query_lucene.json | 0 .../rules/queries/query_mitre_attack.json | 0 .../rules/queries/query_timelineid.json | 0 .../rules/queries/query_with_everything.json | 0 .../rules/queries/query_with_filter.json | 0 .../rules/queries/query_with_list.json | 0 .../queries/query_with_machine_learning.json | 0 .../rules/queries/query_with_meta_data.json | 0 .../rules/queries/query_with_note.json | 0 .../rules/queries/query_with_rule_id.json | 0 .../rules/queries/query_with_tags.json | 0 .../rules/queries/simplest_filters.json | 0 .../scripts/rules/queries/simplest_query.json | 0 .../scripts/rules/saved_queries/README.md | 0 .../saved_queries/saved_query_by_rule_id.json | 0 .../saved_query_with_everything.json | 0 .../saved_query_with_filters.json | 0 .../saved_queries/saved_query_with_query.json | 0 .../saved_query_with_query_filter.json | 0 .../saved_queries/simplest_saved_query.json | 0 .../scripts/rules/test_cases/README.md | 0 .../multiple_ruleid_queries_corrupted.ndjson | 0 .../queries/filter_with_empty_query.json | 0 .../queries/filter_without_query.json | 0 .../query_filter_ui_meatadata_lucene.json | 0 .../queries/query_filter_ui_metadata.json | 0 .../test_cases/queries/query_with_errors.json | 0 .../saved_query_ui_meta_empty_query.json | 0 .../signals_on_signals/depth_test/README.md | 0 .../depth_test/query_single_id.json | 0 .../depth_test/signal_on_signal_depth_1.json | 0 .../depth_test/signal_on_signal_depth_2.json | 0 .../signals_on_signals/halting_test/README.md | 0 .../halting_test/query_single_id.json | 0 .../halting_test/signal_on_signal.json | 0 .../scripts/rules/updates/README.md | 0 .../scripts/rules/updates/disable_rule.json | 0 .../scripts/rules/updates/enabled_rule.json | 0 .../simplest_update_risk_score_by_id.json | 0 ...simplest_update_risk_score_by_rule_id.json | 0 .../rules/updates/simplest_updated_name.json | 0 .../rules/updates/update_interval.json | 0 .../scripts/rules/updates/update_list.json | 0 .../updates/update_machine_learning.json | 0 .../scripts/rules/updates/update_note.json | 0 .../updates/update_query_everything.json | 0 .../scripts/rules/updates/update_tags.json | 0 .../rules/updates/update_timelineid.json | 0 .../scripts/rules/updates/update_version.json | 0 .../scripts/signal_index_exists.sh | 0 .../scripts/signals/aggs_signals.sh | 0 .../scripts/signals/put_signal_doc.sh | 0 .../scripts/signals/query_signals.sh | 0 .../scripts/signals/sample_signal.json | 0 .../scripts/signals/set_status_with_id.sh | 0 .../scripts/signals/set_status_with_query.sh | 0 .../detection_engine/scripts/update_rule.sh | 0 .../scripts/update_rule_bulk.sh | 0 .../signals/__mocks__/es_results.ts | 4 +- .../rule_status_saved_objects_client.mock.ts | 0 .../signals/build_bulk_body.test.ts | 0 .../signals/build_bulk_body.ts | 2 +- .../signals/build_event_type_signal.test.ts | 0 .../signals/build_event_type_signal.ts | 0 .../signals/build_events_query.test.ts | 0 .../signals/build_events_query.ts | 0 .../signals/build_rule.test.ts | 0 .../detection_engine/signals/build_rule.ts | 2 +- .../signals/build_signal.test.ts | 2 +- .../detection_engine/signals/build_signal.ts | 2 +- .../signals/bulk_create_ml_signals.test.ts | 0 .../signals/bulk_create_ml_signals.ts | 6 +- .../signals/find_ml_signals.ts | 2 +- .../signals/get_filter.test.ts | 2 +- .../detection_engine/signals/get_filter.ts | 4 +- .../signals/get_input_output_index.test.ts | 6 +- .../signals/get_input_output_index.ts | 6 +- .../signals/get_or_create_rule_statuses.ts | 0 .../signals/get_rule_status_saved_objects.ts | 0 .../signals/rule_messages.test.ts | 0 .../detection_engine/signals/rule_messages.ts | 0 .../rule_status_saved_objects_client.ts | 2 +- .../signals/rule_status_service.test.ts | 0 .../signals/rule_status_service.ts | 0 .../signals/search_after_bulk_create.test.ts | 4 +- .../signals/search_after_bulk_create.ts | 6 +- .../signals/siem_rule_action_groups.ts | 0 .../signals/signal_params_schema.ts | 2 +- .../signals/signal_rule_alert_type.test.ts | 2 +- .../signals/signal_rule_alert_type.ts | 4 +- .../signals/single_bulk_create.test.ts | 4 +- .../signals/single_bulk_create.ts | 6 +- .../signals/single_search_after.test.ts | 2 +- .../signals/single_search_after.ts | 4 +- .../lib/detection_engine/signals/types.ts | 4 +- .../detection_engine/signals/utils.test.ts | 0 .../lib/detection_engine/signals/utils.ts | 3 +- .../detection_engine/tags/read_tags.test.ts | 4 +- .../lib/detection_engine/tags/read_tags.ts | 4 +- .../siem/server/lib/detection_engine/types.ts | 6 +- .../server/lib/ecs_fields/extend_map.test.ts | 0 .../siem/server/lib/ecs_fields/extend_map.ts | 0 .../siem/server/lib/ecs_fields/index.ts | 0 .../lib/events/elasticsearch_adapter.test.ts | 0 .../lib/events/elasticsearch_adapter.ts | 0 .../plugins/siem/server/lib/events/index.ts | 0 .../plugins/siem/server/lib/events/mock.ts | 2 +- .../siem/server/lib/events/query.dsl.ts | 0 .../lib/events/query.last_event_time.dsl.ts | 0 .../plugins/siem/server/lib/events/types.ts | 0 .../siem/server/lib/framework/index.ts | 0 .../lib/framework/kibana_framework_adapter.ts | 6 +- .../siem/server/lib/framework/types.ts | 6 +- .../lib/hosts/elasticsearch_adapter.test.ts | 0 .../server/lib/hosts/elasticsearch_adapter.ts | 2 +- .../siem/server/lib/hosts/helpers.test.ts | 0 .../plugins/siem/server/lib/hosts/helpers.ts | 0 .../plugins/siem/server/lib/hosts/index.ts | 0 .../plugins/siem/server/lib/hosts/mock.ts | 2 +- .../server/lib/hosts/query.detail_host.dsl.ts | 0 .../siem/server/lib/hosts/query.hosts.dsl.ts | 0 .../hosts/query.last_first_seen_host.dsl.ts | 0 .../plugins/siem/server/lib/hosts/types.ts | 0 .../elasticsearch_adapter.test.ts | 0 .../lib/index_fields/elasticsearch_adapter.ts | 0 .../siem/server/lib/index_fields/index.ts | 0 .../siem/server/lib/index_fields/mock.ts | 0 .../siem/server/lib/index_fields/types.ts | 0 .../ip_details/elasticsearch_adapter.test.ts | 0 .../lib/ip_details/elasticsearch_adapter.ts | 2 +- .../siem/server/lib/ip_details/index.ts | 0 .../siem/server/lib/ip_details/mock.ts | 0 .../lib/ip_details/query_overview.dsl.ts | 0 .../server/lib/ip_details/query_users.dsl.ts | 0 .../siem/server/lib/ip_details/types.ts | 0 .../kpi_hosts/elasticsearch_adapter.test.ts | 0 .../lib/kpi_hosts/elasticsearch_adapter.ts | 0 .../siem/server/lib/kpi_hosts/helpers.test.ts | 0 .../siem/server/lib/kpi_hosts/helpers.ts | 0 .../siem/server/lib/kpi_hosts/index.ts | 0 .../plugins/siem/server/lib/kpi_hosts/mock.ts | 2 +- .../query_authentication.dsl.test.ts | 0 .../lib/kpi_hosts/query_authentication.dsl.ts | 0 .../server/lib/kpi_hosts/query_hosts.dsl.ts | 0 .../kpi_hosts/query_unique_ips.dsl.test.ts | 0 .../lib/kpi_hosts/query_unique_ips.dsl.ts | 0 .../siem/server/lib/kpi_hosts/types.ts | 0 .../lib/kpi_network/elastic_adapter.test.ts | 0 .../lib/kpi_network/elasticsearch_adapter.ts | 0 .../siem/server/lib/kpi_network/helpers.ts | 0 .../siem/server/lib/kpi_network/index.ts | 0 .../siem/server/lib/kpi_network/mock.ts | 2 +- .../server/lib/kpi_network/query_dns.dsl.ts | 0 .../lib/kpi_network/query_network_events.ts | 0 .../kpi_network/query_tls_handshakes.dsl.ts | 0 .../lib/kpi_network/query_unique_flow.ts | 0 .../query_unique_private_ips.dsl.ts | 0 .../siem/server/lib/kpi_network/types.ts | 0 .../siem/server/lib/machine_learning/index.ts | 4 +- .../matrix_histogram/elasticsearch_adapter.ts | 0 .../elasticseatch_adapter.test.ts | 0 .../siem/server/lib/matrix_histogram/index.ts | 0 .../siem/server/lib/matrix_histogram/mock.ts | 2 +- .../query.anomalies_over_time.dsl.ts | 0 .../query.authentications_over_time.dsl.ts | 0 .../query.events_over_time.dsl.ts | 0 .../lib/matrix_histogram/query_alerts.dsl.ts | 0 .../query_dns_histogram.dsl.ts | 0 .../siem/server/lib/matrix_histogram/types.ts | 0 .../siem/server/lib/matrix_histogram/utils.ts | 0 .../elastic_adapter.test.ts.snap | 0 .../lib/network/elastic_adapter.test.ts | 0 .../lib/network/elasticsearch_adapter.ts | 2 +- .../plugins/siem/server/lib/network/index.ts | 0 .../plugins/siem/server/lib/network/mock.ts | 2 +- .../siem/server/lib/network/query_dns.dsl.ts | 0 .../siem/server/lib/network/query_http.dsl.ts | 0 .../lib/network/query_top_countries.dsl.ts | 0 .../lib/network/query_top_n_flow.dsl.ts | 0 .../plugins/siem/server/lib/network/types.ts | 0 .../siem/server/lib/note/saved_object.ts | 6 +- .../server/lib/note/saved_object_mappings.ts | 0 .../plugins/siem/server/lib/note/types.ts | 0 .../lib/overview/elastic_adapter.test.ts | 0 .../lib/overview/elasticsearch_adapter.ts | 0 .../plugins/siem/server/lib/overview/index.ts | 0 .../plugins/siem/server/lib/overview/mock.ts | 2 +- .../siem/server/lib/overview/query.dsl.ts | 0 .../plugins/siem/server/lib/overview/types.ts | 0 .../server/lib/pinned_event/saved_object.ts | 6 +- .../lib/pinned_event/saved_object_mappings.ts | 0 .../siem/server/lib/pinned_event/types.ts | 0 .../source_status/elasticsearch_adapter.ts | 0 .../siem/server/lib/source_status/index.ts | 0 .../server/lib/source_status/query.dsl.ts | 0 .../siem/server/lib/source_status/types.ts | 0 .../server/lib/sources/configuration.test.ts | 2 +- .../siem/server/lib/sources/configuration.ts | 0 .../plugins/siem/server/lib/sources/index.ts | 0 .../plugins/siem/server/lib/sources/types.ts | 0 .../convert_saved_object_to_savedtimeline.ts | 0 .../create_timelines_stream_from_ndjson.ts | 2 +- .../lib/timeline/pick_saved_timeline.ts | 4 +- .../routes/__mocks__/import_timelines.ts | 0 .../routes/__mocks__/request_responses.ts | 2 +- .../routes/export_timelines_route.test.ts | 2 +- .../timeline/routes/export_timelines_route.ts | 4 +- .../routes/import_timelines_route.test.ts | 4 +- .../timeline/routes/import_timelines_route.ts | 6 +- .../routes/schemas/export_timelines_schema.ts | 0 .../routes/schemas/import_timelines_schema.ts | 0 .../lib/timeline/routes/schemas/schemas.ts | 0 .../timeline/routes/utils/export_timelines.ts | 2 +- .../timeline/routes/utils/import_timelines.ts | 0 .../server/lib/timeline/saved_object.test.ts | 0 .../siem/server/lib/timeline/saved_object.ts | 4 +- .../lib/timeline/saved_object_mappings.ts | 0 .../plugins/siem/server/lib/timeline/types.ts | 2 +- .../lib/tls/elasticsearch_adapter.test.ts | 0 .../server/lib/tls/elasticsearch_adapter.ts | 2 +- .../plugins/siem/server/lib/tls/index.ts | 0 .../plugins/siem/server/lib/tls/mock.ts | 0 .../siem/server/lib/tls/query_tls.dsl.ts | 0 .../plugins/siem/server/lib/tls/types.ts | 2 +- .../plugins/siem/server/lib/types.ts | 4 +- .../elasticsearch_adapter.test.ts | 0 .../elasticsearch_adapter.ts | 2 +- .../server/lib/uncommon_processes/index.ts | 0 .../lib/uncommon_processes/query.dsl.ts | 0 .../server/lib/uncommon_processes/types.ts | 0 x-pack/plugins/siem/server/plugin.ts | 195 +++++++++++++++-- .../plugins/siem/server/routes/index.ts | 2 +- .../plugins/siem/server/saved_objects.ts | 0 .../{legacy => }/plugins/siem/server/types.ts | 0 .../utils/beat_schema/8.0.0/auditbeat.ts | 0 .../server/utils/beat_schema/8.0.0/ecs.ts | 0 .../utils/beat_schema/8.0.0/filebeat.ts | 0 .../server/utils/beat_schema/8.0.0/index.ts | 0 .../utils/beat_schema/8.0.0/packetbeat.ts | 0 .../utils/beat_schema/8.0.0/winlogbeat.ts | 0 .../server/utils/beat_schema/index.test.ts | 0 .../siem/server/utils/beat_schema/index.ts | 0 .../siem/server/utils/beat_schema/type.ts | 0 .../calculate_timeseries_interval.ts | 0 .../utils/build_query/create_options.test.ts | 2 +- .../utils/build_query/create_options.ts | 0 .../server/utils/build_query/field.mock.ts | 0 .../server/utils/build_query/fields.test.ts | 0 .../siem/server/utils/build_query/fields.ts | 0 .../siem/server/utils/build_query/filters.ts | 2 +- .../siem/server/utils/build_query/index.ts | 0 .../merge_fields_with_hits.test.ts | 0 .../build_query/merge_fields_with_hits.ts | 0 .../utils/build_query/reduce_fields.test.ts | 0 .../server/utils/build_query/reduce_fields.ts | 0 .../build_validation/route_validation.test.ts | 2 +- .../build_validation/route_validation.ts | 2 +- .../create_stream_from_ndjson.test.ts | 4 +- .../read_stream/create_stream_from_ndjson.ts | 8 +- .../siem/server/utils/serialized_query.ts | 2 +- .../utils/typed_elasticsearch_mappings.ts | 0 .../siem/server/utils/typed_resolvers.ts | 0 .../common/config.ts | 2 +- .../security_and_spaces/tests/utils.ts | 2 +- 765 files changed, 480 insertions(+), 524 deletions(-) delete mode 100644 x-pack/legacy/plugins/siem/server/index.ts delete mode 100644 x-pack/legacy/plugins/siem/server/plugin.ts rename x-pack/{legacy => }/plugins/siem/server/client/client.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/client/client.ts (90%) rename x-pack/{legacy => }/plugins/siem/server/client/factory.test.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/client/factory.ts (93%) rename x-pack/{legacy => }/plugins/siem/server/client/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/authentications/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/authentications/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/authentications/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/ecs/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/ecs/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/ecs/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/events/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/events/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/events/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/hosts/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/hosts/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/hosts/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/index.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/graphql/ip_details/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/ip_details/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/ip_details/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/kpi_hosts/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/kpi_hosts/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/kpi_network/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/kpi_network/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/kpi_network/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/matrix_histogram/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/matrix_histogram/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/network/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/network/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/network/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/note/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/note/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/note/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/overview/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/overview/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/overview/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/pinned_event/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/pinned_event/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/pinned_event/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_date/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_date/resolvers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_date/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_date/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_any/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_any/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_date_array/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_number_array/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/source_status/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/source_status/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/source_status/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/sources/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/sources/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/sources/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/timeline/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/timeline/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/timeline/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/tls/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/tls/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/tls/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/uncommon_processes/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/uncommon_processes/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/who_am_i/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/who_am_i/resolvers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/graphql/who_am_i/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/init_server.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/authentications/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/authentications/query.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/authentications/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/compose/kibana.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/configuration/adapter_types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/configuration/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/feature_flags.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/feature_flags.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/delete_policy.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/delete_template.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/read_index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/set_policy.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/index/set_template.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts (84%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts (77%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts (86%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts (90%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/types.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/types.ts (90%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/notifications/utils.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts (79%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts (79%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts (79%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/__mocks__/utils.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/schemas.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/postive_integer.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts (93%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/utils.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/routes/utils.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/types.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts (89%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts (90%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts (93%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts (93%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/add_tags.ts (84%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/create_rules.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/find_rules.ts (86%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts (93%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts (89%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/read_rules.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/types.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts (86%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/update_rules.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/utils.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/rules/utils.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_list.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_rule.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/build_signal.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/get_filter.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts (78%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts (91%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/types.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/utils.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/signals/utils.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/tags/read_tags.ts (93%) rename x-pack/{legacy => }/plugins/siem/server/lib/detection_engine/types.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/ecs_fields/extend_map.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ecs_fields/extend_map.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ecs_fields/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/mock.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/query.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/query.last_event_time.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/events/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/framework/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/framework/kibana_framework_adapter.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/framework/types.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/helpers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/helpers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/mock.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/query.hosts.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/hosts/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/index_fields/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/index_fields/mock.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/index_fields/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/mock.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/query_overview.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/query_users.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/ip_details/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/helpers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/helpers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/mock.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_hosts/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/helpers.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/mock.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/query_network_events.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/query_unique_flow.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/kpi_network/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/machine_learning/index.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/mock.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/matrix_histogram/utils.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/elastic_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/elasticsearch_adapter.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/mock.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/query_dns.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/query_http.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/query_top_countries.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/network/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/note/saved_object.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/note/saved_object_mappings.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/note/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/overview/elastic_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/overview/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/overview/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/overview/mock.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/overview/query.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/overview/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/pinned_event/saved_object.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/pinned_event/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/source_status/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/source_status/query.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/source_status/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/sources/configuration.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/sources/configuration.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/sources/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/sources/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/pick_saved_timeline.ts (86%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/saved_object.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/saved_object.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/saved_object_mappings.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/timeline/types.ts (99%) rename x-pack/{legacy => }/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/tls/elasticsearch_adapter.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/lib/tls/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/tls/mock.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/tls/query_tls.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/tls/types.ts (94%) rename x-pack/{legacy => }/plugins/siem/server/lib/types.ts (96%) rename x-pack/{legacy => }/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/lib/uncommon_processes/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/uncommon_processes/query.dsl.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/lib/uncommon_processes/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/routes/index.ts (98%) rename x-pack/{legacy => }/plugins/siem/server/saved_objects.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/8.0.0/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/index.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/beat_schema/type.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/create_options.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/create_options.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/field.mock.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/fields.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/fields.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/filters.ts (88%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/reduce_fields.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_query/reduce_fields.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_validation/route_validation.test.ts (97%) rename x-pack/{legacy => }/plugins/siem/server/utils/build_validation/route_validation.ts (95%) rename x-pack/{legacy => }/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts (85%) rename x-pack/{legacy => }/plugins/siem/server/utils/serialized_query.ts (92%) rename x-pack/{legacy => }/plugins/siem/server/utils/typed_elasticsearch_mappings.ts (100%) rename x-pack/{legacy => }/plugins/siem/server/utils/typed_resolvers.ts (100%) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 3773283555b3..82f39f3a37ea 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -9,8 +9,8 @@ import { resolve } from 'path'; import { Server } from 'hapi'; import { Root } from 'joi'; -import { plugin } from './server'; -import { savedObjectMappings } from './server/saved_objects'; +import { plugin } from '../../../plugins/siem/server'; +import { savedObjectMappings } from '../../../plugins/siem/server/saved_objects'; import { APP_ID, diff --git a/x-pack/legacy/plugins/siem/scripts/combined_schema.ts b/x-pack/legacy/plugins/siem/scripts/combined_schema.ts index 625eb3a4a475..3132c272110c 100644 --- a/x-pack/legacy/plugins/siem/scripts/combined_schema.ts +++ b/x-pack/legacy/plugins/siem/scripts/combined_schema.ts @@ -6,7 +6,7 @@ import { buildSchemaFromTypeDefinitions } from 'graphql-tools'; -import { schemas as serverSchemas } from '../server/graphql'; +import { schemas as serverSchemas } from '../../../../plugins/siem/server/graphql'; export const schemas = [...serverSchemas]; diff --git a/x-pack/legacy/plugins/siem/server/index.ts b/x-pack/legacy/plugins/siem/server/index.ts deleted file mode 100644 index 8513f871cb6c..000000000000 --- a/x-pack/legacy/plugins/siem/server/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { PluginInitializerContext } from '../../../../../src/core/server'; -import { Plugin } from './plugin'; - -export const plugin = (context: PluginInitializerContext) => { - return new Plugin(context); -}; diff --git a/x-pack/legacy/plugins/siem/server/plugin.ts b/x-pack/legacy/plugins/siem/server/plugin.ts deleted file mode 100644 index 13b58fa1d57e..000000000000 --- a/x-pack/legacy/plugins/siem/server/plugin.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { i18n } from '@kbn/i18n'; - -import { - PluginStartContract as AlertingStart, - PluginSetupContract as AlertingSetup, -} from '../../../../plugins/alerting/server'; -import { - CoreSetup, - CoreStart, - PluginInitializerContext, - Logger, -} from '../../../../../src/core/server'; -import { SecurityPluginSetup as SecuritySetup } from '../../../../plugins/security/server'; -import { PluginSetupContract as FeaturesSetup } from '../../../../plugins/features/server'; -import { MlPluginSetup as MlSetup } from '../../../../plugins/ml/server'; -import { EncryptedSavedObjectsPluginSetup as EncryptedSavedObjectsSetup } from '../../../../plugins/encrypted_saved_objects/server'; -import { SpacesPluginSetup as SpacesSetup } from '../../../../plugins/spaces/server'; -import { PluginStartContract as ActionsStart } from '../../../../plugins/actions/server'; -import { LicensingPluginSetup } from '../../../../plugins/licensing/server'; -import { LegacyServices } from './types'; -import { initServer } from './init_server'; -import { compose } from './lib/compose/kibana'; -import { initRoutes } from './routes'; -import { isAlertExecutor } from './lib/detection_engine/signals/types'; -import { signalRulesAlertType } from './lib/detection_engine/signals/signal_rule_alert_type'; -import { rulesNotificationAlertType } from './lib/detection_engine/notifications/rules_notification_alert_type'; -import { isNotificationAlertExecutor } from './lib/detection_engine/notifications/types'; -import { - noteSavedObjectType, - pinnedEventSavedObjectType, - timelineSavedObjectType, - ruleStatusSavedObjectType, - ruleActionsSavedObjectType, -} from './saved_objects'; -import { SiemClientFactory } from './client'; -import { hasListsFeature, listsEnvFeatureFlagName } from './lib/detection_engine/feature_flags'; - -export { CoreSetup, CoreStart }; - -export interface SetupPlugins { - alerting: AlertingSetup; - encryptedSavedObjects: EncryptedSavedObjectsSetup; - features: FeaturesSetup; - licensing: LicensingPluginSetup; - security?: SecuritySetup; - spaces?: SpacesSetup; - ml?: MlSetup; -} - -export interface StartPlugins { - actions: ActionsStart; - alerting: AlertingStart; -} - -export class Plugin { - readonly name = 'siem'; - private readonly logger: Logger; - private context: PluginInitializerContext; - private siemClientFactory: SiemClientFactory; - - constructor(context: PluginInitializerContext) { - this.context = context; - this.logger = context.logger.get('plugins', this.name); - this.siemClientFactory = new SiemClientFactory(); - - this.logger.debug('Shim plugin initialized'); - } - - public setup(core: CoreSetup, plugins: SetupPlugins, __legacy: LegacyServices) { - this.logger.debug('Shim plugin setup'); - if (hasListsFeature()) { - // TODO: Remove this once we have the lists feature supported - this.logger.error( - `You have activated the lists feature flag which is NOT currently supported for SIEM! You should turn this feature flag off immediately by un-setting the environment variable: ${listsEnvFeatureFlagName} and restarting Kibana` - ); - } - - const router = core.http.createRouter(); - core.http.registerRouteHandlerContext(this.name, (context, request, response) => ({ - getSiemClient: () => this.siemClientFactory.create(request), - })); - - this.siemClientFactory.setup({ - getSpaceId: plugins.spaces?.spacesService?.getSpaceId, - config: __legacy.config, - }); - - initRoutes( - router, - __legacy.config, - plugins.encryptedSavedObjects?.usingEphemeralEncryptionKey ?? false, - plugins.security - ); - - plugins.features.registerFeature({ - id: this.name, - name: i18n.translate('xpack.siem.featureRegistry.linkSiemTitle', { - defaultMessage: 'SIEM', - }), - order: 1100, - icon: 'securityAnalyticsApp', - navLinkId: 'siem', - app: ['siem', 'kibana'], - catalogue: ['siem'], - privileges: { - all: { - app: ['siem', 'kibana'], - catalogue: ['siem'], - api: ['siem', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], - savedObject: { - all: [ - 'alert', - 'action', - 'action_task_params', - noteSavedObjectType, - pinnedEventSavedObjectType, - timelineSavedObjectType, - ruleStatusSavedObjectType, - ruleActionsSavedObjectType, - 'cases', - 'cases-comments', - 'cases-configure', - 'cases-user-actions', - ], - read: ['config'], - }, - ui: [ - 'show', - 'crud', - 'alerting:show', - 'actions:show', - 'alerting:save', - 'actions:save', - 'alerting:delete', - 'actions:delete', - ], - }, - read: { - app: ['siem', 'kibana'], - catalogue: ['siem'], - api: ['siem', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], - savedObject: { - all: ['alert', 'action', 'action_task_params'], - read: [ - 'config', - noteSavedObjectType, - pinnedEventSavedObjectType, - timelineSavedObjectType, - ruleStatusSavedObjectType, - ruleActionsSavedObjectType, - 'cases', - 'cases-comments', - 'cases-configure', - 'cases-user-actions', - ], - }, - ui: [ - 'show', - 'alerting:show', - 'actions:show', - 'alerting:save', - 'actions:save', - 'alerting:delete', - 'actions:delete', - ], - }, - }, - }); - - if (plugins.alerting != null) { - const signalRuleType = signalRulesAlertType({ - logger: this.logger, - version: this.context.env.packageInfo.version, - ml: plugins.ml, - }); - const ruleNotificationType = rulesNotificationAlertType({ - logger: this.logger, - }); - - if (isAlertExecutor(signalRuleType)) { - plugins.alerting.registerType(signalRuleType); - } - - if (isNotificationAlertExecutor(ruleNotificationType)) { - plugins.alerting.registerType(ruleNotificationType); - } - } - - const libs = compose(core, plugins, this.context.env.mode.prod); - initServer(libs); - } - - public start(core: CoreStart, plugins: StartPlugins) {} -} diff --git a/x-pack/legacy/plugins/siem/server/client/client.test.ts b/x-pack/plugins/siem/server/client/client.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/client/client.test.ts rename to x-pack/plugins/siem/server/client/client.test.ts diff --git a/x-pack/legacy/plugins/siem/server/client/client.ts b/x-pack/plugins/siem/server/client/client.ts similarity index 90% rename from x-pack/legacy/plugins/siem/server/client/client.ts rename to x-pack/plugins/siem/server/client/client.ts index 245b81d0be97..16082b819b24 100644 --- a/x-pack/legacy/plugins/siem/server/client/client.ts +++ b/x-pack/plugins/siem/server/client/client.ts @@ -6,7 +6,7 @@ import { Legacy } from 'kibana'; -import { APP_ID, SIGNALS_INDEX_KEY } from '../../common/constants'; +import { APP_ID, SIGNALS_INDEX_KEY } from 'siem/common/constants'; export class SiemClient { public readonly signalsIndex: string; diff --git a/x-pack/legacy/plugins/siem/server/client/factory.test.ts b/x-pack/plugins/siem/server/client/factory.test.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/client/factory.test.ts rename to x-pack/plugins/siem/server/client/factory.test.ts index c166b6b838be..bdb3b011b6e0 100644 --- a/x-pack/legacy/plugins/siem/server/client/factory.test.ts +++ b/x-pack/plugins/siem/server/client/factory.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { httpServerMock } from '../../../../../../src/core/server/mocks'; +import { httpServerMock } from '../../../../../src/core/server/mocks'; import { SiemClientFactory } from './factory'; import { SiemClient } from './client'; diff --git a/x-pack/legacy/plugins/siem/server/client/factory.ts b/x-pack/plugins/siem/server/client/factory.ts similarity index 93% rename from x-pack/legacy/plugins/siem/server/client/factory.ts rename to x-pack/plugins/siem/server/client/factory.ts index d31920bdf2c7..d0335b333d01 100644 --- a/x-pack/legacy/plugins/siem/server/client/factory.ts +++ b/x-pack/plugins/siem/server/client/factory.ts @@ -6,7 +6,7 @@ import { Legacy } from 'kibana'; -import { KibanaRequest } from '../../../../../../src/core/server'; +import { KibanaRequest } from '../../../../../src/core/server'; import { SiemClient } from './client'; interface SetupDependencies { diff --git a/x-pack/legacy/plugins/siem/server/client/index.ts b/x-pack/plugins/siem/server/client/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/client/index.ts rename to x-pack/plugins/siem/server/client/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/authentications/index.ts b/x-pack/plugins/siem/server/graphql/authentications/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/authentications/index.ts rename to x-pack/plugins/siem/server/graphql/authentications/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/authentications/resolvers.ts b/x-pack/plugins/siem/server/graphql/authentications/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/authentications/resolvers.ts rename to x-pack/plugins/siem/server/graphql/authentications/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/authentications/schema.gql.ts b/x-pack/plugins/siem/server/graphql/authentications/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/authentications/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/authentications/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/ecs/index.ts b/x-pack/plugins/siem/server/graphql/ecs/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/ecs/index.ts rename to x-pack/plugins/siem/server/graphql/ecs/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/ecs/resolvers.ts b/x-pack/plugins/siem/server/graphql/ecs/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/ecs/resolvers.ts rename to x-pack/plugins/siem/server/graphql/ecs/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/ecs/schema.gql.ts b/x-pack/plugins/siem/server/graphql/ecs/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/ecs/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/ecs/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/events/index.ts b/x-pack/plugins/siem/server/graphql/events/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/events/index.ts rename to x-pack/plugins/siem/server/graphql/events/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/events/resolvers.ts b/x-pack/plugins/siem/server/graphql/events/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/events/resolvers.ts rename to x-pack/plugins/siem/server/graphql/events/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/events/schema.gql.ts b/x-pack/plugins/siem/server/graphql/events/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/events/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/events/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/hosts/index.ts b/x-pack/plugins/siem/server/graphql/hosts/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/hosts/index.ts rename to x-pack/plugins/siem/server/graphql/hosts/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/hosts/resolvers.ts b/x-pack/plugins/siem/server/graphql/hosts/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/hosts/resolvers.ts rename to x-pack/plugins/siem/server/graphql/hosts/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/hosts/schema.gql.ts b/x-pack/plugins/siem/server/graphql/hosts/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/hosts/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/hosts/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/index.ts b/x-pack/plugins/siem/server/graphql/index.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/graphql/index.ts rename to x-pack/plugins/siem/server/graphql/index.ts index 7e2573570789..3ddd1359fdd4 100644 --- a/x-pack/legacy/plugins/siem/server/graphql/index.ts +++ b/x-pack/plugins/siem/server/graphql/index.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { rootSchema } from '../../common/graphql/root'; -import { sharedSchema } from '../../common/graphql/shared'; +import { rootSchema } from 'siem/common/graphql/root'; +import { sharedSchema } from 'siem/common/graphql/shared'; import { authenticationsSchema } from './authentications'; import { ecsSchema } from './ecs'; diff --git a/x-pack/legacy/plugins/siem/server/graphql/ip_details/index.ts b/x-pack/plugins/siem/server/graphql/ip_details/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/ip_details/index.ts rename to x-pack/plugins/siem/server/graphql/ip_details/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/ip_details/resolvers.ts b/x-pack/plugins/siem/server/graphql/ip_details/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/ip_details/resolvers.ts rename to x-pack/plugins/siem/server/graphql/ip_details/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/ip_details/schema.gql.ts b/x-pack/plugins/siem/server/graphql/ip_details/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/ip_details/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/ip_details/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/kpi_hosts/index.ts b/x-pack/plugins/siem/server/graphql/kpi_hosts/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/kpi_hosts/index.ts rename to x-pack/plugins/siem/server/graphql/kpi_hosts/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/kpi_hosts/resolvers.ts b/x-pack/plugins/siem/server/graphql/kpi_hosts/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/kpi_hosts/resolvers.ts rename to x-pack/plugins/siem/server/graphql/kpi_hosts/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts b/x-pack/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/kpi_hosts/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/kpi_network/index.ts b/x-pack/plugins/siem/server/graphql/kpi_network/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/kpi_network/index.ts rename to x-pack/plugins/siem/server/graphql/kpi_network/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/kpi_network/resolvers.ts b/x-pack/plugins/siem/server/graphql/kpi_network/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/kpi_network/resolvers.ts rename to x-pack/plugins/siem/server/graphql/kpi_network/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/kpi_network/schema.gql.ts b/x-pack/plugins/siem/server/graphql/kpi_network/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/kpi_network/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/kpi_network/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/matrix_histogram/index.ts b/x-pack/plugins/siem/server/graphql/matrix_histogram/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/matrix_histogram/index.ts rename to x-pack/plugins/siem/server/graphql/matrix_histogram/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/matrix_histogram/resolvers.ts b/x-pack/plugins/siem/server/graphql/matrix_histogram/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/matrix_histogram/resolvers.ts rename to x-pack/plugins/siem/server/graphql/matrix_histogram/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts b/x-pack/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/matrix_histogram/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/network/index.ts b/x-pack/plugins/siem/server/graphql/network/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/network/index.ts rename to x-pack/plugins/siem/server/graphql/network/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/network/resolvers.ts b/x-pack/plugins/siem/server/graphql/network/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/network/resolvers.ts rename to x-pack/plugins/siem/server/graphql/network/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/network/schema.gql.ts b/x-pack/plugins/siem/server/graphql/network/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/network/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/network/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/note/index.ts b/x-pack/plugins/siem/server/graphql/note/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/note/index.ts rename to x-pack/plugins/siem/server/graphql/note/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/note/resolvers.ts b/x-pack/plugins/siem/server/graphql/note/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/note/resolvers.ts rename to x-pack/plugins/siem/server/graphql/note/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/note/schema.gql.ts b/x-pack/plugins/siem/server/graphql/note/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/note/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/note/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/overview/index.ts b/x-pack/plugins/siem/server/graphql/overview/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/overview/index.ts rename to x-pack/plugins/siem/server/graphql/overview/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/overview/resolvers.ts b/x-pack/plugins/siem/server/graphql/overview/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/overview/resolvers.ts rename to x-pack/plugins/siem/server/graphql/overview/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/overview/schema.gql.ts b/x-pack/plugins/siem/server/graphql/overview/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/overview/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/overview/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/pinned_event/index.ts b/x-pack/plugins/siem/server/graphql/pinned_event/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/pinned_event/index.ts rename to x-pack/plugins/siem/server/graphql/pinned_event/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/pinned_event/resolvers.ts b/x-pack/plugins/siem/server/graphql/pinned_event/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/pinned_event/resolvers.ts rename to x-pack/plugins/siem/server/graphql/pinned_event/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/pinned_event/schema.gql.ts b/x-pack/plugins/siem/server/graphql/pinned_event/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/pinned_event/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/pinned_event/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_date/index.ts b/x-pack/plugins/siem/server/graphql/scalar_date/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_date/index.ts rename to x-pack/plugins/siem/server/graphql/scalar_date/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_date/resolvers.test.ts b/x-pack/plugins/siem/server/graphql/scalar_date/resolvers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_date/resolvers.test.ts rename to x-pack/plugins/siem/server/graphql/scalar_date/resolvers.test.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_date/resolvers.ts b/x-pack/plugins/siem/server/graphql/scalar_date/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_date/resolvers.ts rename to x-pack/plugins/siem/server/graphql/scalar_date/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_date/schema.gql.ts b/x-pack/plugins/siem/server/graphql/scalar_date/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_date/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/scalar_date/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_any/index.ts b/x-pack/plugins/siem/server/graphql/scalar_to_any/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_any/index.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_any/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_any/resolvers.ts b/x-pack/plugins/siem/server/graphql/scalar_to_any/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_any/resolvers.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_any/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts b/x-pack/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_any/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts b/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts b/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.test.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts b/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts b/x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_boolean_array/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/index.ts b/x-pack/plugins/siem/server/graphql/scalar_to_date_array/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/index.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_date_array/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts b/x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.test.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts b/x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_date_array/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts b/x-pack/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_date_array/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/index.ts b/x-pack/plugins/siem/server/graphql/scalar_to_number_array/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/index.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_number_array/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts b/x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.test.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts b/x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_number_array/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts b/x-pack/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/scalar_to_number_array/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/source_status/index.ts b/x-pack/plugins/siem/server/graphql/source_status/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/source_status/index.ts rename to x-pack/plugins/siem/server/graphql/source_status/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/source_status/resolvers.ts b/x-pack/plugins/siem/server/graphql/source_status/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/source_status/resolvers.ts rename to x-pack/plugins/siem/server/graphql/source_status/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/source_status/schema.gql.ts b/x-pack/plugins/siem/server/graphql/source_status/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/source_status/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/source_status/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/sources/index.ts b/x-pack/plugins/siem/server/graphql/sources/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/sources/index.ts rename to x-pack/plugins/siem/server/graphql/sources/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/sources/resolvers.ts b/x-pack/plugins/siem/server/graphql/sources/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/sources/resolvers.ts rename to x-pack/plugins/siem/server/graphql/sources/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/sources/schema.gql.ts b/x-pack/plugins/siem/server/graphql/sources/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/sources/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/sources/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/timeline/index.ts b/x-pack/plugins/siem/server/graphql/timeline/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/timeline/index.ts rename to x-pack/plugins/siem/server/graphql/timeline/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/timeline/resolvers.ts b/x-pack/plugins/siem/server/graphql/timeline/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/timeline/resolvers.ts rename to x-pack/plugins/siem/server/graphql/timeline/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/timeline/schema.gql.ts b/x-pack/plugins/siem/server/graphql/timeline/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/timeline/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/timeline/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/tls/index.ts b/x-pack/plugins/siem/server/graphql/tls/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/tls/index.ts rename to x-pack/plugins/siem/server/graphql/tls/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/tls/resolvers.ts b/x-pack/plugins/siem/server/graphql/tls/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/tls/resolvers.ts rename to x-pack/plugins/siem/server/graphql/tls/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/tls/schema.gql.ts b/x-pack/plugins/siem/server/graphql/tls/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/tls/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/tls/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/types.ts b/x-pack/plugins/siem/server/graphql/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/types.ts rename to x-pack/plugins/siem/server/graphql/types.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/uncommon_processes/index.ts b/x-pack/plugins/siem/server/graphql/uncommon_processes/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/uncommon_processes/index.ts rename to x-pack/plugins/siem/server/graphql/uncommon_processes/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/uncommon_processes/resolvers.ts b/x-pack/plugins/siem/server/graphql/uncommon_processes/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/uncommon_processes/resolvers.ts rename to x-pack/plugins/siem/server/graphql/uncommon_processes/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts b/x-pack/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/uncommon_processes/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/who_am_i/index.ts b/x-pack/plugins/siem/server/graphql/who_am_i/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/who_am_i/index.ts rename to x-pack/plugins/siem/server/graphql/who_am_i/index.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/who_am_i/resolvers.ts b/x-pack/plugins/siem/server/graphql/who_am_i/resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/who_am_i/resolvers.ts rename to x-pack/plugins/siem/server/graphql/who_am_i/resolvers.ts diff --git a/x-pack/legacy/plugins/siem/server/graphql/who_am_i/schema.gql.ts b/x-pack/plugins/siem/server/graphql/who_am_i/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/graphql/who_am_i/schema.gql.ts rename to x-pack/plugins/siem/server/graphql/who_am_i/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/server/init_server.ts b/x-pack/plugins/siem/server/init_server.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/init_server.ts rename to x-pack/plugins/siem/server/init_server.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts index 79f13ce4461e..3d313d4b4b44 100644 --- a/x-pack/legacy/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts @@ -10,7 +10,7 @@ import { AuthenticationsData, AuthenticationsEdges } from '../../graphql/types'; import { mergeFieldsWithHit, inspectStringifyObject } from '../../utils/build_query'; import { FrameworkAdapter, FrameworkRequest, RequestOptionsPaginated } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; import { auditdFieldsMap, buildQuery } from './query.dsl'; import { diff --git a/x-pack/legacy/plugins/siem/server/lib/authentications/index.ts b/x-pack/plugins/siem/server/lib/authentications/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/authentications/index.ts rename to x-pack/plugins/siem/server/lib/authentications/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/authentications/query.dsl.ts b/x-pack/plugins/siem/server/lib/authentications/query.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/authentications/query.dsl.ts rename to x-pack/plugins/siem/server/lib/authentications/query.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/authentications/types.ts b/x-pack/plugins/siem/server/lib/authentications/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/authentications/types.ts rename to x-pack/plugins/siem/server/lib/authentications/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/compose/kibana.ts b/x-pack/plugins/siem/server/lib/compose/kibana.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/compose/kibana.ts rename to x-pack/plugins/siem/server/lib/compose/kibana.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/configuration/adapter_types.ts b/x-pack/plugins/siem/server/lib/configuration/adapter_types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/configuration/adapter_types.ts rename to x-pack/plugins/siem/server/lib/configuration/adapter_types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/configuration/index.ts b/x-pack/plugins/siem/server/lib/configuration/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/configuration/index.ts rename to x-pack/plugins/siem/server/lib/configuration/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts b/x-pack/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts rename to x-pack/plugins/siem/server/lib/configuration/inmemory_configuration_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/README.md b/x-pack/plugins/siem/server/lib/detection_engine/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts b/x-pack/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts rename to x-pack/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/feature_flags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/feature_flags.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/feature_flags.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/feature_flags.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/feature_flags.ts b/x-pack/plugins/siem/server/lib/detection_engine/feature_flags.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/feature_flags.ts rename to x-pack/plugins/siem/server/lib/detection_engine/feature_flags.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/delete_all_index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/delete_policy.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/delete_policy.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/delete_policy.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/delete_policy.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/delete_template.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/delete_template.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/delete_template.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/delete_template.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/get_index_exists.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/get_policy_exists.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/get_template_exists.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/read_index.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/read_index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/read_index.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/read_index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/set_policy.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/set_policy.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/set_policy.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/set_policy.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/set_template.ts b/x-pack/plugins/siem/server/lib/detection_engine/index/set_template.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/index/set_template.ts rename to x-pack/plugins/siem/server/lib/detection_engine/index/set_template.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts index e14d20e3bc56..796b024a8557 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts @@ -5,7 +5,7 @@ */ import { addTags } from './add_tags'; -import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; +import { INTERNAL_RULE_ALERT_ID_KEY } from 'siem/common/constants'; describe('add_tags', () => { test('it should add a rule id as an internal structure', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts similarity index 84% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts index 14b2e1ae9e36..6245182c795f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; +import { INTERNAL_RULE_ALERT_ID_KEY } from 'siem/common/constants'; export const addTags = (tags: string[], ruleAlertId: string): string[] => Array.from(new Set([...tags, `${INTERNAL_RULE_ALERT_ID_KEY}:${ruleAlertId}`])); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/build_signals_query.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts index 3878f5dae888..e0414f842ceb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { createNotifications } from './create_notifications'; describe('createNotifications', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts similarity index 77% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts index ccd7576255d8..50b3efd388b8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts @@ -4,11 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Alert } from '../../../../../../../plugins/alerting/common'; -import { APP_ID, NOTIFICATIONS_ID } from '../../../../common/constants'; +import { Alert } from '../../../../../alerting/common'; +import { APP_ID, NOTIFICATIONS_ID } from 'siem/common/constants'; import { CreateNotificationParams } from './types'; import { addTags } from './add_tags'; -import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; +import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; export const createNotifications = async ({ alertsClient, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts index 7e5c0eaf6286..089822f486ae 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { deleteNotifications } from './delete_notifications'; import { readNotifications } from './read_notifications'; jest.mock('./read_notifications'); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/delete_notifications.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts index 0e9e4a8370ec..6bcc96a553d3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts @@ -5,7 +5,7 @@ */ import { getFilter } from './find_notifications'; -import { NOTIFICATIONS_ID } from '../../../../common/constants'; +import { NOTIFICATIONS_ID } from 'siem/common/constants'; describe('find_notifications', () => { test('it returns a full filter with an AND if sent down', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts similarity index 86% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts index fcdeda608fe4..536734beba36 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { FindResult } from '../../../../../../../plugins/alerting/server'; -import { NOTIFICATIONS_ID } from '../../../../common/constants'; +import { FindResult } from '../../../../../alerting/server'; +import { NOTIFICATIONS_ID } from 'siem/common/constants'; import { FindNotificationParams } from './types'; export const getFilter = (filter: string | null | undefined) => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts index 7ff6a4e5164b..69f37da1e225 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/get_signals_count.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { AlertServices } from '../../../../../alerting/server'; import { buildSignalsSearchQuery } from './build_signals_query'; interface GetSignalsCount { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts index 834ad2460959..961aac15c484 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.test.ts @@ -5,7 +5,7 @@ */ import { readNotifications } from './read_notifications'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getNotificationResult, getFindNotificationsResultWithSingleHit, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts similarity index 90% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts index 87bdd6f3f40e..c05d178bba2f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SanitizedAlert } from '../../../../../../../plugins/alerting/common'; +import { SanitizedAlert } from '../../../../../alerting/common'; import { ReadNotificationParams, isAlertType } from './types'; import { findNotifications } from './find_notifications'; -import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; +import { INTERNAL_RULE_ALERT_ID_KEY } from 'siem/common/constants'; export const readNotifications = async ({ alertsClient, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts index f537b22bac1e..6244a4cc64e6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.test.ts @@ -8,7 +8,7 @@ import { loggerMock } from 'src/core/server/logging/logger.mock'; import { getResult } from '../routes/__mocks__/request_responses'; import { rulesNotificationAlertType } from './rules_notification_alert_type'; import { buildSignalsSearchQuery } from './build_signals_query'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../../plugins/alerting/server/mocks'; import { NotificationExecutorOptions } from './types'; jest.mock('./build_signals_query'); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts index e4ad53de742d..601a33c2d5ed 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts @@ -6,7 +6,7 @@ import { Logger } from 'src/core/server'; import { schema } from '@kbn/config-schema'; -import { NOTIFICATIONS_ID } from '../../../../common/constants'; +import { NOTIFICATIONS_ID } from 'siem/common/constants'; import { NotificationAlertTypeDefinition } from './types'; import { getSignalsCount } from './get_signals_count'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts index 9f145af79ca9..a0bd5e092c6e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/schedule_notification_actions.ts @@ -5,7 +5,7 @@ */ import { mapKeys, snakeCase } from 'lodash/fp'; -import { AlertInstance } from '../../../../../../../plugins/alerting/server'; +import { AlertInstance } from '../../../../../alerting/server'; import { RuleTypeParams } from '../types'; export type NotificationRuleTypeParams = RuleTypeParams & { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/types.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/types.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/types.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts similarity index 90% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/types.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts index 32a8737adc7c..e75d00bd6c38 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts @@ -10,10 +10,10 @@ import { AlertType, State, AlertExecutorOptions, -} from '../../../../../../../plugins/alerting/server'; -import { Alert } from '../../../../../../../plugins/alerting/common'; -import { NOTIFICATIONS_ID } from '../../../../common/constants'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +} from '../../../../../alerting/server'; +import { Alert } from '../../../../../alerting/common'; +import { NOTIFICATIONS_ID } from 'siem/common/constants'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; export interface RuleNotificationAlertType extends Alert { params: { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts index e1f7526438c3..b9dc42b96696 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { updateNotifications } from './update_notifications'; import { readNotifications } from './read_notifications'; import { createNotifications } from './create_notifications'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts index ac0de406aceb..29c1b3bf6a45 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts @@ -4,12 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ -import { PartialAlert } from '../../../../../../../plugins/alerting/server'; +import { PartialAlert } from '../../../../../alerting/server'; import { readNotifications } from './read_notifications'; import { UpdateNotificationParams } from './types'; import { addTags } from './add_tags'; import { createNotifications } from './create_notifications'; -import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; +import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; export const updateNotifications = async ({ alertsClient, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/notifications/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/notifications/utils.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts b/x-pack/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts rename to x-pack/plugins/siem/server/lib/detection_engine/privileges/read_privileges.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts similarity index 79% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts index 8856a3463aab..5f9246db7dfd 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { httpServerMock } from '../../../../../../../../../src/core/server/mocks'; +import { httpServerMock } from '../../../../../../../../src/core/server/mocks'; export const requestMock = { create: httpServerMock.createKibanaRequest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts similarity index 79% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts index 2e5c29bc0221..10efdb518f7b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -4,15 +4,15 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RequestHandlerContext } from '../../../../../../../../../src/core/server'; +import { RequestHandlerContext } from '../../../../../../../../src/core/server'; import { coreMock, elasticsearchServiceMock, savedObjectsClientMock, -} from '../../../../../../../../../src/core/server/mocks'; -import { alertsClientMock } from '../../../../../../../../plugins/alerting/server/mocks'; -import { actionsClientMock } from '../../../../../../../../plugins/actions/server/mocks'; -import { licensingMock } from '../../../../../../../../plugins/licensing/server/mocks'; +} from '../../../../../../../../src/core/server/mocks'; +import { alertsClientMock } from '../../../../../../alerting/server/mocks'; +import { actionsClientMock } from '../../../../../../actions/server/mocks'; +import { licensingMock } from '../../../../../../licensing/server/mocks'; const createMockClients = () => ({ actionsClient: actionsClientMock.create(), diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts index 94097df48949..af6a38c3f1ed 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts @@ -5,7 +5,7 @@ */ import { SavedObjectsFindResponse } from 'kibana/server'; -import { ActionResult } from '../../../../../../../../plugins/actions/server'; +import { ActionResult } from '../../../../../../actions/server'; import { SignalsStatusRestParams, SignalsQueryRestParams, @@ -19,7 +19,7 @@ import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY, DETECTION_ENGINE_PREPACKAGED_URL, -} from '../../../../../common/constants'; +} from 'siem/common/constants'; import { ShardsResponse } from '../../../types'; import { RuleAlertType, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts similarity index 79% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts index 3e0eda996140..e6c03d382d9d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/response_factory.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { httpServerMock } from '../../../../../../../../../src/core/server/mocks'; +import { httpServerMock } from '../../../../../../../../src/core/server/mocks'; export const responseMock = { create: httpServerMock.createResponseFactory, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts index 824d1f2bec33..c08e626adb32 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/server.ts @@ -9,8 +9,8 @@ import { RouteConfig, KibanaRequest, RequestHandlerContext, -} from '../../../../../../../../../src/core/server'; -import { httpServiceMock } from '../../../../../../../../../src/core/server/mocks'; +} from '../../../../../../../../src/core/server'; +import { httpServiceMock } from '../../../../../../../../src/core/server/mocks'; import { requestContextMock } from './request_context'; import { responseMock as responseFactoryMock } from './response_factory'; import { requestMock } from '.'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/test_adapters.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/utils.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts index 3195483013c1..41aa96dbc4dd 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_INDEX_URL } from 'siem/common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getIndexExists } from '../../index/get_index_exists'; import { getPolicyExists } from '../../index/get_policy_exists'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts index c667e7ae9c46..1a3641471919 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_INDEX_URL } from 'siem/common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getIndexExists } from '../../index/get_index_exists'; import { getPolicyExists } from '../../index/get_policy_exists'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/ecs_mapping.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts index 047176f15561..48bd18a4f69f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_INDEX_URL } from 'siem/common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getIndexExists } from '../../index/get_index_exists'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json rename to x-pack/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts index 3209f5ce9f51..ce44f71ef721 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { securityMock } from '../../../../../../../../plugins/security/server/mocks'; +import { securityMock } from '../../../../../../security/server/mocks'; import { readPrivilegesRoute } from './read_privileges_route'; import { serverMock, requestContextMock } from '../__mocks__'; import { getPrivilegeRequest, getMockPrivilegesResult } from '../__mocks__/request_responses'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts index d86880de6538..5fb6bbde7353 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts @@ -6,8 +6,8 @@ import { merge } from 'lodash/fp'; -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_PRIVILEGES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_PRIVILEGES_URL } from 'siem/common/constants'; import { SetupPlugins } from '../../../../plugin'; import { buildSiemResponse, transformError } from '../utils'; import { readPrivileges } from '../../privileges/read_privileges'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index 3eba04debb21..fc2e7433f377 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from 'siem/common/constants'; import { getIndexExists } from '../../index/get_index_exists'; import { transformError, buildSiemResponse } from '../utils'; import { getPrepackagedRules } from '../../rules/get_prepackaged_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts index e6facf6f3b7a..97c9da99225d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { typicalPayload, getReadBulkRequest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index 5377e9039785..d78ff01e7c0d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -6,8 +6,8 @@ import uuid from 'uuid'; -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { createRules } from '../../rules/create_rules'; import { RuleAlertParamsRest } from '../../types'; import { readRules } from '../../rules/read_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts index f15f47432f83..b11210d6f532 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getEmptyFindResult, getResult, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts index 9a329b78b8f1..0e30b7f0d872 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -6,8 +6,8 @@ import uuid from 'uuid'; -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { createRules } from '../../rules/create_rules'; import { IRuleSavedAttributesSavedObjectAttributes } from '../../rules/types'; import { readRules } from '../../rules/read_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts index f2da3ab4be8f..64c66b5fe8b2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getEmptyFindResult, getFindResultWithSingleHit, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts index 0c5ad2e06092..47bcffeceb2e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter, RouteConfig, RequestHandler } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter, RouteConfig, RequestHandler } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { queryRulesBulkSchema } from '../schemas/query_rules_bulk_schema'; import { rulesBulkSchema } from '../schemas/response/rules_bulk_schema'; import { getIdBulkError } from './utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts index e30f332ecd1c..cff70a360bf8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getEmptyFindResult, getResult, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts index 71724e3ba9b5..01e805ce6cf4 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { deleteRules } from '../../rules/delete_rules'; import { queryRulesSchema } from '../schemas/query_rules_schema'; import { getIdError } from './utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts index 50eafe163c26..9299341de2ca 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { LegacyServices } from '../../../../types'; import { ExportRulesRequestParams } from '../../rules/types'; import { getNonPackagedRulesCount } from '../../rules/get_existing_prepackaged_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts index b4591a8141f7..d978dec21364 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getResult, getFindRequest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts index 85555c1a5708..a15358780997 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { findRules } from '../../rules/find_rules'; import { FindRulesRequestParams, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts index d7c6d317227f..fc59d5d6238f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getFindResultStatus, ruleStatusRequest } from '../__mocks__/request_responses'; import { serverMock, requestContextMock, requestMock } from '../__mocks__'; import { findRulesStatusesRoute } from './find_rules_status_route'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts index 8eed14653771..f3e596ceaa8a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { findRulesStatusesSchema } from '../schemas/find_rules_statuses_schema'; import { FindRulesStatusesRequestParams, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts index 7f0bf4bf8117..1d5d0a9c35a6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from 'siem/common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getPrepackagedRules } from '../../rules/get_prepackaged_rules'; import { getRulesToInstall } from '../../rules/get_rules_to_install'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index 61f5e6faf1bd..089c56b3622e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -23,7 +23,7 @@ import { } from '../__mocks__/request_responses'; import { createMockConfig, requestContextMock, serverMock, requestMock } from '../__mocks__'; import { importRulesRoute } from './import_rules_route'; -import { DEFAULT_SIGNALS_INDEX } from '../../../../../common/constants'; +import { DEFAULT_SIGNALS_INDEX } from 'siem/common/constants'; import * as createRulesStreamFromNdJson from '../../rules/create_rules_stream_from_ndjson'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts index 57ccc7a7806a..20c58d1359a9 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -7,9 +7,9 @@ import { chunk } from 'lodash/fp'; import { extname } from 'path'; -import { IRouter } from '../../../../../../../../../src/core/server'; -import { createPromiseFromStreams } from '../../../../../../../../../src/legacy/utils/streams'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { createPromiseFromStreams } from '../../../../../../../../src/legacy/utils/streams'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { LegacyServices } from '../../../../types'; import { createRules } from '../../rules/create_rules'; import { ImportRulesRequestParams } from '../../rules/types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts index a1f39936dd67..3d4bf104a6f4 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getEmptyFindResult, typicalPayload, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts index 8c0fceb7a5f2..25ecfac09409 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { IRuleSavedAttributesSavedObjectAttributes, PatchRuleAlertParamsRest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts index dbb0a3bb3e1d..2b600d456b23 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getEmptyFindResult, getFindResultStatus, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts index 9c5000d70e5f..85181b625901 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { patchRules } from '../../rules/patch_rules'; import { PatchRuleAlertParamsRest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts index 982e1bb47a53..bd948a4c3974 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { readRulesRoute } from './read_rules_route'; import { getEmptyFindResult, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts index 77747448e94f..fe13016edc67 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { getIdError } from './utils'; import { transformValidate } from './validate'; import { buildRouteValidation, transformError, buildSiemResponse } from '../utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts index 332a47d0c0fc..04200611ea0e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts @@ -16,7 +16,7 @@ import { import { serverMock, requestContextMock, requestMock } from '../__mocks__'; import { updateRulesBulkRoute } from './update_rules_bulk_route'; import { BulkError } from '../utils'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; describe('update_rules_bulk', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts index 36e15780f5cb..14621ac6212b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { IRuleSavedAttributesSavedObjectAttributes, UpdateRuleAlertParamsRest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts index 53c52153e84e..237451d2c995 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts @@ -16,7 +16,7 @@ import { typicalMlRulePayload, } from '../__mocks__/request_responses'; import { requestContextMock, serverMock, requestMock } from '../__mocks__'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; import { updateRulesNotifications } from '../../rules/update_rules_notifications'; jest.mock('../../rules/update_rules_notifications'); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts index 0444c757a9b3..d43c05225f4b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; import { UpdateRuleAlertParamsRest, IRuleSavedAttributesSavedObjectAttributes, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts index 8b1b0cab3b2f..fb57a78f3d35 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts @@ -18,16 +18,16 @@ import { getTupleDuplicateErrorsAndUniqueRules, } from './utils'; import { getResult } from '../__mocks__/request_responses'; -import { INTERNAL_IDENTIFIER } from '../../../../../common/constants'; +import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; import { ImportRuleAlertRest, RuleAlertParamsRest, RuleTypeParams } from '../../types'; import { BulkError, ImportSuccessError } from '../utils'; import { getSimpleRule, getOutputRuleAlertForRest } from '../__mocks__/utils'; -import { createPromiseFromStreams } from '../../../../../../../../../src/legacy/utils/streams'; -import { PartialAlert } from '../../../../../../../../plugins/alerting/server'; -import { SanitizedAlert } from '../../../../../../../../plugins/alerting/server/types'; +import { createPromiseFromStreams } from '../../../../../../../../src/legacy/utils/streams'; +import { PartialAlert } from '../../../../../../alerting/server'; +import { SanitizedAlert } from '../../../../../../alerting/server/types'; +import { createRulesStreamFromNdJson } from '../../rules/create_rules_stream_from_ndjson'; import { RuleAlertType } from '../../rules/types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; -import { createRulesStreamFromNdJson } from '../../rules/create_rules_stream_from_ndjson'; type PromiseFromStreams = ImportRuleAlertRest | Error; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts index 790603fa8cfc..1fa2dbf011d7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts @@ -8,8 +8,8 @@ import { pickBy, countBy } from 'lodash/fp'; import { SavedObject, SavedObjectsFindResponse } from 'kibana/server'; import uuid from 'uuid'; -import { PartialAlert, FindResult } from '../../../../../../../../plugins/alerting/server'; -import { INTERNAL_IDENTIFIER } from '../../../../../common/constants'; +import { PartialAlert, FindResult } from '../../../../../../alerting/server'; +import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; import { RuleAlertType, isAlertType, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts index 7537401e5a36..3de801a5b6b1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts @@ -13,7 +13,7 @@ import { transformValidateBulkError, } from './validate'; import { getResult } from '../__mocks__/request_responses'; -import { FindResult } from '../../../../../../../../plugins/alerting/server'; +import { FindResult } from '../../../../../../alerting/server'; import { RulesSchema } from '../schemas/response/rules_schema'; import { BulkError } from '../utils'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts index 1f3d1ec85668..c207d075331b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.ts @@ -9,7 +9,7 @@ import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; import * as t from 'io-ts'; -import { PartialAlert, FindResult } from '../../../../../../../../plugins/alerting/server'; +import { PartialAlert, FindResult } from '../../../../../../alerting/server'; import { formatErrors } from '../schemas/response/utils'; import { isAlertType, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts index 8c741c937bf1..5c4e552fbd6e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertAction } from '../../../../../../../../plugins/alerting/common'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import { AlertAction } from '../../../../../../alerting/common'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { ThreatParams, PrepackagedRules } from '../../types'; import { addPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts index 006fc81e3ee8..1bc98c35e918 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts @@ -42,7 +42,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; +import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; import { hasListsFeature } from '../../feature_flags'; /** diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_bulk_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts index e56e8e5fe34d..69f2997c97be 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertAction } from '../../../../../../../../plugins/alerting/common'; +import { AlertAction } from '../../../../../../alerting/common'; import { createRulesSchema } from './create_rules_schema'; import { PatchRuleAlertParamsRest } from '../../rules/types'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { ThreatParams, RuleAlertParamsRest } from '../../types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts index 5213f3faaf48..ec6cecc75279 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts @@ -42,7 +42,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; +import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; import { hasListsFeature } from '../../feature_flags'; export const createRulesSchema = Joi.object({ diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/export_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/find_rules_statuses_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts index 40f7b19ea12b..28e1617c9008 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts @@ -4,13 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertAction } from '../../../../../../../../plugins/alerting/common'; +import { AlertAction } from '../../../../../../alerting/common'; import { importRulesSchema, importRulesQuerySchema, importRulesPayloadSchema, } from './import_rules_schema'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { ThreatParams, ImportRuleAlertRest } from '../../types'; import { ImportRulesRequestParams } from '../../rules/types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts index 56aa45659fda..decc167335be 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts @@ -48,7 +48,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; +import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; import { hasListsFeature } from '../../feature_flags'; /** diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_bulk_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts index e01a8f40fcea..6a9aeb4b347f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertAction } from '../../../../../../../../plugins/alerting/common'; +import { AlertAction } from '../../../../../../alerting/common'; import { patchRulesSchema } from './patch_rules_schema'; import { PatchRuleAlertParamsRest } from '../../rules/types'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { ThreatParams } from '../../types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_bulk_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/query_signals_index_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/__mocks__/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/__mocks__/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/__mocks__/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/__mocks__/utils.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts index 25e76f367037..b3c6e4321fde 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts @@ -8,7 +8,7 @@ import * as t from 'io-ts'; import { Either, left, fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; +import { isMlRule } from 'siem/common/detection_engine/ml_helpers'; import { dependentRulesSchema, RequiredRulesSchema, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/error_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/exact_check.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/find_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/import_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/prepackaged_rules_status_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_bulk_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/rules_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/schemas.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/schemas.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/schemas.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/schemas.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/type_timeline_only_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/utils.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/set_signal_status_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/iso_date_string.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/lists_default_array.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/positive_integer_greater_than_zero.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/postive_integer.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/postive_integer.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/postive_integer.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/postive_integer.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/references_default_array.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/risk_score.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/types/uuid.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_bulk_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts index e8f9aad620ca..008f09fb3fca 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertAction } from '../../../../../../../../plugins/alerting/common'; +import { AlertAction } from '../../../../../../alerting/common'; import { updateRulesSchema } from './update_rules_schema'; import { PatchRuleAlertParamsRest } from '../../rules/types'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { ThreatParams, RuleAlertParamsRest } from '../../types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts index f842c14f41ae..75c8ad91d7db 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts @@ -43,7 +43,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; +import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; import { hasListsFeature } from '../../feature_flags'; /** diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts index 72f3c89f660c..d9b8d8489675 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from 'siem/common/constants'; import { getSetSignalStatusByIdsRequest, getSetSignalStatusByQueryRequest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts similarity index 93% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts index 2daf63c46859..3f52542c5ce8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from 'siem/common/constants'; import { SignalsStatusRestParams } from '../../signals/types'; import { setSignalsStatusSchema } from '../schemas/set_signal_status_schema'; import { transformError, buildRouteValidation, buildSiemResponse } from '../utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts index 8d7b171a8537..b2243e1fa60f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../common/constants'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from 'siem/common/constants'; import { getSignalsQueryRequest, getSignalsAggsQueryRequest, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts index f05f494619b9..c7c8558f882d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from 'siem/common/constants'; import { SignalsQueryRestParams } from '../../signals/types'; import { querySignalsSchema } from '../schemas/query_signals_index_schema'; import { transformError, buildRouteValidation, buildSiemResponse } from '../utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts index adabc62a9456..e87ca3dcd6b7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_TAGS_URL } from '../../../../../common/constants'; +import { IRouter } from '../../../../../../../../src/core/server'; +import { DETECTION_ENGINE_TAGS_URL } from 'siem/common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { readTags } from '../../tags/read_tags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/utils.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/utils.test.ts index 9efe4e491968..8af5df605691 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/utils.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.test.ts @@ -23,7 +23,7 @@ import { } from './utils'; import { responseMock } from './__mocks__'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../feature_flags'; -import { licensingMock } from '../../../../../../../plugins/licensing/server/mocks'; +import { licensingMock } from '../../../../../licensing/server/mocks'; describe('utils', () => { beforeAll(() => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts index e4015ad8bafa..2e7964bfb401 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts @@ -13,11 +13,11 @@ import { RouteValidationFunction, KibanaResponseFactory, CustomHttpResponseOptions, -} from '../../../../../../../../src/core/server'; -import { ILicense } from '../../../../../../../plugins/licensing/server'; -import { MINIMUM_ML_LICENSE } from '../../../../common/constants'; -import { RuleType } from '../../../../common/detection_engine/types'; -import { isMlRule } from '../../../../common/detection_engine/ml_helpers'; +} from '../../../../../../../src/core/server'; +import { ILicense } from '../../../../../licensing/server'; +import { MINIMUM_ML_LICENSE } from 'siem/common/constants'; +import { RuleType } from 'siem/common/detection_engine/types'; +import { isMlRule } from 'siem/common/detection_engine/ml_helpers'; import { BadRequestError } from '../errors/bad_request_error'; export interface OutputError { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts index 991690d901d8..738e330554ba 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from '../../../../common/detection_engine/types'; -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; import { getThrottleOptions, getRuleActionsFromSavedObject } from './utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts index 91489334940b..251f9155f933 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/delete_rule_actions_saved_object.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { getRuleActionsSavedObject } from './get_rule_actions_saved_object'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts index dad35f6cb1f9..3b3ea600397e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from '../../../../common/detection_engine/types'; -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; import { getRuleActionsFromSavedObject } from './utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/saved_object_mappings.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/types.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts index 525eb74d18fb..d5a20cd95f5a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts @@ -6,7 +6,7 @@ import { get } from 'lodash/fp'; import { SavedObject, SavedObjectAttributes, SavedObjectsFindResponse } from 'kibana/server'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export interface IRuleActionsAttributes extends Record { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts similarity index 89% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts index d79c61f6200e..d6ec95e0205b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { AlertServices } from '../../../../../alerting/server'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { getRuleActionsSavedObject } from './get_rule_actions_saved_object'; import { createRuleActionsSavedObject } from './create_rule_actions_saved_object'; import { updateRuleActionsSavedObject } from './update_rule_actions_saved_object'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts similarity index 90% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts index 2a2c84838ed9..51c3207a0939 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { RulesActionsSavedObject } from './get_rule_actions_saved_object'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { getThrottleOptions } from './utils'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts similarity index 93% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts index 554c2b4a3dd9..30758937b0b1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts @@ -5,7 +5,7 @@ */ import { SavedObjectsUpdateResponse } from 'kibana/server'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; export const getThrottleOptions = ( diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts similarity index 93% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts index 70b705309b88..d51c227120e3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts @@ -5,7 +5,7 @@ */ import { addTags } from './add_tags'; -import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; describe('add_tags', () => { test('it should add a rule id as an internal structure with immutable true', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/add_tags.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts similarity index 84% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/add_tags.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts index a1f240495045..3be49da325c2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/add_tags.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; export const addTags = (tags: string[], ruleId: string, immutable: boolean): string[] => { return Array.from( diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts index a60f1d417797..6710bf02aeb2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; -import { actionsClientMock } from '../../../../../../../plugins/actions/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; +import { actionsClientMock } from '../../../../../actions/server/mocks'; import { getMlResult } from '../routes/__mocks__/request_responses'; import { createRules } from './create_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts index 91effb4741b8..307dbfa9d1c8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; -import { Alert } from '../../../../../../../plugins/alerting/common'; -import { APP_ID, SIGNALS_ID } from '../../../../common/constants'; +import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; +import { Alert } from '../../../../../alerting/common'; +import { APP_ID, SIGNALS_ID } from 'siem/common/constants'; import { CreateRuleParams } from './types'; import { addTags } from './add_tags'; import { hasListsFeature } from '../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts index 27008d17d219..034813b8d100 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts @@ -9,7 +9,7 @@ import { createSplitStream, createMapStream, createConcatStream, -} from '../../../../../../../../src/legacy/utils/streams'; +} from '../../../../../../../src/legacy/utils/streams'; import { importRulesSchema } from '../routes/schemas/import_rules_schema'; import { BadRequestError } from '../errors/bad_request_error'; import { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts index 38fc1dc5d193..68d01356a333 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { actionsClientMock } from '../../../../../../../plugins/actions/server/mocks'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { actionsClientMock } from '../../../../../actions/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { deleteRules } from './delete_rules'; import { readRules } from './read_rules'; jest.mock('./read_rules'); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/delete_rules.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts index 23f031b22a9d..1160793761de 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts @@ -5,7 +5,7 @@ */ import { getFilter } from './find_rules'; -import { SIGNALS_ID } from '../../../../common/constants'; +import { SIGNALS_ID } from 'siem/common/constants'; describe('find_rules', () => { test('it returns a full filter with an AND if sent down', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/find_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts similarity index 86% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/find_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts index f333a7c34070..5d4fd2060271 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/find_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { FindResult } from '../../../../../../../plugins/alerting/server'; -import { SIGNALS_ID } from '../../../../common/constants'; +import { FindResult } from '../../../../../alerting/server'; +import { SIGNALS_ID } from 'siem/common/constants'; import { FindRuleParams } from './types'; export const getFilter = (filter: string | null | undefined) => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts index 9774d10a37d6..d79b428a2f76 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithSingleHit, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts similarity index 93% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts index b5e826ed4272..834966010244 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; -import { AlertsClient } from '../../../../../../../plugins/alerting/server'; +import { INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; +import { AlertsClient } from '../../../../../alerting/server'; import { RuleAlertType, isAlertTypes } from './types'; import { findRules } from './find_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts index dd004e3685b1..df902854962b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts @@ -9,7 +9,7 @@ import { getFindResultWithSingleHit, FindHit, } from '../routes/__mocks__/request_responses'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getExportAll } from './get_export_all'; import { unSetFeatureFlagsForTestsOnly, setFeatureFlagsForTestsOnly } from '../feature_flags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts index 40c07f28ea84..06e70f0bad18 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_all.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertsClient } from '../../../../../../../plugins/alerting/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { getNonPackagedRules } from './get_existing_prepackaged_rules'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { transformAlertsToRules } from '../routes/rules/utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts index 715cb23e8444..ce6819462aa2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts @@ -11,7 +11,7 @@ import { FindHit, } from '../routes/__mocks__/request_responses'; import * as readRules from './read_rules'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../feature_flags'; describe('get_export_by_object_ids', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts index 048f09e95b06..02039b9de3c7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertsClient } from '../../../../../../../plugins/alerting/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { isAlertType } from '../rules/types'; import { readRules } from './read_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_export_details_ndjson.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_prepackaged_rules.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_install.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/get_rules_to_update.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts similarity index 89% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts index 6d4bacb9cc24..46d5b5fdf452 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Alert } from '../../../../../../../plugins/alerting/common'; -import { ActionsClient } from '../../../../../../../plugins/actions/server'; -import { AlertsClient } from '../../../../../../../plugins/alerting/server'; +import { Alert } from '../../../../../alerting/common'; +import { ActionsClient } from '../../../../../actions/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { createRules } from './create_rules'; import { PrepackagedRules } from '../types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts index 3108fc5f3b71..f93b0aceb5e6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.test.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { savedObjectsClientMock } from '../../../../../../../../src/core/server/mocks'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; -import { actionsClientMock } from '../../../../../../../plugins/actions/server/mocks'; +import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; +import { actionsClientMock } from '../../../../../actions/server/mocks'; import { getResult, getMlResult } from '../routes/__mocks__/request_responses'; import { patchRules } from './patch_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts index 5c4889ec5fd6..347b370c89e0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/patch_rules.ts @@ -5,7 +5,7 @@ */ import { defaults } from 'lodash/fp'; -import { PartialAlert } from '../../../../../../../plugins/alerting/server'; +import { PartialAlert } from '../../../../../alerting/server'; import { readRules } from './read_rules'; import { PatchRuleParams, IRuleSavedAttributesSavedObjectAttributes } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_adversary_behavior_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_dumping_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_cred_manipulation_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_exploit_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_malware_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_permission_theft_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_process_injection_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_detected.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/elastic_endpoint_security_ransomware_prevented.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_port_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_service.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_network_url_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_process_all_hosts.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_anomalous_user_name.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/notice.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_dns_tunneling.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_dns_question.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_server_domain.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_urls.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/packetbeat_rare_user_agent.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_linux.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/rare_process_by_host_windows.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/suspicious_login_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_network_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_path_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_all_hosts.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_process_creation.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_script.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_service.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_anomalous_user_name.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_network_connection.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_msbuild.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_cve_2020_0601.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_office_app.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_script.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_by_system_process.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_renamed.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_msbuild_started_unusal_process.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_injection_msbuild.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_modification_of_boot_config.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_msxsl_network.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_system_account.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_runas_event.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_rare_user_type10_remote_login.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_pdf_reader.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_uac_bypass_event_viewer.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json b/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json rename to x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts index 38a883329318..600848948be0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.test.ts @@ -5,7 +5,7 @@ */ import { readRules } from './read_rules'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithSingleHit } from '../routes/__mocks__/request_responses'; export class TestError extends Error { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/read_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/read_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts index 94e4e6357a4a..e7640ec06907 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/read_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SanitizedAlert } from '../../../../../../../plugins/alerting/common'; -import { INTERNAL_RULE_ID_KEY } from '../../../../common/constants'; +import { SanitizedAlert } from '../../../../../alerting/common'; +import { INTERNAL_RULE_ID_KEY } from 'siem/common/constants'; import { findRules } from './find_rules'; import { ReadRuleParams, isAlertType } from './types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/saved_object_mappings.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/types.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts index b1bed5d71615..d98d9a488f60 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts @@ -13,10 +13,10 @@ import { SavedObjectsFindResponse, SavedObjectsClientContract, } from 'kibana/server'; -import { AlertsClient, PartialAlert } from '../../../../../../../plugins/alerting/server'; -import { Alert } from '../../../../../../../plugins/alerting/common'; -import { SIGNALS_ID } from '../../../../common/constants'; -import { ActionsClient } from '../../../../../../../plugins/actions/server'; +import { AlertsClient, PartialAlert } from '../../../../../alerting/server'; +import { Alert } from '../../../../../alerting/common'; +import { SIGNALS_ID } from 'siem/common/constants'; +import { ActionsClient } from '../../../../../actions/server'; import { RuleAlertParams, RuleTypeParams, RuleAlertParamsRest } from '../types'; export type PatchRuleAlertParamsRest = Partial & { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts similarity index 86% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts index 7a3f23347511..a9bbf75883d1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.test.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { savedObjectsClientMock } from '../../../../../../../../src/core/server/mocks'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; -import { actionsClientMock } from '../../../../../../../plugins/actions/server/mocks'; +import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; +import { actionsClientMock } from '../../../../../actions/server/mocks'; import { mockPrepackagedRule } from '../routes/__mocks__/request_responses'; import { updatePrepackagedRules } from './update_prepacked_rules'; import { patchRules } from './patch_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts index 7eb0d8d1399b..b72b232c27f0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts @@ -5,8 +5,8 @@ */ import { SavedObjectsClientContract } from 'kibana/server'; -import { ActionsClient } from '../../../../../../../plugins/actions/server'; -import { AlertsClient } from '../../../../../../../plugins/alerting/server'; +import { ActionsClient } from '../../../../../actions/server'; +import { AlertsClient } from '../../../../../alerting/server'; import { patchRules } from './patch_rules'; import { PrepackagedRules } from '../types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts index 72f4cbcbe68e..2565d269db47 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.test.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { savedObjectsClientMock } from '../../../../../../../../src/core/server/mocks'; -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; -import { actionsClientMock } from '../../../../../../../plugins/actions/server/mocks'; +import { savedObjectsClientMock } from '../../../../../../../src/core/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; +import { actionsClientMock } from '../../../../../actions/server/mocks'; import { getResult, getMlResult } from '../routes/__mocks__/request_responses'; import { updateRules } from './update_rules'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts index 99326768ed33..37fa4f9b11bb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; -import { PartialAlert } from '../../../../../../../plugins/alerting/server'; +import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; +import { PartialAlert } from '../../../../../alerting/server'; import { readRules } from './read_rules'; import { IRuleSavedAttributesSavedObjectAttributes, UpdateRuleParams } from './types'; import { addTags } from './add_tags'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts index 994a54048b71..c140417364e3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from '../../../../common/detection_engine/types'; -import { AlertsClient, AlertServices } from '../../../../../../../plugins/alerting/server'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { AlertsClient, AlertServices } from '../../../../../alerting/server'; import { updateOrCreateRuleActionsSavedObject } from '../rule_actions/update_or_create_rule_actions_saved_object'; import { updateNotifications } from '../notifications/update_notifications'; import { RuleActions } from '../rule_actions/types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/utils.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/rules/utils.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/add_prepackaged_rules.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/check_env_variables.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/convert_saved_search_to_rules.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_actions.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alert_tasks.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_alerts.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_api_keys.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_all_statuses.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_bulk.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_id.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_rule_by_rule_id.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_by_rule_id_to_file.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/export_rules_to_file.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rule_by_filter.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_sort.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/find_rules_statuses_by_ids.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/find_saved_object.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_instances.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_action_types.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_instances.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_tasks.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_alert_types.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_prepackaged_rules_status.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_privileges.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_id.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_rule_by_rule_id.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_saved_objects.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_signal_index.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/get_tags.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/hard_reset.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/import_rules_no_overwrite.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/patch_rule_bulk.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/post_rule_bulk.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/post_x_rules.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/regen_prepackge_rules_index.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/delete_by_rule_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_ruleid_queries.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/multiple_simplest_queries.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/bulk/patch_names.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/export/ruleid_queries.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/disable_rule.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/enabled_rule.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_update_risk_score_by_rule_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/simplest_updated_name.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_interval.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_list.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_machine_learning.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_note.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_query_everything.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_tags.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_timelineid.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/patches/update_version.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_disabled.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_lucene.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_timelineid.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_filter.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_list.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_list.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_list.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_list.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_machine_learning.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_meta_data.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_note.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_rule_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_tags.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_filters.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/queries/simplest_query.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_by_rule_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_filters.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_query_filter.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/simplest_saved_query.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_with_empty_query.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/filter_without_query.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_meatadata_lucene.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_filter_ui_metadata.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/query_with_errors.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/queries/saved_query_ui_meta_empty_query.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/query_single_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_1.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/signal_on_signal_depth_2.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/query_single_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/signal_on_signal.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/README.md diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/disable_rule.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/enabled_rule.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_update_risk_score_by_rule_id.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/simplest_updated_name.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_interval.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_list.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_machine_learning.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_note.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_tags.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_timelineid.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_version.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/aggs_signals.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/put_signal_doc.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/query_signals.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_id.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/signals/set_status_with_query.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh b/x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh rename to x-pack/plugins/siem/server/lib/detection_engine/scripts/update_rule_bulk.sh diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts index 3bdcc3f92f44..d361e424f01e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts @@ -9,8 +9,8 @@ import { Logger, SavedObject, SavedObjectsFindResponse, -} from '../../../../../../../../../src/core/server'; -import { loggingServiceMock } from '../../../../../../../../../src/core/server/mocks'; +} from '../../../../../../../../src/core/server'; +import { loggingServiceMock } from '../../../../../../../../src/core/server/mocks'; import { RuleTypeParams, OutputRuleAlertRest } from '../../types'; import { IRuleStatusAttributes } from '../../rules/types'; import { ruleStatusSavedObjectType } from '../../../../saved_objects'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/__mocks__/rule_status_saved_objects_client.mock.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts index 75c4d75cedf1..ad88203daa37 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts @@ -8,7 +8,7 @@ import { SignalSourceHit, SignalHit } from './types'; import { buildRule } from './build_rule'; import { buildSignal } from './build_signal'; import { buildEventTypeSignal } from './build_event_type_signal'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { RuleTypeParams } from '../types'; interface BuildBulkBodyParams { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_event_type_signal.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_events_query.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts index 9c375d7d45d5..3835de6f9dfa 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts @@ -5,7 +5,7 @@ */ import { pickBy } from 'lodash/fp'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { RuleTypeParams, OutputRuleAlertRest } from '../types'; interface BuildRuleParams { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts index 0a50c33fbbfe..06d9a881e167 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts @@ -12,7 +12,7 @@ import { removeInternalTagsFromRule, } from './build_signal'; import { Signal, Ancestor } from './types'; -import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; describe('buildSignal', () => { beforeEach(() => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_signal.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_signal.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts index 684cad99f09f..3e3bace5566f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_signal.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_IDENTIFIER } from '../../../../common/constants'; +import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; import { SignalSourceHit, Signal, Ancestor } from './types'; import { OutputRuleAlertRest } from '../types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts index ba8938f116fc..b935602cc01d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts @@ -7,9 +7,9 @@ import { flow, set, omit } from 'lodash/fp'; import { SearchResponse } from 'elasticsearch'; -import { Logger } from '../../../../../../../../src/core/server'; -import { AlertServices } from '../../../../../../../plugins/alerting/server'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { Logger } from '../../../../../../../src/core/server'; +import { AlertServices } from '../../../../../alerting/server'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; import { singleBulkCreate, SingleBulkCreateResponse } from './single_bulk_create'; import { AnomalyResults, Anomaly } from '../../machine_learning'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts index b7f752e6ba5e..8ac5a6cde39c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/find_ml_signals.ts @@ -6,7 +6,7 @@ import dateMath from '@elastic/datemath'; -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { AlertServices } from '../../../../../alerting/server'; import { getAnomalies } from '../../machine_learning'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts index 510667b211d2..4953c6fdaa9e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.test.ts @@ -6,7 +6,7 @@ import { getQueryFilter, getFilter } from './get_filter'; import { PartialFilter } from '../types'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; describe('get_filter', () => { let servicesMock: AlertServicesMock; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_filter.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_filter.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.ts index 82a50222dc35..23e3db3caae5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_filter.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_filter.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { AlertServices } from '../../../../../alerting/server'; import { assertUnreachable } from '../../../utils/build_query'; import { Filter, @@ -12,7 +12,7 @@ import { esQuery, esFilters, IIndexPattern, -} from '../../../../../../../../src/plugins/data/server'; +} from '../../../../../../../src/plugins/data/server'; import { PartialFilter, RuleAlertParams } from '../types'; import { BadRequestError } from '../errors/bad_request_error'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts index ccd882228d4d..066a47097ed6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { DEFAULT_INDEX_KEY } from 'siem/common/constants'; import { getInputIndex } from './get_input_output_index'; -import { defaultIndexPattern } from '../../../../default_index_pattern'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; describe('get_input_output_index', () => { let servicesMock: AlertServicesMock; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts similarity index 78% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts index c93990e25b52..77f679442b84 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; -import { defaultIndexPattern } from '../../../../default_index_pattern'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { AlertServices } from '../../../../../alerting/server'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { DEFAULT_INDEX_KEY } from 'siem/common/constants'; export const getInputIndex = async ( services: AlertServices, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/get_or_create_rule_statuses.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/get_rule_status_saved_objects.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/rule_messages.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts index 11cbf6730440..5f76889f238a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_saved_objects_client.ts @@ -10,7 +10,7 @@ import { SavedObjectsUpdateResponse, SavedObjectsFindOptions, SavedObjectsFindResponse, -} from '../../../../../../../../src/core/server'; +} from '../../../../../../../src/core/server'; import { ruleStatusSavedObjectType } from '../rules/saved_object_mappings'; import { IRuleStatusAttributes } from '../rules/types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/rule_status_service.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts index 9e2f36fe2653..3f271c12c1de 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts @@ -15,8 +15,8 @@ import { sampleDocSearchResultsNoSortIdNoHits, } from './__mocks__/es_results'; import { searchAfterAndBulkCreate } from './search_after_bulk_create'; -import { DEFAULT_SIGNALS_INDEX } from '../../../../common/constants'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { DEFAULT_SIGNALS_INDEX } from 'siem/common/constants'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import uuid from 'uuid'; describe('searchAfterAndBulkCreate', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts index 3a964cb91fbd..9af5201c567d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertServices } from '../../../../../../../plugins/alerting/server'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { AlertServices } from '../../../../../alerting/server'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; -import { Logger } from '../../../../../../../../src/core/server'; +import { Logger } from '../../../../../../../src/core/server'; import { singleSearchAfter } from './single_search_after'; import { singleBulkCreate } from './single_bulk_create'; import { SignalSearchResponse } from './types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/siem_rule_action_groups.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts index 58dd53b6447c..90438bbc3ae1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts @@ -6,7 +6,7 @@ import { schema } from '@kbn/config-schema'; -import { DEFAULT_MAX_SIGNALS } from '../../../../common/constants'; +import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; /** * This is the schema for the Alert Rule that represents the SIEM alert for signals diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts index 31b407da111e..7eecc5cb9bad 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts @@ -8,7 +8,7 @@ import moment from 'moment'; import { loggerMock } from 'src/core/server/logging/logger.mock'; import { getResult, getMlResult } from '../routes/__mocks__/request_responses'; import { signalRulesAlertType } from './signal_rule_alert_type'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import { ruleStatusServiceFactory } from './rule_status_service'; import { getGapBetweenRuns } from './utils'; import { RuleExecutorOptions } from './types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts index 0357f906f803..da38dda7bd5f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts @@ -7,8 +7,8 @@ import { performance } from 'perf_hooks'; import { Logger } from 'src/core/server'; -import { SIGNALS_ID, DEFAULT_SEARCH_AFTER_PAGE_SIZE } from '../../../../common/constants'; -import { isJobStarted, isMlRule } from '../../../../common/detection_engine/ml_helpers'; +import { SIGNALS_ID, DEFAULT_SEARCH_AFTER_PAGE_SIZE } from 'siem/common/constants'; +import { isJobStarted, isMlRule } from 'siem/common/detection_engine/ml_helpers'; import { SetupPlugins } from '../../../plugin'; import { buildEventsSearchQuery } from './build_events_query'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts index 3401d7417ec6..883002e75a49 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts @@ -16,9 +16,9 @@ import { sampleBulkCreateErrorResult, sampleDocWithAncestors, } from './__mocks__/es_results'; -import { DEFAULT_SIGNALS_INDEX } from '../../../../common/constants'; +import { DEFAULT_SIGNALS_INDEX } from 'siem/common/constants'; import { singleBulkCreate, filterDuplicateRules } from './single_bulk_create'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; describe('singleBulkCreate', () => { const mockService: AlertServicesMock = alertsMock.createAlertServices(); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts index 4373a35cac0c..09637c11669a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts @@ -6,13 +6,13 @@ import { countBy, isEmpty } from 'lodash'; import { performance } from 'perf_hooks'; -import { AlertServices } from '../../../../../../../plugins/alerting/server'; +import { AlertServices } from '../../../../../alerting/server'; import { SignalSearchResponse, BulkResponse } from './types'; -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; import { generateId, makeFloatString, errorAggregator } from './utils'; import { buildBulkBody } from './build_bulk_body'; -import { Logger } from '../../../../../../../../src/core/server'; +import { Logger } from '../../../../../../../src/core/server'; interface SingleBulkCreateParams { someResult: SignalSearchResponse; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts index dbeab70595e4..580080966457 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.test.ts @@ -10,7 +10,7 @@ import { sampleDocSearchResultsWithSortId, } from './__mocks__/es_results'; import { singleSearchAfter } from './single_search_after'; -import { alertsMock, AlertServicesMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; describe('singleSearchAfter', () => { const mockService: AlertServicesMock = alertsMock.createAlertServices(); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts similarity index 91% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts index 6fc8fe4bd24d..8071c18713c1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_search_after.ts @@ -5,8 +5,8 @@ */ import { performance } from 'perf_hooks'; -import { AlertServices } from '../../../../../../../plugins/alerting/server'; -import { Logger } from '../../../../../../../../src/core/server'; +import { AlertServices } from '../../../../../alerting/server'; +import { Logger } from '../../../../../../../src/core/server'; import { SignalSearchResponse } from './types'; import { buildEventsSearchQuery } from './build_events_query'; import { makeFloatString } from './utils'; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/types.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts index a7556d992d20..87f30ede11fb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts @@ -4,14 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from '../../../../common/detection_engine/types'; +import { RuleAlertAction } from 'siem/common/detection_engine/types'; import { RuleAlertParams, OutputRuleAlertRest } from '../types'; import { SearchResponse } from '../../types'; import { AlertType, State, AlertExecutorOptions, -} from '../../../../../../../plugins/alerting/server'; +} from '../../../../../alerting/server'; export interface SignalsParams { signalIds: string[] | undefined | null; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/utils.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/utils.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/utils.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/utils.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/utils.ts rename to x-pack/plugins/siem/server/lib/detection_engine/signals/utils.ts index 077d3a9279c5..f06c765073d7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/utils.ts @@ -6,7 +6,8 @@ import { createHash } from 'crypto'; import moment from 'moment'; import dateMath from '@elastic/datemath'; -import { parseDuration } from '../../../../../../../plugins/alerting/server'; + +import { parseDuration } from '../../../../../alerting/server'; import { BulkResponse, BulkResponseErrorAggregation } from './types'; export const generateId = ( diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts rename to x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts index 80c107c991bb..8dcf83b4b776 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { alertsClientMock } from '../../../../../../../plugins/alerting/server/mocks'; +import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithMultiHits } from '../routes/__mocks__/request_responses'; -import { INTERNAL_RULE_ID_KEY, INTERNAL_IDENTIFIER } from '../../../../common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IDENTIFIER } from 'siem/common/constants'; import { readRawTags, readTags, convertTagsToSet, convertToTags, isTags } from './read_tags'; describe('read_tags', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/tags/read_tags.ts b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts similarity index 93% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/tags/read_tags.ts rename to x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts index d343bca8c97b..8b04a931bc25 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/tags/read_tags.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts @@ -5,8 +5,8 @@ */ import { has } from 'lodash/fp'; -import { INTERNAL_IDENTIFIER } from '../../../../common/constants'; -import { AlertsClient } from '../../../../../../../plugins/alerting/server'; +import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; +import { AlertsClient } from '../../../../../alerting/server'; import { findRules } from '../rules/find_rules'; export interface TagType { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/types.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts rename to x-pack/plugins/siem/server/lib/detection_engine/types.ts index 035f1b10ff8b..7bb291e726d4 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/types.ts @@ -4,11 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -import { CallAPIOptions } from '../../../../../../../src/core/server'; -import { Filter } from '../../../../../../../src/plugins/data/server'; +import { CallAPIOptions } from '../../../../../../src/core/server'; +import { Filter } from '../../../../../../src/plugins/data/server'; import { IRuleStatusAttributes } from './rules/types'; import { ListsDefaultArraySchema } from './routes/schemas/types/lists_default_array'; -import { RuleAlertAction, RuleType } from '../../../common/detection_engine/types'; +import { RuleAlertAction, RuleType } from 'siem/common/detection_engine/types'; export type PartialFilter = Partial; diff --git a/x-pack/legacy/plugins/siem/server/lib/ecs_fields/extend_map.test.ts b/x-pack/plugins/siem/server/lib/ecs_fields/extend_map.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ecs_fields/extend_map.test.ts rename to x-pack/plugins/siem/server/lib/ecs_fields/extend_map.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ecs_fields/extend_map.ts b/x-pack/plugins/siem/server/lib/ecs_fields/extend_map.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ecs_fields/extend_map.ts rename to x-pack/plugins/siem/server/lib/ecs_fields/extend_map.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ecs_fields/index.ts b/x-pack/plugins/siem/server/lib/ecs_fields/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ecs_fields/index.ts rename to x-pack/plugins/siem/server/lib/ecs_fields/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/events/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/events/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/events/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/events/index.ts b/x-pack/plugins/siem/server/lib/events/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/events/index.ts rename to x-pack/plugins/siem/server/lib/events/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/events/mock.ts b/x-pack/plugins/siem/server/lib/events/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/events/mock.ts rename to x-pack/plugins/siem/server/lib/events/mock.ts index 3eb841cbad41..f05f3f7d1acd 100644 --- a/x-pack/legacy/plugins/siem/server/lib/events/mock.ts +++ b/x-pack/plugins/siem/server/lib/events/mock.ts @@ -5,7 +5,7 @@ */ import { cloneDeep } from 'lodash/fp'; -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { RequestDetailsOptions } from './types'; export const mockResponseSearchTimelineDetails = { diff --git a/x-pack/legacy/plugins/siem/server/lib/events/query.dsl.ts b/x-pack/plugins/siem/server/lib/events/query.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/events/query.dsl.ts rename to x-pack/plugins/siem/server/lib/events/query.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/events/query.last_event_time.dsl.ts b/x-pack/plugins/siem/server/lib/events/query.last_event_time.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/events/query.last_event_time.dsl.ts rename to x-pack/plugins/siem/server/lib/events/query.last_event_time.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/events/types.ts b/x-pack/plugins/siem/server/lib/events/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/events/types.ts rename to x-pack/plugins/siem/server/lib/events/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/framework/index.ts b/x-pack/plugins/siem/server/lib/framework/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/framework/index.ts rename to x-pack/plugins/siem/server/lib/framework/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/framework/kibana_framework_adapter.ts b/x-pack/plugins/siem/server/lib/framework/kibana_framework_adapter.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/framework/kibana_framework_adapter.ts rename to x-pack/plugins/siem/server/lib/framework/kibana_framework_adapter.ts index 6b41426e047c..762416149c0f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/siem/server/lib/framework/kibana_framework_adapter.ts @@ -13,9 +13,9 @@ import { KibanaResponseFactory, RequestHandlerContext, KibanaRequest, -} from '../../../../../../../src/core/server'; -import { IndexPatternsFetcher } from '../../../../../../../src/plugins/data/server'; -import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; +} from '../../../../../../src/core/server'; +import { IndexPatternsFetcher } from '../../../../../../src/plugins/data/server'; +import { AuthenticatedUser } from '../../../../security/common/model'; import { CoreSetup, SetupPlugins } from '../../plugin'; import { diff --git a/x-pack/legacy/plugins/siem/server/lib/framework/types.ts b/x-pack/plugins/siem/server/lib/framework/types.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/lib/framework/types.ts rename to x-pack/plugins/siem/server/lib/framework/types.ts index 7d049d1dcd19..20cb98834e18 100644 --- a/x-pack/legacy/plugins/siem/server/lib/framework/types.ts +++ b/x-pack/plugins/siem/server/lib/framework/types.ts @@ -7,9 +7,9 @@ import { IndicesGetMappingParams } from 'elasticsearch'; import { GraphQLSchema } from 'graphql'; -import { RequestHandlerContext, KibanaRequest } from '../../../../../../../src/core/server'; -import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; -import { ESQuery } from '../../../common/typed_json'; +import { RequestHandlerContext, KibanaRequest } from '../../../../../../src/core/server'; +import { AuthenticatedUser } from '../../../../security/common/model'; +import { ESQuery } from 'siem/common/typed_json'; import { PaginationInput, PaginationInputPaginated, diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts index 1b69863a443b..c0c73d45a6b1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts @@ -26,7 +26,7 @@ import { HostsRequestOptions, HostValue, } from './types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; export class ElasticsearchHostsAdapter implements HostsAdapter { constructor(private readonly framework: FrameworkAdapter) {} diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/helpers.test.ts b/x-pack/plugins/siem/server/lib/hosts/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/helpers.test.ts rename to x-pack/plugins/siem/server/lib/hosts/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/helpers.ts b/x-pack/plugins/siem/server/lib/hosts/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/helpers.ts rename to x-pack/plugins/siem/server/lib/hosts/helpers.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/index.ts b/x-pack/plugins/siem/server/lib/hosts/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/index.ts rename to x-pack/plugins/siem/server/lib/hosts/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/mock.ts b/x-pack/plugins/siem/server/lib/hosts/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/hosts/mock.ts rename to x-pack/plugins/siem/server/lib/hosts/mock.ts index 6b72c4a5a284..af6ddd1b1045 100644 --- a/x-pack/legacy/plugins/siem/server/lib/hosts/mock.ts +++ b/x-pack/plugins/siem/server/lib/hosts/mock.ts @@ -5,7 +5,7 @@ */ import { Direction, HostsFields } from '../../graphql/types'; -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { HostOverviewRequestOptions, diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts b/x-pack/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts rename to x-pack/plugins/siem/server/lib/hosts/query.detail_host.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/query.hosts.dsl.ts b/x-pack/plugins/siem/server/lib/hosts/query.hosts.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/query.hosts.dsl.ts rename to x-pack/plugins/siem/server/lib/hosts/query.hosts.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts b/x-pack/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts rename to x-pack/plugins/siem/server/lib/hosts/query.last_first_seen_host.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/hosts/types.ts b/x-pack/plugins/siem/server/lib/hosts/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/hosts/types.ts rename to x-pack/plugins/siem/server/lib/hosts/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/index_fields/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/index_fields/index.ts b/x-pack/plugins/siem/server/lib/index_fields/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/index_fields/index.ts rename to x-pack/plugins/siem/server/lib/index_fields/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/index_fields/mock.ts b/x-pack/plugins/siem/server/lib/index_fields/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/index_fields/mock.ts rename to x-pack/plugins/siem/server/lib/index_fields/mock.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/index_fields/types.ts b/x-pack/plugins/siem/server/lib/index_fields/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/index_fields/types.ts rename to x-pack/plugins/siem/server/lib/index_fields/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts index 90803ca302bd..54fa2ee706d1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts @@ -17,7 +17,7 @@ import { import { inspectStringifyObject } from '../../utils/build_query'; import { DatabaseSearchResponse, FrameworkAdapter, FrameworkRequest } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; import { IpOverviewRequestOptions, UsersRequestOptions } from './index'; import { buildOverviewQuery } from './query_overview.dsl'; import { buildUsersQuery } from './query_users.dsl'; diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/index.ts b/x-pack/plugins/siem/server/lib/ip_details/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/index.ts rename to x-pack/plugins/siem/server/lib/ip_details/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/mock.ts b/x-pack/plugins/siem/server/lib/ip_details/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/mock.ts rename to x-pack/plugins/siem/server/lib/ip_details/mock.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/query_overview.dsl.ts b/x-pack/plugins/siem/server/lib/ip_details/query_overview.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/query_overview.dsl.ts rename to x-pack/plugins/siem/server/lib/ip_details/query_overview.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/query_users.dsl.ts b/x-pack/plugins/siem/server/lib/ip_details/query_users.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/query_users.dsl.ts rename to x-pack/plugins/siem/server/lib/ip_details/query_users.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/ip_details/types.ts b/x-pack/plugins/siem/server/lib/ip_details/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/ip_details/types.ts rename to x-pack/plugins/siem/server/lib/ip_details/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/helpers.test.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/helpers.test.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/helpers.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/helpers.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/helpers.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/index.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/index.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/mock.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/mock.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts index ed9fbf0ba064..8ea366227e92 100644 --- a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/mock.ts +++ b/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { RequestBasicOptions } from '../framework/types'; const FROM = new Date('2019-05-03T13:24:00.660Z').valueOf(); diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/query_authentication.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/query_hosts.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/query_unique_ips.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_hosts/types.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_hosts/types.ts rename to x-pack/plugins/siem/server/lib/kpi_hosts/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts b/x-pack/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts rename to x-pack/plugins/siem/server/lib/kpi_network/elastic_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/kpi_network/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/helpers.ts b/x-pack/plugins/siem/server/lib/kpi_network/helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/helpers.ts rename to x-pack/plugins/siem/server/lib/kpi_network/helpers.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/index.ts b/x-pack/plugins/siem/server/lib/kpi_network/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/index.ts rename to x-pack/plugins/siem/server/lib/kpi_network/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/mock.ts b/x-pack/plugins/siem/server/lib/kpi_network/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/mock.ts rename to x-pack/plugins/siem/server/lib/kpi_network/mock.ts index 7d86769de09f..5f083bfbefbe 100644 --- a/x-pack/legacy/plugins/siem/server/lib/kpi_network/mock.ts +++ b/x-pack/plugins/siem/server/lib/kpi_network/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { RequestBasicOptions } from '../framework/types'; export const mockOptions: RequestBasicOptions = { diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts b/x-pack/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts rename to x-pack/plugins/siem/server/lib/kpi_network/query_dns.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/query_network_events.ts b/x-pack/plugins/siem/server/lib/kpi_network/query_network_events.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/query_network_events.ts rename to x-pack/plugins/siem/server/lib/kpi_network/query_network_events.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts b/x-pack/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts rename to x-pack/plugins/siem/server/lib/kpi_network/query_tls_handshakes.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/query_unique_flow.ts b/x-pack/plugins/siem/server/lib/kpi_network/query_unique_flow.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/query_unique_flow.ts rename to x-pack/plugins/siem/server/lib/kpi_network/query_unique_flow.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts b/x-pack/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts rename to x-pack/plugins/siem/server/lib/kpi_network/query_unique_private_ips.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/kpi_network/types.ts b/x-pack/plugins/siem/server/lib/kpi_network/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/kpi_network/types.ts rename to x-pack/plugins/siem/server/lib/kpi_network/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/machine_learning/index.ts b/x-pack/plugins/siem/server/lib/machine_learning/index.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/lib/machine_learning/index.ts rename to x-pack/plugins/siem/server/lib/machine_learning/index.ts index aa83df15f68d..35789b5e202e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/machine_learning/index.ts +++ b/x-pack/plugins/siem/server/lib/machine_learning/index.ts @@ -6,8 +6,8 @@ import { SearchResponse } from 'elasticsearch'; -import { AlertServices } from '../../../../../../plugins/alerting/server'; -import { AnomalyRecordDoc as Anomaly } from '../../../../../../plugins/ml/common/types/anomalies'; +import { AlertServices } from '../../../../alerting/server'; +import { AnomalyRecordDoc as Anomaly } from '../../../../ml/common/types/anomalies'; export { Anomaly }; export type AnomalyResults = SearchResponse; diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/elasticseatch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/index.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/index.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/mock.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/mock.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts index 3e51e926bea8..a0bf8748f78d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/mock.ts +++ b/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { HistogramType } from '../../graphql/types'; export const mockAlertsHistogramDataResponse = { diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/query.anomalies_over_time.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/query.authentications_over_time.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/query.events_over_time.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/query_alerts.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/query_dns_histogram.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/types.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/types.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/matrix_histogram/utils.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/utils.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/matrix_histogram/utils.ts rename to x-pack/plugins/siem/server/lib/matrix_histogram/utils.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap b/x-pack/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap rename to x-pack/plugins/siem/server/lib/network/__snapshots__/elastic_adapter.test.ts.snap diff --git a/x-pack/legacy/plugins/siem/server/lib/network/elastic_adapter.test.ts b/x-pack/plugins/siem/server/lib/network/elastic_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/elastic_adapter.test.ts rename to x-pack/plugins/siem/server/lib/network/elastic_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/network/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts index 39babc58ee13..c61a23d7451d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/network/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts @@ -22,7 +22,7 @@ import { import { inspectStringifyObject } from '../../utils/build_query'; import { DatabaseSearchResponse, FrameworkAdapter, FrameworkRequest } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; import { NetworkDnsRequestOptions, diff --git a/x-pack/legacy/plugins/siem/server/lib/network/index.ts b/x-pack/plugins/siem/server/lib/network/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/index.ts rename to x-pack/plugins/siem/server/lib/network/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/mock.ts b/x-pack/plugins/siem/server/lib/network/mock.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/network/mock.ts rename to x-pack/plugins/siem/server/lib/network/mock.ts index 7ea692f27ef0..b2bc6513bc36 100644 --- a/x-pack/legacy/plugins/siem/server/lib/network/mock.ts +++ b/x-pack/plugins/siem/server/lib/network/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { Direction, FlowTargetSourceDest, NetworkTopTablesFields } from '../../graphql/types'; import { NetworkTopNFlowRequestOptions } from '.'; diff --git a/x-pack/legacy/plugins/siem/server/lib/network/query_dns.dsl.ts b/x-pack/plugins/siem/server/lib/network/query_dns.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/query_dns.dsl.ts rename to x-pack/plugins/siem/server/lib/network/query_dns.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/query_http.dsl.ts b/x-pack/plugins/siem/server/lib/network/query_http.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/query_http.dsl.ts rename to x-pack/plugins/siem/server/lib/network/query_http.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/query_top_countries.dsl.ts b/x-pack/plugins/siem/server/lib/network/query_top_countries.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/query_top_countries.dsl.ts rename to x-pack/plugins/siem/server/lib/network/query_top_countries.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts b/x-pack/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts rename to x-pack/plugins/siem/server/lib/network/query_top_n_flow.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/network/types.ts b/x-pack/plugins/siem/server/lib/network/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/network/types.ts rename to x-pack/plugins/siem/server/lib/network/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/note/saved_object.ts b/x-pack/plugins/siem/server/lib/note/saved_object.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/note/saved_object.ts rename to x-pack/plugins/siem/server/lib/note/saved_object.ts index 23162f38bffb..8103de90dd87 100644 --- a/x-pack/legacy/plugins/siem/server/lib/note/saved_object.ts +++ b/x-pack/plugins/siem/server/lib/note/saved_object.ts @@ -12,9 +12,9 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { map, fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; -import { SavedObjectsFindOptions } from '../../../../../../../src/core/server'; -import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; -import { UNAUTHENTICATED_USER } from '../../../common/constants'; +import { SavedObjectsFindOptions } from '../../../../../../src/core/server'; +import { AuthenticatedUser } from '../../../../security/common/model'; +import { UNAUTHENTICATED_USER } from 'siem/common/constants'; import { PageInfoNote, ResponseNote, diff --git a/x-pack/legacy/plugins/siem/server/lib/note/saved_object_mappings.ts b/x-pack/plugins/siem/server/lib/note/saved_object_mappings.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/note/saved_object_mappings.ts rename to x-pack/plugins/siem/server/lib/note/saved_object_mappings.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/note/types.ts b/x-pack/plugins/siem/server/lib/note/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/note/types.ts rename to x-pack/plugins/siem/server/lib/note/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/elastic_adapter.test.ts b/x-pack/plugins/siem/server/lib/overview/elastic_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/overview/elastic_adapter.test.ts rename to x-pack/plugins/siem/server/lib/overview/elastic_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/overview/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/overview/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/overview/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/index.ts b/x-pack/plugins/siem/server/lib/overview/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/overview/index.ts rename to x-pack/plugins/siem/server/lib/overview/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/mock.ts b/x-pack/plugins/siem/server/lib/overview/mock.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/overview/mock.ts rename to x-pack/plugins/siem/server/lib/overview/mock.ts index 410b4d90b1e7..3f5759240016 100644 --- a/x-pack/legacy/plugins/siem/server/lib/overview/mock.ts +++ b/x-pack/plugins/siem/server/lib/overview/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { RequestBasicOptions } from '../framework/types'; export const mockOptionsNetwork: RequestBasicOptions = { diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/query.dsl.ts b/x-pack/plugins/siem/server/lib/overview/query.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/overview/query.dsl.ts rename to x-pack/plugins/siem/server/lib/overview/query.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/types.ts b/x-pack/plugins/siem/server/lib/overview/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/overview/types.ts rename to x-pack/plugins/siem/server/lib/overview/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/pinned_event/saved_object.ts b/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/pinned_event/saved_object.ts rename to x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts index a95c1da197f5..676c97950b51 100644 --- a/x-pack/legacy/plugins/siem/server/lib/pinned_event/saved_object.ts +++ b/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts @@ -10,9 +10,9 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { map, fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; -import { SavedObjectsFindOptions } from '../../../../../../../src/core/server'; -import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; -import { UNAUTHENTICATED_USER } from '../../../common/constants'; +import { SavedObjectsFindOptions } from '../../../../../../src/core/server'; +import { AuthenticatedUser } from '../../../../security/common/model'; +import { UNAUTHENTICATED_USER } from 'siem/common/constants'; import { FrameworkRequest } from '../framework'; import { PinnedEventSavedObject, diff --git a/x-pack/legacy/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts b/x-pack/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts rename to x-pack/plugins/siem/server/lib/pinned_event/saved_object_mappings.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/pinned_event/types.ts b/x-pack/plugins/siem/server/lib/pinned_event/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/pinned_event/types.ts rename to x-pack/plugins/siem/server/lib/pinned_event/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/source_status/elasticsearch_adapter.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/source_status/index.ts b/x-pack/plugins/siem/server/lib/source_status/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/source_status/index.ts rename to x-pack/plugins/siem/server/lib/source_status/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/source_status/query.dsl.ts b/x-pack/plugins/siem/server/lib/source_status/query.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/source_status/query.dsl.ts rename to x-pack/plugins/siem/server/lib/source_status/query.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/source_status/types.ts b/x-pack/plugins/siem/server/lib/source_status/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/source_status/types.ts rename to x-pack/plugins/siem/server/lib/source_status/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/sources/configuration.test.ts b/x-pack/plugins/siem/server/lib/sources/configuration.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/sources/configuration.test.ts rename to x-pack/plugins/siem/server/lib/sources/configuration.test.ts index b1b149d17a9f..5b162282e0d1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/sources/configuration.test.ts +++ b/x-pack/plugins/siem/server/lib/sources/configuration.test.ts @@ -5,7 +5,7 @@ */ import { InmemoryConfigurationAdapter } from '../configuration/inmemory_configuration_adapter'; -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { ConfigurationSourcesAdapter } from './configuration'; import { PartialSourceConfiguration } from './types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/sources/configuration.ts b/x-pack/plugins/siem/server/lib/sources/configuration.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/sources/configuration.ts rename to x-pack/plugins/siem/server/lib/sources/configuration.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/sources/index.ts b/x-pack/plugins/siem/server/lib/sources/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/sources/index.ts rename to x-pack/plugins/siem/server/lib/sources/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/sources/types.ts b/x-pack/plugins/siem/server/lib/sources/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/sources/types.ts rename to x-pack/plugins/siem/server/lib/sources/types.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts b/x-pack/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts rename to x-pack/plugins/siem/server/lib/timeline/convert_saved_object_to_savedtimeline.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts b/x-pack/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts rename to x-pack/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts index 16654b2863ee..abe8de9bf5b9 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts +++ b/x-pack/plugins/siem/server/lib/timeline/create_timelines_stream_from_ndjson.ts @@ -13,7 +13,7 @@ import { createConcatStream, createSplitStream, createMapStream, -} from '../../../../../../../src/legacy/utils'; +} from '../../../../../../src/legacy/utils'; import { parseNdjsonStrings, filterExportedCounts, diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/pick_saved_timeline.ts b/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts similarity index 86% rename from x-pack/legacy/plugins/siem/server/lib/timeline/pick_saved_timeline.ts rename to x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts index 5b60086ae81b..94e04d45f4b8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/pick_saved_timeline.ts +++ b/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; -import { UNAUTHENTICATED_USER } from '../../../common/constants'; +import { AuthenticatedUser } from '../../../../security/common/model'; +import { UNAUTHENTICATED_USER } from 'siem/common/constants'; import { SavedTimeline } from './types'; export const pickSavedTimeline = ( diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts index a83c44377330..6530dccbbdca 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { TIMELINE_EXPORT_URL, TIMELINE_IMPORT_URL } from '../../../../../common/constants'; +import { TIMELINE_EXPORT_URL, TIMELINE_IMPORT_URL } from 'siem/common/constants'; import { requestMock } from '../../../detection_engine/routes/__mocks__'; import stream from 'stream'; const readable = new stream.Readable(); diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts index 4eadede40f5d..b877c76d8219 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts @@ -17,7 +17,7 @@ import { requestContextMock, requestMock, } from '../../detection_engine/routes/__mocks__'; -import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; +import { TIMELINE_EXPORT_URL } from 'siem/common/constants'; import { convertSavedObjectToSavedNote } from '../../note/saved_object'; import { convertSavedObjectToSavedPinnedEvent } from '../../pinned_event/saved_object'; import { convertSavedObjectToSavedTimeline } from '../convert_saved_object_to_savedtimeline'; diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts index fa849c1c325a..d3b83a33bdbb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts @@ -5,11 +5,11 @@ */ import { set as _set } from 'lodash/fp'; -import { IRouter } from '../../../../../../../../src/core/server'; +import { IRouter } from '../../../../../../../src/core/server'; import { LegacyServices } from '../../../types'; import { transformError, buildSiemResponse } from '../../detection_engine/routes/utils'; -import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; +import { TIMELINE_EXPORT_URL } from 'siem/common/constants'; import { getExportTimelineByObjectIds } from './utils/export_timelines'; import { diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts index 352f8f0a355f..608e2ac4b107 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts @@ -10,8 +10,8 @@ import { requestContextMock, requestMock, } from '../../detection_engine/routes/__mocks__'; -import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; -import { SecurityPluginSetup } from '../../../../../../../plugins/security/server'; +import { TIMELINE_EXPORT_URL } from 'siem/common/constants'; +import { SecurityPluginSetup } from '../../../../../security/server'; import { mockConfig, diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts index ad7ee28d8ad5..b982f0c0005c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts @@ -15,7 +15,7 @@ import { } from '../../detection_engine/routes/utils'; import { createTimelinesStreamFromNdJson } from '../create_timelines_stream_from_ndjson'; -import { createPromiseFromStreams } from '../../../../../../../../src/legacy/utils'; +import { createPromiseFromStreams } from '../../../../../../../src/legacy/utils'; import { createTimelines, @@ -27,8 +27,8 @@ import { PromiseFromStreams, } from './utils/import_timelines'; -import { IRouter } from '../../../../../../../../src/core/server'; -import { TIMELINE_IMPORT_URL } from '../../../../common/constants'; +import { IRouter } from '../../../../../../../src/core/server'; +import { TIMELINE_IMPORT_URL } from 'siem/common/constants'; import { SetupPlugins } from '../../../plugin'; import { ImportTimelinesPayloadSchemaRt } from './schemas/import_timelines_schema'; import { importRulesSchema } from '../../detection_engine/routes/schemas/response/import_rules_schema'; diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts b/x-pack/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/schemas/export_timelines_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts b/x-pack/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/schemas/import_timelines_schema.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts b/x-pack/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/schemas/schemas.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts b/x-pack/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts index 52ee2a891c9b..edd4abe0d76b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/utils/export_timelines.ts @@ -21,7 +21,7 @@ import { SavedObjectsClient, SavedObjectsFindOptions, SavedObjectsFindResponse, -} from '../../../../../../../../../src/core/server'; +} from '../../../../../../../../src/core/server'; import { ExportedTimelines, diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts b/x-pack/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts rename to x-pack/plugins/siem/server/lib/timeline/routes/utils/import_timelines.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/saved_object.test.ts b/x-pack/plugins/siem/server/lib/timeline/saved_object.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/saved_object.test.ts rename to x-pack/plugins/siem/server/lib/timeline/saved_object.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/saved_object.ts b/x-pack/plugins/siem/server/lib/timeline/saved_object.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/timeline/saved_object.ts rename to x-pack/plugins/siem/server/lib/timeline/saved_object.ts index bc6975331ad9..931ef0dab9fb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/saved_object.ts +++ b/x-pack/plugins/siem/server/lib/timeline/saved_object.ts @@ -6,8 +6,8 @@ import { getOr } from 'lodash/fp'; -import { SavedObjectsFindOptions } from '../../../../../../../src/core/server'; -import { UNAUTHENTICATED_USER } from '../../../common/constants'; +import { SavedObjectsFindOptions } from '../../../../../../src/core/server'; +import { UNAUTHENTICATED_USER } from 'siem/common/constants'; import { ResponseTimeline, PageInfoTimeline, diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/saved_object_mappings.ts b/x-pack/plugins/siem/server/lib/timeline/saved_object_mappings.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/timeline/saved_object_mappings.ts rename to x-pack/plugins/siem/server/lib/timeline/saved_object_mappings.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/timeline/types.ts b/x-pack/plugins/siem/server/lib/timeline/types.ts similarity index 99% rename from x-pack/legacy/plugins/siem/server/lib/timeline/types.ts rename to x-pack/plugins/siem/server/lib/timeline/types.ts index 523221192eca..0bce3300591c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/timeline/types.ts +++ b/x-pack/plugins/siem/server/lib/timeline/types.ts @@ -14,7 +14,7 @@ import { PinnedEventToReturnSavedObjectRuntimeType, PinnedEventSavedObject, } from '../pinned_event/types'; -import { SavedObjectsClient } from '../../../../../../../src/core/server'; +import { SavedObjectsClient } from '../../../../../../src/core/server'; /* * ColumnHeader Types diff --git a/x-pack/legacy/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/tls/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/lib/tls/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts index 10929c3d0364..b830d7bfbd47 100644 --- a/x-pack/legacy/plugins/siem/server/lib/tls/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts @@ -10,7 +10,7 @@ import { TlsData, TlsEdges } from '../../graphql/types'; import { inspectStringifyObject } from '../../utils/build_query'; import { DatabaseSearchResponse, FrameworkAdapter, FrameworkRequest } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; import { TlsRequestOptions } from './index'; import { TlsAdapter, TlsBuckets } from './types'; diff --git a/x-pack/legacy/plugins/siem/server/lib/tls/index.ts b/x-pack/plugins/siem/server/lib/tls/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/tls/index.ts rename to x-pack/plugins/siem/server/lib/tls/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/tls/mock.ts b/x-pack/plugins/siem/server/lib/tls/mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/tls/mock.ts rename to x-pack/plugins/siem/server/lib/tls/mock.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/tls/query_tls.dsl.ts b/x-pack/plugins/siem/server/lib/tls/query_tls.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/tls/query_tls.dsl.ts rename to x-pack/plugins/siem/server/lib/tls/query_tls.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/tls/types.ts b/x-pack/plugins/siem/server/lib/tls/types.ts similarity index 94% rename from x-pack/legacy/plugins/siem/server/lib/tls/types.ts rename to x-pack/plugins/siem/server/lib/tls/types.ts index 1fbb31ba3e0f..1949b0868e80 100644 --- a/x-pack/legacy/plugins/siem/server/lib/tls/types.ts +++ b/x-pack/plugins/siem/server/lib/tls/types.ts @@ -5,7 +5,7 @@ */ import { FrameworkRequest, RequestBasicOptions } from '../framework'; -import { TlsData } from '../../../public/graphql/types'; +import { TlsData } from 'siem/public/graphql/types'; export interface TlsAdapter { getTls(request: FrameworkRequest, options: RequestBasicOptions): Promise; diff --git a/x-pack/legacy/plugins/siem/server/lib/types.ts b/x-pack/plugins/siem/server/lib/types.ts similarity index 96% rename from x-pack/legacy/plugins/siem/server/lib/types.ts rename to x-pack/plugins/siem/server/lib/types.ts index 323ced734d24..946427431efb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/types.ts +++ b/x-pack/plugins/siem/server/lib/types.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AuthenticatedUser } from '../../../../../plugins/security/public'; -import { RequestHandlerContext } from '../../../../../../src/core/server'; +import { AuthenticatedUser } from '../../../security/public'; +import { RequestHandlerContext } from '../../../../../src/core/server'; export { ConfigType as Configuration } from '../../../../../plugins/siem/server'; import { Authentications } from './authentications'; diff --git a/x-pack/legacy/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts b/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts rename to x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.test.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts rename to x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts index 111df08b89e2..f16eb61f5309 100644 --- a/x-pack/legacy/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts @@ -11,7 +11,7 @@ import { mergeFieldsWithHit, inspectStringifyObject } from '../../utils/build_qu import { processFieldsMap, userFieldsMap } from '../ecs_fields'; import { FrameworkAdapter, FrameworkRequest, RequestOptionsPaginated } from '../framework'; import { HostHits, TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; import { buildQuery } from './query.dsl'; import { UncommonProcessBucket, diff --git a/x-pack/legacy/plugins/siem/server/lib/uncommon_processes/index.ts b/x-pack/plugins/siem/server/lib/uncommon_processes/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/uncommon_processes/index.ts rename to x-pack/plugins/siem/server/lib/uncommon_processes/index.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/uncommon_processes/query.dsl.ts b/x-pack/plugins/siem/server/lib/uncommon_processes/query.dsl.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/uncommon_processes/query.dsl.ts rename to x-pack/plugins/siem/server/lib/uncommon_processes/query.dsl.ts diff --git a/x-pack/legacy/plugins/siem/server/lib/uncommon_processes/types.ts b/x-pack/plugins/siem/server/lib/uncommon_processes/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/lib/uncommon_processes/types.ts rename to x-pack/plugins/siem/server/lib/uncommon_processes/types.ts diff --git a/x-pack/plugins/siem/server/plugin.ts b/x-pack/plugins/siem/server/plugin.ts index ccc6aef1452b..dba9ce34bdd4 100644 --- a/x-pack/plugins/siem/server/plugin.ts +++ b/x-pack/plugins/siem/server/plugin.ts @@ -5,33 +5,200 @@ */ import { Observable } from 'rxjs'; +import { i18n } from '@kbn/i18n'; -import { CoreSetup, PluginInitializerContext, Logger } from '../../../../src/core/server'; +import { + CoreSetup, + CoreStart, + PluginInitializerContext, + Logger, +} from '../../../../src/core/server'; +import { + PluginStartContract as AlertingStart, + PluginSetupContract as AlertingSetup, +} from '../../alerting/server'; +import { SecurityPluginSetup as SecuritySetup } from '../../security/server'; +import { PluginSetupContract as FeaturesSetup } from '../../features/server'; +import { MlPluginSetup as MlSetup } from '../../ml/server'; +import { EncryptedSavedObjectsPluginSetup as EncryptedSavedObjectsSetup } from '../../encrypted_saved_objects/server'; +import { SpacesPluginSetup as SpacesSetup } from '../../spaces/server'; +import { PluginStartContract as ActionsStart } from '../../actions/server'; +import { LicensingPluginSetup } from '../../licensing/server'; +import { LegacyServices } from './types'; +import { initServer } from './init_server'; +import { compose } from './lib/compose/kibana'; +import { initRoutes } from './routes'; +import { isAlertExecutor } from './lib/detection_engine/signals/types'; +import { signalRulesAlertType } from './lib/detection_engine/signals/signal_rule_alert_type'; +import { rulesNotificationAlertType } from './lib/detection_engine/notifications/rules_notification_alert_type'; +import { isNotificationAlertExecutor } from './lib/detection_engine/notifications/types'; +import { hasListsFeature, listsEnvFeatureFlagName } from './lib/detection_engine/feature_flags'; +import { + noteSavedObjectType, + pinnedEventSavedObjectType, + timelineSavedObjectType, + ruleStatusSavedObjectType, + ruleActionsSavedObjectType, +} from './saved_objects'; +import { SiemClientFactory } from './client'; import { createConfig$, ConfigType } from './config'; +export { CoreSetup, CoreStart }; + +export interface SetupPlugins { + alerting: AlertingSetup; + encryptedSavedObjects: EncryptedSavedObjectsSetup; + features: FeaturesSetup; + licensing: LicensingPluginSetup; + security?: SecuritySetup; + spaces?: SpacesSetup; + ml?: MlSetup; +} + +export interface StartPlugins { + actions: ActionsStart; + alerting: AlertingStart; +} + export class Plugin { readonly name = 'siem'; private readonly logger: Logger; - // @ts-ignore-next-line TODO(rylnd): use it or lose it private readonly config$: Observable; + private context: PluginInitializerContext; + private siemClientFactory: SiemClientFactory; constructor(context: PluginInitializerContext) { - const { logger } = context; - this.logger = logger.get(); - this.logger.debug('plugin initialized'); - + this.context = context; + this.logger = context.logger.get('plugins', this.name); this.config$ = createConfig$(context); - } + this.siemClientFactory = new SiemClientFactory(); - public setup(core: CoreSetup, plugins: {}) { - this.logger.debug('plugin setup'); + this.logger.debug('Shim plugin initialized'); } - public start() { - this.logger.debug('plugin started'); - } + public setup(core: CoreSetup, plugins: SetupPlugins, __legacy: LegacyServices) { + this.logger.debug('Shim plugin setup'); + if (hasListsFeature()) { + // TODO: Remove this once we have the lists feature supported + this.logger.error( + `You have activated the lists feature flag which is NOT currently supported for SIEM! You should turn this feature flag off immediately by un-setting the environment variable: ${listsEnvFeatureFlagName} and restarting Kibana` + ); + } - public stop() { - this.logger.debug('plugin stopped'); + const router = core.http.createRouter(); + core.http.registerRouteHandlerContext(this.name, (context, request, response) => ({ + getSiemClient: () => this.siemClientFactory.create(request), + })); + + this.siemClientFactory.setup({ + getSpaceId: plugins.spaces?.spacesService?.getSpaceId, + config: __legacy.config, + }); + + initRoutes( + router, + __legacy.config, + plugins.encryptedSavedObjects?.usingEphemeralEncryptionKey ?? false, + plugins.security + ); + + plugins.features.registerFeature({ + id: this.name, + name: i18n.translate('xpack.siem.featureRegistry.linkSiemTitle', { + defaultMessage: 'SIEM', + }), + order: 1100, + icon: 'securityAnalyticsApp', + navLinkId: 'siem', + app: ['siem', 'kibana'], + catalogue: ['siem'], + privileges: { + all: { + app: ['siem', 'kibana'], + catalogue: ['siem'], + api: ['siem', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], + savedObject: { + all: [ + 'alert', + 'action', + 'action_task_params', + noteSavedObjectType, + pinnedEventSavedObjectType, + timelineSavedObjectType, + ruleStatusSavedObjectType, + ruleActionsSavedObjectType, + 'cases', + 'cases-comments', + 'cases-configure', + 'cases-user-actions', + ], + read: ['config'], + }, + ui: [ + 'show', + 'crud', + 'alerting:show', + 'actions:show', + 'alerting:save', + 'actions:save', + 'alerting:delete', + 'actions:delete', + ], + }, + read: { + app: ['siem', 'kibana'], + catalogue: ['siem'], + api: ['siem', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], + savedObject: { + all: ['alert', 'action', 'action_task_params'], + read: [ + 'config', + noteSavedObjectType, + pinnedEventSavedObjectType, + timelineSavedObjectType, + ruleStatusSavedObjectType, + ruleActionsSavedObjectType, + 'cases', + 'cases-comments', + 'cases-configure', + 'cases-user-actions', + ], + }, + ui: [ + 'show', + 'alerting:show', + 'actions:show', + 'alerting:save', + 'actions:save', + 'alerting:delete', + 'actions:delete', + ], + }, + }, + }); + + if (plugins.alerting != null) { + const signalRuleType = signalRulesAlertType({ + logger: this.logger, + version: this.context.env.packageInfo.version, + ml: plugins.ml, + }); + const ruleNotificationType = rulesNotificationAlertType({ + logger: this.logger, + }); + + if (isAlertExecutor(signalRuleType)) { + plugins.alerting.registerType(signalRuleType); + } + + if (isNotificationAlertExecutor(ruleNotificationType)) { + plugins.alerting.registerType(ruleNotificationType); + } + } + + const libs = compose(core, plugins, this.context.env.mode.prod); + initServer(libs); } + + public start(core: CoreStart, plugins: StartPlugins) {} } diff --git a/x-pack/legacy/plugins/siem/server/routes/index.ts b/x-pack/plugins/siem/server/routes/index.ts similarity index 98% rename from x-pack/legacy/plugins/siem/server/routes/index.ts rename to x-pack/plugins/siem/server/routes/index.ts index 8c9f92890c26..18bc0f575ebe 100644 --- a/x-pack/legacy/plugins/siem/server/routes/index.ts +++ b/x-pack/plugins/siem/server/routes/index.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter } from '../../../../../../src/core/server'; +import { IRouter } from '../../../../../src/core/server'; import { LegacyServices } from '../types'; import { createRulesRoute } from '../lib/detection_engine/routes/rules/create_rules_route'; diff --git a/x-pack/legacy/plugins/siem/server/saved_objects.ts b/x-pack/plugins/siem/server/saved_objects.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/saved_objects.ts rename to x-pack/plugins/siem/server/saved_objects.ts diff --git a/x-pack/legacy/plugins/siem/server/types.ts b/x-pack/plugins/siem/server/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/types.ts rename to x-pack/plugins/siem/server/types.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts b/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts rename to x-pack/plugins/siem/server/utils/beat_schema/8.0.0/auditbeat.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts b/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts rename to x-pack/plugins/siem/server/utils/beat_schema/8.0.0/ecs.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts b/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts rename to x-pack/plugins/siem/server/utils/beat_schema/8.0.0/filebeat.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/index.ts b/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/index.ts rename to x-pack/plugins/siem/server/utils/beat_schema/8.0.0/index.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts b/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts rename to x-pack/plugins/siem/server/utils/beat_schema/8.0.0/packetbeat.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts b/x-pack/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts rename to x-pack/plugins/siem/server/utils/beat_schema/8.0.0/winlogbeat.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/index.test.ts b/x-pack/plugins/siem/server/utils/beat_schema/index.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/index.test.ts rename to x-pack/plugins/siem/server/utils/beat_schema/index.test.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/index.ts b/x-pack/plugins/siem/server/utils/beat_schema/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/index.ts rename to x-pack/plugins/siem/server/utils/beat_schema/index.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/beat_schema/type.ts b/x-pack/plugins/siem/server/utils/beat_schema/type.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/beat_schema/type.ts rename to x-pack/plugins/siem/server/utils/beat_schema/type.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts b/x-pack/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts rename to x-pack/plugins/siem/server/utils/build_query/calculate_timeseries_interval.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/create_options.test.ts b/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/utils/build_query/create_options.test.ts rename to x-pack/plugins/siem/server/utils/build_query/create_options.test.ts index 8262b5b670d3..7e9b8bec39a2 100644 --- a/x-pack/legacy/plugins/siem/server/utils/build_query/create_options.test.ts +++ b/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts @@ -6,7 +6,7 @@ import { omit } from 'lodash/fp'; -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from 'siem/default_index_pattern'; import { Direction } from '../../graphql/types'; import { RequestOptions } from '../../lib/framework'; diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/create_options.ts b/x-pack/plugins/siem/server/utils/build_query/create_options.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/create_options.ts rename to x-pack/plugins/siem/server/utils/build_query/create_options.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/field.mock.ts b/x-pack/plugins/siem/server/utils/build_query/field.mock.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/field.mock.ts rename to x-pack/plugins/siem/server/utils/build_query/field.mock.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/fields.test.ts b/x-pack/plugins/siem/server/utils/build_query/fields.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/fields.test.ts rename to x-pack/plugins/siem/server/utils/build_query/fields.test.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/fields.ts b/x-pack/plugins/siem/server/utils/build_query/fields.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/fields.ts rename to x-pack/plugins/siem/server/utils/build_query/fields.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/filters.ts b/x-pack/plugins/siem/server/utils/build_query/filters.ts similarity index 88% rename from x-pack/legacy/plugins/siem/server/utils/build_query/filters.ts rename to x-pack/plugins/siem/server/utils/build_query/filters.ts index 95c9a975454f..5a7b1a259cad 100644 --- a/x-pack/legacy/plugins/siem/server/utils/build_query/filters.ts +++ b/x-pack/plugins/siem/server/utils/build_query/filters.ts @@ -6,7 +6,7 @@ import { isEmpty } from 'lodash/fp'; -import { ESQuery } from '../../../common/typed_json'; +import { ESQuery } from 'siem/common/typed_json'; export const createQueryFilterClauses = (filterQuery: ESQuery | undefined) => !isEmpty(filterQuery) ? [filterQuery] : []; diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/index.ts b/x-pack/plugins/siem/server/utils/build_query/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/index.ts rename to x-pack/plugins/siem/server/utils/build_query/index.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts b/x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts rename to x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.test.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts b/x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts rename to x-pack/plugins/siem/server/utils/build_query/merge_fields_with_hits.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/reduce_fields.test.ts b/x-pack/plugins/siem/server/utils/build_query/reduce_fields.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/reduce_fields.test.ts rename to x-pack/plugins/siem/server/utils/build_query/reduce_fields.test.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_query/reduce_fields.ts b/x-pack/plugins/siem/server/utils/build_query/reduce_fields.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/build_query/reduce_fields.ts rename to x-pack/plugins/siem/server/utils/build_query/reduce_fields.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/build_validation/route_validation.test.ts b/x-pack/plugins/siem/server/utils/build_validation/route_validation.test.ts similarity index 97% rename from x-pack/legacy/plugins/siem/server/utils/build_validation/route_validation.test.ts rename to x-pack/plugins/siem/server/utils/build_validation/route_validation.test.ts index 888cd5dfe539..d17a8457ff81 100644 --- a/x-pack/legacy/plugins/siem/server/utils/build_validation/route_validation.test.ts +++ b/x-pack/plugins/siem/server/utils/build_validation/route_validation.test.ts @@ -6,7 +6,7 @@ import { buildRouteValidation } from './route_validation'; import * as rt from 'io-ts'; -import { RouteValidationResultFactory } from '../../../../../../../src/core/server/http'; +import { RouteValidationResultFactory } from '../../../../../../src/core/server/http'; describe('buildRouteValidation', () => { const schema = rt.type({ diff --git a/x-pack/legacy/plugins/siem/server/utils/build_validation/route_validation.ts b/x-pack/plugins/siem/server/utils/build_validation/route_validation.ts similarity index 95% rename from x-pack/legacy/plugins/siem/server/utils/build_validation/route_validation.ts rename to x-pack/plugins/siem/server/utils/build_validation/route_validation.ts index 1281c23cbc89..bfcd0998fe69 100644 --- a/x-pack/legacy/plugins/siem/server/utils/build_validation/route_validation.ts +++ b/x-pack/plugins/siem/server/utils/build_validation/route_validation.ts @@ -12,7 +12,7 @@ import { RouteValidationFunction, RouteValidationResultFactory, RouteValidationError, -} from '../../../../../../../src/core/server'; +} from '../../../../../../src/core/server'; type RequestValidationResult = | { diff --git a/x-pack/legacy/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts rename to x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts index 2b5b34edca14..c3b590d7ee82 100644 --- a/x-pack/legacy/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts +++ b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ import { transformDataToNdjson } from './create_stream_from_ndjson'; -import { ImportRuleAlertRest } from '../../lib/detection_engine/types'; -import { sampleRule } from '../../lib/detection_engine/signals/__mocks__/es_results'; +import { ImportRuleAlertRest } from 'siem-legacy-ui/server/lib/detection_engine/types'; +import { sampleRule } from 'siem-legacy-ui/server/lib/detection_engine/signals/__mocks__/es_results'; export const getOutputSample = (): Partial => ({ rule_id: 'rule-1', diff --git a/x-pack/legacy/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts similarity index 85% rename from x-pack/legacy/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts rename to x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts index 0b7966926b5d..f58c9422e1af 100644 --- a/x-pack/legacy/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts +++ b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts @@ -5,10 +5,10 @@ */ import { Transform } from 'stream'; import { has, isString } from 'lodash/fp'; -import { ImportRuleAlertRest } from '../../lib/detection_engine/types'; -import { createMapStream, createFilterStream } from '../../../../../../../src/legacy/utils/streams'; -import { importRulesSchema } from '../../lib/detection_engine/routes/schemas/import_rules_schema'; -import { BadRequestError } from '../../lib/detection_engine/errors/bad_request_error'; +import { ImportRuleAlertRest } from 'siem-legacy-ui/server/lib/detection_engine/types'; +import { createMapStream, createFilterStream } from '../../../../../../src/legacy/utils/streams'; +import { importRulesSchema } from 'siem-legacy-ui/server/lib/detection_engine/routes/schemas/import_rules_schema'; +import { BadRequestError } from 'siem-legacy-ui/server/lib/detection_engine/errors/bad_request_error'; export interface RulesObjectsExportResultDetails { /** number of successfully exported objects */ diff --git a/x-pack/legacy/plugins/siem/server/utils/serialized_query.ts b/x-pack/plugins/siem/server/utils/serialized_query.ts similarity index 92% rename from x-pack/legacy/plugins/siem/server/utils/serialized_query.ts rename to x-pack/plugins/siem/server/utils/serialized_query.ts index 1ba6eb8b9f9a..09b227d8c5a3 100644 --- a/x-pack/legacy/plugins/siem/server/utils/serialized_query.ts +++ b/x-pack/plugins/siem/server/utils/serialized_query.ts @@ -7,7 +7,7 @@ import { UserInputError } from 'apollo-server-errors'; import { isEmpty, isPlainObject, isString } from 'lodash/fp'; -import { JsonObject } from '../../../../../../src/plugins/kibana_utils/public'; +import { JsonObject } from '../../../../../src/plugins/kibana_utils/public'; export const parseFilterQuery = (filterQuery: string): JsonObject => { try { diff --git a/x-pack/legacy/plugins/siem/server/utils/typed_elasticsearch_mappings.ts b/x-pack/plugins/siem/server/utils/typed_elasticsearch_mappings.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/typed_elasticsearch_mappings.ts rename to x-pack/plugins/siem/server/utils/typed_elasticsearch_mappings.ts diff --git a/x-pack/legacy/plugins/siem/server/utils/typed_resolvers.ts b/x-pack/plugins/siem/server/utils/typed_resolvers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/server/utils/typed_resolvers.ts rename to x-pack/plugins/siem/server/utils/typed_resolvers.ts diff --git a/x-pack/test/detection_engine_api_integration/common/config.ts b/x-pack/test/detection_engine_api_integration/common/config.ts index 89ebd902834b..e89352118990 100644 --- a/x-pack/test/detection_engine_api_integration/common/config.ts +++ b/x-pack/test/detection_engine_api_integration/common/config.ts @@ -8,7 +8,7 @@ import path from 'path'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; import { services } from './services'; -import { listsEnvFeatureFlagName } from '../../../legacy/plugins/siem/server/lib/detection_engine/feature_flags'; +import { listsEnvFeatureFlagName } from '../../../plugins/siem/server/lib/detection_engine/feature_flags'; interface CreateTestConfigOptions { license: string; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts index 0a5b2def3eb1..bc2d7a2ce466 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { OutputRuleAlertRest } from '../../../../legacy/plugins/siem/server/lib/detection_engine/types'; +import { OutputRuleAlertRest } from '../../../../plugins/siem/server/lib/detection_engine/types'; import { DETECTION_ENGINE_INDEX_URL } from '../../../../legacy/plugins/siem/common/constants'; /** From 27f5eaaaab35dca1c6c90acdf1cc96b10e2f6d5c Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sat, 11 Apr 2020 16:16:10 -0500 Subject: [PATCH 02/20] Move common folder into NP --- x-pack/legacy/plugins/siem/index.ts | 2 +- x-pack/legacy/plugins/siem/public/app/app.tsx | 2 +- x-pack/legacy/plugins/siem/public/containers/helpers.test.ts | 2 +- x-pack/legacy/plugins/siem/public/containers/helpers.ts | 2 +- .../legacy/plugins/siem/public/containers/query_template.tsx | 2 +- .../siem/public/containers/query_template_paginated.tsx | 2 +- x-pack/legacy/plugins/siem/public/mock/global_state.ts | 2 +- x-pack/legacy/plugins/siem/public/mock/kibana_react.ts | 2 +- .../rules/components/select_rule_type/index.tsx | 4 ++-- x-pack/legacy/plugins/siem/public/register_feature.ts | 2 +- .../plugins/siem/public/utils/default_date_settings.test.ts | 2 +- .../plugins/siem/public/utils/default_date_settings.ts | 2 +- x-pack/{legacy => }/plugins/siem/common/constants.ts | 0 .../plugins/siem/common/detection_engine/ml_helpers.test.ts | 0 .../plugins/siem/common/detection_engine/ml_helpers.ts | 0 .../siem/common/detection_engine/transform_actions.test.ts | 0 .../siem/common/detection_engine/transform_actions.ts | 0 .../plugins/siem/common/detection_engine/types.ts | 0 .../{legacy => }/plugins/siem/common/graphql/root/index.ts | 0 .../plugins/siem/common/graphql/root/schema.gql.ts | 0 .../{legacy => }/plugins/siem/common/graphql/shared/index.ts | 0 .../plugins/siem/common/graphql/shared/schema.gql.ts | 0 x-pack/{legacy => }/plugins/siem/common/typed_json.ts | 2 +- x-pack/{legacy => }/plugins/siem/common/utility_types.ts | 0 x-pack/plugins/siem/server/client/client.ts | 2 +- x-pack/plugins/siem/server/config.ts | 5 +---- x-pack/plugins/siem/server/graphql/index.ts | 4 ++-- .../siem/server/lib/authentications/elasticsearch_adapter.ts | 2 +- x-pack/plugins/siem/server/lib/detection_engine/types.ts | 2 +- x-pack/plugins/siem/server/lib/framework/types.ts | 2 +- .../plugins/siem/server/lib/hosts/elasticsearch_adapter.ts | 2 +- .../siem/server/lib/ip_details/elasticsearch_adapter.ts | 2 +- .../plugins/siem/server/lib/network/elasticsearch_adapter.ts | 2 +- x-pack/plugins/siem/server/lib/note/saved_object.ts | 2 +- x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts | 2 +- .../plugins/siem/server/lib/timeline/pick_saved_timeline.ts | 2 +- x-pack/plugins/siem/server/lib/timeline/saved_object.ts | 2 +- x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts | 2 +- .../server/lib/uncommon_processes/elasticsearch_adapter.ts | 2 +- x-pack/plugins/siem/server/utils/build_query/filters.ts | 2 +- .../security_and_spaces/tests/add_prepackaged_rules.ts | 2 +- .../security_and_spaces/tests/create_rules.ts | 2 +- .../security_and_spaces/tests/create_rules_bulk.ts | 2 +- .../security_and_spaces/tests/delete_rules.ts | 2 +- .../security_and_spaces/tests/delete_rules_bulk.ts | 2 +- .../security_and_spaces/tests/export_rules.ts | 2 +- .../security_and_spaces/tests/find_rules.ts | 2 +- .../security_and_spaces/tests/find_statuses.ts | 2 +- .../tests/get_prepackaged_rules_status.ts | 2 +- .../security_and_spaces/tests/import_rules.ts | 2 +- .../security_and_spaces/tests/open_close_signals.ts | 2 +- .../security_and_spaces/tests/patch_rules.ts | 2 +- .../security_and_spaces/tests/patch_rules_bulk.ts | 2 +- .../security_and_spaces/tests/query_signals.ts | 2 +- .../security_and_spaces/tests/read_rules.ts | 2 +- .../security_and_spaces/tests/update_rules.ts | 2 +- .../security_and_spaces/tests/update_rules_bulk.ts | 2 +- .../security_and_spaces/tests/utils.ts | 2 +- 58 files changed, 49 insertions(+), 52 deletions(-) rename x-pack/{legacy => }/plugins/siem/common/constants.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/detection_engine/ml_helpers.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/detection_engine/ml_helpers.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/detection_engine/transform_actions.test.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/detection_engine/transform_actions.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/detection_engine/types.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/graphql/root/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/graphql/root/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/graphql/shared/index.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/graphql/shared/schema.gql.ts (100%) rename x-pack/{legacy => }/plugins/siem/common/typed_json.ts (91%) rename x-pack/{legacy => }/plugins/siem/common/utility_types.ts (100%) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 82f39f3a37ea..1a36cd3bbc2b 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -30,7 +30,7 @@ import { SIGNALS_INDEX_KEY, IP_REPUTATION_LINKS_SETTING, IP_REPUTATION_LINKS_SETTING_DEFAULT, -} from './common/constants'; +} from '../../../plugins/siem/common/constants'; import { defaultIndexPattern } from './default_index_pattern'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/utils'; diff --git a/x-pack/legacy/plugins/siem/public/app/app.tsx b/x-pack/legacy/plugins/siem/public/app/app.tsx index 7413aeab549d..44c1c923cd6e 100644 --- a/x-pack/legacy/plugins/siem/public/app/app.tsx +++ b/x-pack/legacy/plugins/siem/public/app/app.tsx @@ -20,7 +20,7 @@ import { pluck } from 'rxjs/operators'; import { KibanaContextProvider, useKibana, useUiSetting$ } from '../lib/kibana'; import { Storage } from '../../../../../../src/plugins/kibana_utils/public'; -import { DEFAULT_DARK_MODE } from '../../common/constants'; +import { DEFAULT_DARK_MODE } from '../../../../../plugins/siem/common/constants'; import { ErrorToastDispatcher } from '../components/error_toast_dispatcher'; import { compose } from '../lib/compose/kibana_compose'; import { AppFrontendLibs, AppApolloClient } from '../lib/lib'; diff --git a/x-pack/legacy/plugins/siem/public/containers/helpers.test.ts b/x-pack/legacy/plugins/siem/public/containers/helpers.test.ts index 5d378d79acc7..67cfe259927a 100644 --- a/x-pack/legacy/plugins/siem/public/containers/helpers.test.ts +++ b/x-pack/legacy/plugins/siem/public/containers/helpers.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ESQuery } from '../../common/typed_json'; +import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; import { createFilter } from './helpers'; diff --git a/x-pack/legacy/plugins/siem/public/containers/helpers.ts b/x-pack/legacy/plugins/siem/public/containers/helpers.ts index 5f66e3f4b88d..7ff9577bfb05 100644 --- a/x-pack/legacy/plugins/siem/public/containers/helpers.ts +++ b/x-pack/legacy/plugins/siem/public/containers/helpers.ts @@ -7,7 +7,7 @@ import { FetchPolicy } from 'apollo-client'; import { isString } from 'lodash/fp'; -import { ESQuery } from '../../common/typed_json'; +import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; export const createFilter = (filterQuery: ESQuery | string | undefined) => isString(filterQuery) ? filterQuery : JSON.stringify(filterQuery); diff --git a/x-pack/legacy/plugins/siem/public/containers/query_template.tsx b/x-pack/legacy/plugins/siem/public/containers/query_template.tsx index dfb452c24b86..c33f5fd89a79 100644 --- a/x-pack/legacy/plugins/siem/public/containers/query_template.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/query_template.tsx @@ -8,7 +8,7 @@ import { ApolloQueryResult } from 'apollo-client'; import React from 'react'; import { FetchMoreOptions, FetchMoreQueryOptions, OperationVariables } from 'react-apollo'; -import { ESQuery } from '../../common/typed_json'; +import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; export interface QueryTemplateProps { id?: string; diff --git a/x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx b/x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx index db618f216d83..45041a644761 100644 --- a/x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/query_template_paginated.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { FetchMoreOptions, FetchMoreQueryOptions, OperationVariables } from 'react-apollo'; import deepEqual from 'fast-deep-equal'; -import { ESQuery } from '../../common/typed_json'; +import { ESQuery } from '../../../../../plugins/siem/common/typed_json'; import { inputsModel } from '../store/model'; import { generateTablePaginationOptions } from '../components/paginated_table/helpers'; diff --git a/x-pack/legacy/plugins/siem/public/mock/global_state.ts b/x-pack/legacy/plugins/siem/public/mock/global_state.ts index 6678c3043a3d..266c3aadea8a 100644 --- a/x-pack/legacy/plugins/siem/public/mock/global_state.ts +++ b/x-pack/legacy/plugins/siem/public/mock/global_state.ts @@ -22,7 +22,7 @@ import { DEFAULT_TO, DEFAULT_INTERVAL_TYPE, DEFAULT_INTERVAL_VALUE, -} from '../../common/constants'; +} from '../../../../../plugins/siem/common/constants'; export const mockGlobalState: State = { app: { diff --git a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts b/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts index 968ab6543f4f..384ba28c7c80 100644 --- a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts +++ b/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts @@ -23,7 +23,7 @@ import { DEFAULT_INTERVAL_PAUSE, DEFAULT_INTERVAL_VALUE, DEFAULT_BYTES_FORMAT, -} from '../../common/constants'; +} from '../../../../../plugins/siem/common/constants'; import { defaultIndexPattern } from '../../default_index_pattern'; import { createKibanaCoreStartMock, createKibanaPluginsStartMock } from './kibana_core'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx index 6f3d299da8d4..2b1e5a367a96 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/select_rule_type/index.tsx @@ -16,8 +16,8 @@ import { EuiText, } from '@elastic/eui'; -import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; -import { RuleType } from '../../../../../../common/detection_engine/types'; +import { isMlRule } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { RuleType } from '../../../../../../../../../plugins/siem/common/detection_engine/types'; import { FieldHook } from '../../../../../shared_imports'; import { useKibana } from '../../../../../lib/kibana'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/register_feature.ts b/x-pack/legacy/plugins/siem/public/register_feature.ts index ca7a22408b6f..b5e8f78ebc56 100644 --- a/x-pack/legacy/plugins/siem/public/register_feature.ts +++ b/x-pack/legacy/plugins/siem/public/register_feature.ts @@ -6,7 +6,7 @@ import { npSetup } from 'ui/new_platform'; import { FeatureCatalogueCategory } from '../../../../../src/plugins/home/public'; -import { APP_ID } from '../common/constants'; +import { APP_ID } from '../../../../plugins/siem/common/constants'; // TODO(rylnd): move this into Plugin.setup once we're on NP npSetup.plugins.home.featureCatalogue.register({ diff --git a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts b/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts index 9dc179ba7a6e..e7033b304386 100644 --- a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts +++ b/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts @@ -21,7 +21,7 @@ import { DEFAULT_INTERVAL_PAUSE, DEFAULT_INTERVAL_VALUE, DEFAULT_INTERVAL_TYPE, -} from '../../common/constants'; +} from '../../../../../plugins/siem/common/constants'; import { KibanaServices } from '../lib/kibana'; import { Policy } from '../store/inputs/model'; diff --git a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts b/x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts index c4869a4851ae..89f7d34d8513 100644 --- a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts +++ b/x-pack/legacy/plugins/siem/public/utils/default_date_settings.ts @@ -15,7 +15,7 @@ import { DEFAULT_TO, DEFAULT_INTERVAL_TYPE, DEFAULT_INTERVAL_VALUE, -} from '../../common/constants'; +} from '../../../../../plugins/siem/common/constants'; import { KibanaServices } from '../lib/kibana'; import { Policy } from '../store/inputs/model'; diff --git a/x-pack/legacy/plugins/siem/common/constants.ts b/x-pack/plugins/siem/common/constants.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/constants.ts rename to x-pack/plugins/siem/common/constants.ts diff --git a/x-pack/legacy/plugins/siem/common/detection_engine/ml_helpers.test.ts b/x-pack/plugins/siem/common/detection_engine/ml_helpers.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/detection_engine/ml_helpers.test.ts rename to x-pack/plugins/siem/common/detection_engine/ml_helpers.test.ts diff --git a/x-pack/legacy/plugins/siem/common/detection_engine/ml_helpers.ts b/x-pack/plugins/siem/common/detection_engine/ml_helpers.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/detection_engine/ml_helpers.ts rename to x-pack/plugins/siem/common/detection_engine/ml_helpers.ts diff --git a/x-pack/legacy/plugins/siem/common/detection_engine/transform_actions.test.ts b/x-pack/plugins/siem/common/detection_engine/transform_actions.test.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/detection_engine/transform_actions.test.ts rename to x-pack/plugins/siem/common/detection_engine/transform_actions.test.ts diff --git a/x-pack/legacy/plugins/siem/common/detection_engine/transform_actions.ts b/x-pack/plugins/siem/common/detection_engine/transform_actions.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/detection_engine/transform_actions.ts rename to x-pack/plugins/siem/common/detection_engine/transform_actions.ts diff --git a/x-pack/legacy/plugins/siem/common/detection_engine/types.ts b/x-pack/plugins/siem/common/detection_engine/types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/detection_engine/types.ts rename to x-pack/plugins/siem/common/detection_engine/types.ts diff --git a/x-pack/legacy/plugins/siem/common/graphql/root/index.ts b/x-pack/plugins/siem/common/graphql/root/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/graphql/root/index.ts rename to x-pack/plugins/siem/common/graphql/root/index.ts diff --git a/x-pack/legacy/plugins/siem/common/graphql/root/schema.gql.ts b/x-pack/plugins/siem/common/graphql/root/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/graphql/root/schema.gql.ts rename to x-pack/plugins/siem/common/graphql/root/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/common/graphql/shared/index.ts b/x-pack/plugins/siem/common/graphql/shared/index.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/graphql/shared/index.ts rename to x-pack/plugins/siem/common/graphql/shared/index.ts diff --git a/x-pack/legacy/plugins/siem/common/graphql/shared/schema.gql.ts b/x-pack/plugins/siem/common/graphql/shared/schema.gql.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/graphql/shared/schema.gql.ts rename to x-pack/plugins/siem/common/graphql/shared/schema.gql.ts diff --git a/x-pack/legacy/plugins/siem/common/typed_json.ts b/x-pack/plugins/siem/common/typed_json.ts similarity index 91% rename from x-pack/legacy/plugins/siem/common/typed_json.ts rename to x-pack/plugins/siem/common/typed_json.ts index dcd26d176d74..62e7319e091c 100644 --- a/x-pack/legacy/plugins/siem/common/typed_json.ts +++ b/x-pack/plugins/siem/common/typed_json.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { JsonObject } from '../../../../../src/plugins/kibana_utils/public'; +import { JsonObject } from '../../../../src/plugins/kibana_utils/public'; export type ESQuery = ESRangeQuery | ESQueryStringQuery | ESMatchQuery | ESTermQuery | JsonObject; diff --git a/x-pack/legacy/plugins/siem/common/utility_types.ts b/x-pack/plugins/siem/common/utility_types.ts similarity index 100% rename from x-pack/legacy/plugins/siem/common/utility_types.ts rename to x-pack/plugins/siem/common/utility_types.ts diff --git a/x-pack/plugins/siem/server/client/client.ts b/x-pack/plugins/siem/server/client/client.ts index 16082b819b24..245b81d0be97 100644 --- a/x-pack/plugins/siem/server/client/client.ts +++ b/x-pack/plugins/siem/server/client/client.ts @@ -6,7 +6,7 @@ import { Legacy } from 'kibana'; -import { APP_ID, SIGNALS_INDEX_KEY } from 'siem/common/constants'; +import { APP_ID, SIGNALS_INDEX_KEY } from '../../common/constants'; export class SiemClient { public readonly signalsIndex: string; diff --git a/x-pack/plugins/siem/server/config.ts b/x-pack/plugins/siem/server/config.ts index 224043c0c6fe..44cc7b363c9d 100644 --- a/x-pack/plugins/siem/server/config.ts +++ b/x-pack/plugins/siem/server/config.ts @@ -7,10 +7,7 @@ import { Observable } from 'rxjs'; import { schema, TypeOf } from '@kbn/config-schema'; import { PluginInitializerContext } from '../../../../src/core/server'; -import { - SIGNALS_INDEX_KEY, - DEFAULT_SIGNALS_INDEX, -} from '../../../legacy/plugins/siem/common/constants'; +import { SIGNALS_INDEX_KEY, DEFAULT_SIGNALS_INDEX } from '../common/constants'; export const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), diff --git a/x-pack/plugins/siem/server/graphql/index.ts b/x-pack/plugins/siem/server/graphql/index.ts index 3ddd1359fdd4..7e2573570789 100644 --- a/x-pack/plugins/siem/server/graphql/index.ts +++ b/x-pack/plugins/siem/server/graphql/index.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { rootSchema } from 'siem/common/graphql/root'; -import { sharedSchema } from 'siem/common/graphql/shared'; +import { rootSchema } from '../../common/graphql/root'; +import { sharedSchema } from '../../common/graphql/shared'; import { authenticationsSchema } from './authentications'; import { ecsSchema } from './ecs'; diff --git a/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts index 3d313d4b4b44..79f13ce4461e 100644 --- a/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/authentications/elasticsearch_adapter.ts @@ -10,7 +10,7 @@ import { AuthenticationsData, AuthenticationsEdges } from '../../graphql/types'; import { mergeFieldsWithHit, inspectStringifyObject } from '../../utils/build_query'; import { FrameworkAdapter, FrameworkRequest, RequestOptionsPaginated } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { auditdFieldsMap, buildQuery } from './query.dsl'; import { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/types.ts index 7bb291e726d4..5e6e63f1868c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/types.ts @@ -8,7 +8,7 @@ import { CallAPIOptions } from '../../../../../../src/core/server'; import { Filter } from '../../../../../../src/plugins/data/server'; import { IRuleStatusAttributes } from './rules/types'; import { ListsDefaultArraySchema } from './routes/schemas/types/lists_default_array'; -import { RuleAlertAction, RuleType } from 'siem/common/detection_engine/types'; +import { RuleAlertAction, RuleType } from '../../../common/detection_engine/types'; export type PartialFilter = Partial; diff --git a/x-pack/plugins/siem/server/lib/framework/types.ts b/x-pack/plugins/siem/server/lib/framework/types.ts index 20cb98834e18..abe572df8706 100644 --- a/x-pack/plugins/siem/server/lib/framework/types.ts +++ b/x-pack/plugins/siem/server/lib/framework/types.ts @@ -9,7 +9,7 @@ import { GraphQLSchema } from 'graphql'; import { RequestHandlerContext, KibanaRequest } from '../../../../../../src/core/server'; import { AuthenticatedUser } from '../../../../security/common/model'; -import { ESQuery } from 'siem/common/typed_json'; +import { ESQuery } from '../../../common/typed_json'; import { PaginationInput, PaginationInputPaginated, diff --git a/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts index c0c73d45a6b1..1b69863a443b 100644 --- a/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/hosts/elasticsearch_adapter.ts @@ -26,7 +26,7 @@ import { HostsRequestOptions, HostValue, } from './types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; export class ElasticsearchHostsAdapter implements HostsAdapter { constructor(private readonly framework: FrameworkAdapter) {} diff --git a/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts index 54fa2ee706d1..90803ca302bd 100644 --- a/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/ip_details/elasticsearch_adapter.ts @@ -17,7 +17,7 @@ import { import { inspectStringifyObject } from '../../utils/build_query'; import { DatabaseSearchResponse, FrameworkAdapter, FrameworkRequest } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { IpOverviewRequestOptions, UsersRequestOptions } from './index'; import { buildOverviewQuery } from './query_overview.dsl'; import { buildUsersQuery } from './query_users.dsl'; diff --git a/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts index c61a23d7451d..39babc58ee13 100644 --- a/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/network/elasticsearch_adapter.ts @@ -22,7 +22,7 @@ import { import { inspectStringifyObject } from '../../utils/build_query'; import { DatabaseSearchResponse, FrameworkAdapter, FrameworkRequest } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { NetworkDnsRequestOptions, diff --git a/x-pack/plugins/siem/server/lib/note/saved_object.ts b/x-pack/plugins/siem/server/lib/note/saved_object.ts index 8103de90dd87..2b94fd451678 100644 --- a/x-pack/plugins/siem/server/lib/note/saved_object.ts +++ b/x-pack/plugins/siem/server/lib/note/saved_object.ts @@ -14,7 +14,7 @@ import { identity } from 'fp-ts/lib/function'; import { SavedObjectsFindOptions } from '../../../../../../src/core/server'; import { AuthenticatedUser } from '../../../../security/common/model'; -import { UNAUTHENTICATED_USER } from 'siem/common/constants'; +import { UNAUTHENTICATED_USER } from '../../../common/constants'; import { PageInfoNote, ResponseNote, diff --git a/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts b/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts index 676c97950b51..7fc23d86d821 100644 --- a/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts +++ b/x-pack/plugins/siem/server/lib/pinned_event/saved_object.ts @@ -12,7 +12,7 @@ import { identity } from 'fp-ts/lib/function'; import { SavedObjectsFindOptions } from '../../../../../../src/core/server'; import { AuthenticatedUser } from '../../../../security/common/model'; -import { UNAUTHENTICATED_USER } from 'siem/common/constants'; +import { UNAUTHENTICATED_USER } from '../../../common/constants'; import { FrameworkRequest } from '../framework'; import { PinnedEventSavedObject, diff --git a/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts b/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts index 94e04d45f4b8..19adb7ac1045 100644 --- a/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts +++ b/x-pack/plugins/siem/server/lib/timeline/pick_saved_timeline.ts @@ -5,7 +5,7 @@ */ import { AuthenticatedUser } from '../../../../security/common/model'; -import { UNAUTHENTICATED_USER } from 'siem/common/constants'; +import { UNAUTHENTICATED_USER } from '../../../common/constants'; import { SavedTimeline } from './types'; export const pickSavedTimeline = ( diff --git a/x-pack/plugins/siem/server/lib/timeline/saved_object.ts b/x-pack/plugins/siem/server/lib/timeline/saved_object.ts index 931ef0dab9fb..e8cd27947589 100644 --- a/x-pack/plugins/siem/server/lib/timeline/saved_object.ts +++ b/x-pack/plugins/siem/server/lib/timeline/saved_object.ts @@ -7,7 +7,7 @@ import { getOr } from 'lodash/fp'; import { SavedObjectsFindOptions } from '../../../../../../src/core/server'; -import { UNAUTHENTICATED_USER } from 'siem/common/constants'; +import { UNAUTHENTICATED_USER } from '../../../common/constants'; import { ResponseTimeline, PageInfoTimeline, diff --git a/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts index b830d7bfbd47..10929c3d0364 100644 --- a/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/tls/elasticsearch_adapter.ts @@ -10,7 +10,7 @@ import { TlsData, TlsEdges } from '../../graphql/types'; import { inspectStringifyObject } from '../../utils/build_query'; import { DatabaseSearchResponse, FrameworkAdapter, FrameworkRequest } from '../framework'; import { TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { TlsRequestOptions } from './index'; import { TlsAdapter, TlsBuckets } from './types'; diff --git a/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts b/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts index f16eb61f5309..111df08b89e2 100644 --- a/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts +++ b/x-pack/plugins/siem/server/lib/uncommon_processes/elasticsearch_adapter.ts @@ -11,7 +11,7 @@ import { mergeFieldsWithHit, inspectStringifyObject } from '../../utils/build_qu import { processFieldsMap, userFieldsMap } from '../ecs_fields'; import { FrameworkAdapter, FrameworkRequest, RequestOptionsPaginated } from '../framework'; import { HostHits, TermAggregation } from '../types'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from 'siem/common/constants'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import { buildQuery } from './query.dsl'; import { UncommonProcessBucket, diff --git a/x-pack/plugins/siem/server/utils/build_query/filters.ts b/x-pack/plugins/siem/server/utils/build_query/filters.ts index 5a7b1a259cad..95c9a975454f 100644 --- a/x-pack/plugins/siem/server/utils/build_query/filters.ts +++ b/x-pack/plugins/siem/server/utils/build_query/filters.ts @@ -6,7 +6,7 @@ import { isEmpty } from 'lodash/fp'; -import { ESQuery } from 'siem/common/typed_json'; +import { ESQuery } from '../../../common/typed_json'; export const createQueryFilterClauses = (filterQuery: ESQuery | undefined) => !isEmpty(filterQuery) ? [filterQuery] : []; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts index 6ee65d5d28aa..e787a3594dfe 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_prepackaged_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, deleteAllAlerts, deleteSignalsIndex } from './utils'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts index 91088acb7a51..46645a9b5a94 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts index 8e951a31b525..117300be417d 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts index a886a5fb07a6..fb701681419d 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts index 9e9071b82884..ac58ba4c77e4 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts index a8f841db94bb..51bdb9e45dc0 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/export_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { binaryToString, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts index abbc8f77e007..feb4ecd125f7 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts index 45805f03f8c0..07f3a34d6ff4 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/find_statuses.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts index 49cf150126fd..e2dce77c1d70 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/get_prepackaged_rules_status.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { DETECTION_ENGINE_PREPACKAGED_URL, DETECTION_ENGINE_RULES_URL, -} from '../../../../legacy/plugins/siem/common/constants'; +} from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, deleteAllAlerts, deleteSignalsIndex, getSimpleRule } from './utils'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts index ae4589e32ec1..4def508fabbc 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/import_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts index e9e3e4299d10..3c8c20646885 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/open_close_signals.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts index 53a3d15690ef..c3ecf79e5895 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts index c13e8909dacf..8515d1cf404e 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/patch_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts index 6fa62412ed46..7c8bd8981db1 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/query_signals.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { getSignalStatus, createSignalsIndex, deleteSignalsIndex } from './utils'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts index 2ea62b0756f7..4d7449dae2db 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts index 92c78be72bf0..4b81b7d4304b 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts index 220a4af4c5c5..760e17ae1752 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/update_rules_bulk.ts @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; -import { DETECTION_ENGINE_RULES_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../plugins/siem/common/constants'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createSignalsIndex, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts index bc2d7a2ce466..cebe24dc5ccc 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts @@ -5,7 +5,7 @@ */ import { OutputRuleAlertRest } from '../../../../plugins/siem/server/lib/detection_engine/types'; -import { DETECTION_ENGINE_INDEX_URL } from '../../../../legacy/plugins/siem/common/constants'; +import { DETECTION_ENGINE_INDEX_URL } from '../../../../plugins/siem/common/constants'; /** * This will remove server generated properties such as date times, etc... From 4caf083658aeee200e08c0f012e56fa896796300 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sat, 11 Apr 2020 16:19:54 -0500 Subject: [PATCH 03/20] Move cypress folder into NP --- x-pack/{legacy => }/plugins/siem/cypress/.eslintrc.json | 0 x-pack/{legacy => }/plugins/siem/cypress/.gitignore | 0 x-pack/{legacy => }/plugins/siem/cypress/README.md | 0 x-pack/{legacy => }/plugins/siem/cypress/fixtures/overview.json | 0 .../plugins/siem/cypress/integration/detections.spec.ts | 0 .../plugins/siem/cypress/integration/detections_timeline.spec.ts | 0 .../plugins/siem/cypress/integration/events_viewer.spec.ts | 0 .../plugins/siem/cypress/integration/fields_browser.spec.ts | 0 .../{legacy => }/plugins/siem/cypress/integration/inspect.spec.ts | 0 .../plugins/siem/cypress/integration/ml_conditional_links.spec.ts | 0 .../plugins/siem/cypress/integration/navigation.spec.ts | 0 .../plugins/siem/cypress/integration/overview.spec.ts | 0 .../plugins/siem/cypress/integration/pagination.spec.ts | 0 .../siem/cypress/integration/signal_detection_rules.spec.ts | 0 .../cypress/integration/signal_detection_rules_custom.spec.ts | 0 .../siem/cypress/integration/signal_detection_rules_ml.spec.ts | 0 .../cypress/integration/signal_detection_rules_prebuilt.spec.ts | 0 .../siem/cypress/integration/timeline_data_providers.spec.ts | 0 .../siem/cypress/integration/timeline_flyout_button.spec.ts | 0 .../siem/cypress/integration/timeline_search_or_filter.spec.ts | 0 .../siem/cypress/integration/timeline_toggle_column.spec.ts | 0 .../plugins/siem/cypress/integration/url_state.spec.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/objects/rule.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/objects/timeline.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/plugins/index.js | 0 .../{legacy => }/plugins/siem/cypress/screens/create_new_rule.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/date_picker.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/detections.ts | 0 .../{legacy => }/plugins/siem/cypress/screens/fields_browser.ts | 0 .../{legacy => }/plugins/siem/cypress/screens/hosts/all_hosts.ts | 0 .../plugins/siem/cypress/screens/hosts/authentications.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/events.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/main.ts | 0 .../plugins/siem/cypress/screens/hosts/uncommon_processes.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/inspect.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/network/flows.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/overview.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/pagination.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/rule_details.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/siem_header.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/siem_main.ts | 0 .../plugins/siem/cypress/screens/signal_detection_rules.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/screens/timeline.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/support/commands.js | 0 x-pack/{legacy => }/plugins/siem/cypress/support/index.d.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/support/index.js | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/common.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/create_new_rule.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/date_picker.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/detections.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/es_archiver.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/fields_browser.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/all_hosts.ts | 0 .../plugins/siem/cypress/tasks/hosts/authentications.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/events.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/main.ts | 0 .../plugins/siem/cypress/tasks/hosts/uncommon_processes.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/inspect.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/login.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/network/flows.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/overview.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/pagination.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/siem_header.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/siem_main.ts | 0 .../plugins/siem/cypress/tasks/signal_detection_rules.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tasks/timeline.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/tsconfig.json | 0 .../plugins/siem/cypress/urls/ml_conditional_links.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/urls/navigation.ts | 0 x-pack/{legacy => }/plugins/siem/cypress/urls/state.ts | 0 70 files changed, 0 insertions(+), 0 deletions(-) rename x-pack/{legacy => }/plugins/siem/cypress/.eslintrc.json (100%) rename x-pack/{legacy => }/plugins/siem/cypress/.gitignore (100%) rename x-pack/{legacy => }/plugins/siem/cypress/README.md (100%) rename x-pack/{legacy => }/plugins/siem/cypress/fixtures/overview.json (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/detections.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/detections_timeline.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/events_viewer.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/fields_browser.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/inspect.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/ml_conditional_links.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/navigation.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/overview.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/pagination.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/signal_detection_rules.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/timeline_data_providers.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/integration/url_state.spec.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/objects/rule.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/objects/timeline.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/plugins/index.js (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/create_new_rule.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/date_picker.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/detections.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/fields_browser.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/all_hosts.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/authentications.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/events.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/main.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/hosts/uncommon_processes.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/inspect.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/network/flows.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/overview.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/pagination.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/rule_details.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/siem_header.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/siem_main.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/signal_detection_rules.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/screens/timeline.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/support/commands.js (100%) rename x-pack/{legacy => }/plugins/siem/cypress/support/index.d.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/support/index.js (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/common.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/create_new_rule.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/date_picker.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/detections.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/es_archiver.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/fields_browser.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/all_hosts.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/authentications.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/events.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/main.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/inspect.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/login.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/network/flows.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/overview.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/pagination.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/siem_header.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/siem_main.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/signal_detection_rules.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tasks/timeline.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/tsconfig.json (100%) rename x-pack/{legacy => }/plugins/siem/cypress/urls/ml_conditional_links.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/urls/navigation.ts (100%) rename x-pack/{legacy => }/plugins/siem/cypress/urls/state.ts (100%) diff --git a/x-pack/legacy/plugins/siem/cypress/.eslintrc.json b/x-pack/plugins/siem/cypress/.eslintrc.json similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/.eslintrc.json rename to x-pack/plugins/siem/cypress/.eslintrc.json diff --git a/x-pack/legacy/plugins/siem/cypress/.gitignore b/x-pack/plugins/siem/cypress/.gitignore similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/.gitignore rename to x-pack/plugins/siem/cypress/.gitignore diff --git a/x-pack/legacy/plugins/siem/cypress/README.md b/x-pack/plugins/siem/cypress/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/README.md rename to x-pack/plugins/siem/cypress/README.md diff --git a/x-pack/legacy/plugins/siem/cypress/fixtures/overview.json b/x-pack/plugins/siem/cypress/fixtures/overview.json similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/fixtures/overview.json rename to x-pack/plugins/siem/cypress/fixtures/overview.json diff --git a/x-pack/legacy/plugins/siem/cypress/integration/detections.spec.ts b/x-pack/plugins/siem/cypress/integration/detections.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/detections.spec.ts rename to x-pack/plugins/siem/cypress/integration/detections.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/detections_timeline.spec.ts b/x-pack/plugins/siem/cypress/integration/detections_timeline.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/detections_timeline.spec.ts rename to x-pack/plugins/siem/cypress/integration/detections_timeline.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/events_viewer.spec.ts b/x-pack/plugins/siem/cypress/integration/events_viewer.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/events_viewer.spec.ts rename to x-pack/plugins/siem/cypress/integration/events_viewer.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/fields_browser.spec.ts b/x-pack/plugins/siem/cypress/integration/fields_browser.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/fields_browser.spec.ts rename to x-pack/plugins/siem/cypress/integration/fields_browser.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/inspect.spec.ts b/x-pack/plugins/siem/cypress/integration/inspect.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/inspect.spec.ts rename to x-pack/plugins/siem/cypress/integration/inspect.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/ml_conditional_links.spec.ts b/x-pack/plugins/siem/cypress/integration/ml_conditional_links.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/ml_conditional_links.spec.ts rename to x-pack/plugins/siem/cypress/integration/ml_conditional_links.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/navigation.spec.ts b/x-pack/plugins/siem/cypress/integration/navigation.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/navigation.spec.ts rename to x-pack/plugins/siem/cypress/integration/navigation.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/overview.spec.ts b/x-pack/plugins/siem/cypress/integration/overview.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/overview.spec.ts rename to x-pack/plugins/siem/cypress/integration/overview.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/pagination.spec.ts b/x-pack/plugins/siem/cypress/integration/pagination.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/pagination.spec.ts rename to x-pack/plugins/siem/cypress/integration/pagination.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules.spec.ts b/x-pack/plugins/siem/cypress/integration/signal_detection_rules.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules.spec.ts rename to x-pack/plugins/siem/cypress/integration/signal_detection_rules.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts b/x-pack/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts rename to x-pack/plugins/siem/cypress/integration/signal_detection_rules_custom.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts b/x-pack/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts rename to x-pack/plugins/siem/cypress/integration/signal_detection_rules_ml.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts b/x-pack/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts rename to x-pack/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/timeline_data_providers.spec.ts b/x-pack/plugins/siem/cypress/integration/timeline_data_providers.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/timeline_data_providers.spec.ts rename to x-pack/plugins/siem/cypress/integration/timeline_data_providers.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts b/x-pack/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts rename to x-pack/plugins/siem/cypress/integration/timeline_flyout_button.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts b/x-pack/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts rename to x-pack/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts b/x-pack/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts rename to x-pack/plugins/siem/cypress/integration/timeline_toggle_column.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts b/x-pack/plugins/siem/cypress/integration/url_state.spec.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts rename to x-pack/plugins/siem/cypress/integration/url_state.spec.ts diff --git a/x-pack/legacy/plugins/siem/cypress/objects/rule.ts b/x-pack/plugins/siem/cypress/objects/rule.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/objects/rule.ts rename to x-pack/plugins/siem/cypress/objects/rule.ts diff --git a/x-pack/legacy/plugins/siem/cypress/objects/timeline.ts b/x-pack/plugins/siem/cypress/objects/timeline.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/objects/timeline.ts rename to x-pack/plugins/siem/cypress/objects/timeline.ts diff --git a/x-pack/legacy/plugins/siem/cypress/plugins/index.js b/x-pack/plugins/siem/cypress/plugins/index.js similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/plugins/index.js rename to x-pack/plugins/siem/cypress/plugins/index.js diff --git a/x-pack/legacy/plugins/siem/cypress/screens/create_new_rule.ts b/x-pack/plugins/siem/cypress/screens/create_new_rule.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/create_new_rule.ts rename to x-pack/plugins/siem/cypress/screens/create_new_rule.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/date_picker.ts b/x-pack/plugins/siem/cypress/screens/date_picker.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/date_picker.ts rename to x-pack/plugins/siem/cypress/screens/date_picker.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/detections.ts b/x-pack/plugins/siem/cypress/screens/detections.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/detections.ts rename to x-pack/plugins/siem/cypress/screens/detections.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/fields_browser.ts b/x-pack/plugins/siem/cypress/screens/fields_browser.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/fields_browser.ts rename to x-pack/plugins/siem/cypress/screens/fields_browser.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/hosts/all_hosts.ts b/x-pack/plugins/siem/cypress/screens/hosts/all_hosts.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/hosts/all_hosts.ts rename to x-pack/plugins/siem/cypress/screens/hosts/all_hosts.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/hosts/authentications.ts b/x-pack/plugins/siem/cypress/screens/hosts/authentications.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/hosts/authentications.ts rename to x-pack/plugins/siem/cypress/screens/hosts/authentications.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/hosts/events.ts b/x-pack/plugins/siem/cypress/screens/hosts/events.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/hosts/events.ts rename to x-pack/plugins/siem/cypress/screens/hosts/events.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/hosts/main.ts b/x-pack/plugins/siem/cypress/screens/hosts/main.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/hosts/main.ts rename to x-pack/plugins/siem/cypress/screens/hosts/main.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/hosts/uncommon_processes.ts b/x-pack/plugins/siem/cypress/screens/hosts/uncommon_processes.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/hosts/uncommon_processes.ts rename to x-pack/plugins/siem/cypress/screens/hosts/uncommon_processes.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/inspect.ts b/x-pack/plugins/siem/cypress/screens/inspect.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/inspect.ts rename to x-pack/plugins/siem/cypress/screens/inspect.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/network/flows.ts b/x-pack/plugins/siem/cypress/screens/network/flows.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/network/flows.ts rename to x-pack/plugins/siem/cypress/screens/network/flows.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/overview.ts b/x-pack/plugins/siem/cypress/screens/overview.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/overview.ts rename to x-pack/plugins/siem/cypress/screens/overview.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/pagination.ts b/x-pack/plugins/siem/cypress/screens/pagination.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/pagination.ts rename to x-pack/plugins/siem/cypress/screens/pagination.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/rule_details.ts b/x-pack/plugins/siem/cypress/screens/rule_details.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/rule_details.ts rename to x-pack/plugins/siem/cypress/screens/rule_details.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/siem_header.ts b/x-pack/plugins/siem/cypress/screens/siem_header.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/siem_header.ts rename to x-pack/plugins/siem/cypress/screens/siem_header.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/siem_main.ts b/x-pack/plugins/siem/cypress/screens/siem_main.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/siem_main.ts rename to x-pack/plugins/siem/cypress/screens/siem_main.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/signal_detection_rules.ts b/x-pack/plugins/siem/cypress/screens/signal_detection_rules.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/signal_detection_rules.ts rename to x-pack/plugins/siem/cypress/screens/signal_detection_rules.ts diff --git a/x-pack/legacy/plugins/siem/cypress/screens/timeline.ts b/x-pack/plugins/siem/cypress/screens/timeline.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/screens/timeline.ts rename to x-pack/plugins/siem/cypress/screens/timeline.ts diff --git a/x-pack/legacy/plugins/siem/cypress/support/commands.js b/x-pack/plugins/siem/cypress/support/commands.js similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/support/commands.js rename to x-pack/plugins/siem/cypress/support/commands.js diff --git a/x-pack/legacy/plugins/siem/cypress/support/index.d.ts b/x-pack/plugins/siem/cypress/support/index.d.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/support/index.d.ts rename to x-pack/plugins/siem/cypress/support/index.d.ts diff --git a/x-pack/legacy/plugins/siem/cypress/support/index.js b/x-pack/plugins/siem/cypress/support/index.js similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/support/index.js rename to x-pack/plugins/siem/cypress/support/index.js diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/common.ts b/x-pack/plugins/siem/cypress/tasks/common.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/common.ts rename to x-pack/plugins/siem/cypress/tasks/common.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/create_new_rule.ts b/x-pack/plugins/siem/cypress/tasks/create_new_rule.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/create_new_rule.ts rename to x-pack/plugins/siem/cypress/tasks/create_new_rule.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/date_picker.ts b/x-pack/plugins/siem/cypress/tasks/date_picker.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/date_picker.ts rename to x-pack/plugins/siem/cypress/tasks/date_picker.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/detections.ts b/x-pack/plugins/siem/cypress/tasks/detections.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/detections.ts rename to x-pack/plugins/siem/cypress/tasks/detections.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/es_archiver.ts b/x-pack/plugins/siem/cypress/tasks/es_archiver.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/es_archiver.ts rename to x-pack/plugins/siem/cypress/tasks/es_archiver.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/fields_browser.ts b/x-pack/plugins/siem/cypress/tasks/fields_browser.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/fields_browser.ts rename to x-pack/plugins/siem/cypress/tasks/fields_browser.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/hosts/all_hosts.ts b/x-pack/plugins/siem/cypress/tasks/hosts/all_hosts.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/hosts/all_hosts.ts rename to x-pack/plugins/siem/cypress/tasks/hosts/all_hosts.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/hosts/authentications.ts b/x-pack/plugins/siem/cypress/tasks/hosts/authentications.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/hosts/authentications.ts rename to x-pack/plugins/siem/cypress/tasks/hosts/authentications.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/hosts/events.ts b/x-pack/plugins/siem/cypress/tasks/hosts/events.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/hosts/events.ts rename to x-pack/plugins/siem/cypress/tasks/hosts/events.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/hosts/main.ts b/x-pack/plugins/siem/cypress/tasks/hosts/main.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/hosts/main.ts rename to x-pack/plugins/siem/cypress/tasks/hosts/main.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts b/x-pack/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts rename to x-pack/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/inspect.ts b/x-pack/plugins/siem/cypress/tasks/inspect.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/inspect.ts rename to x-pack/plugins/siem/cypress/tasks/inspect.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/login.ts b/x-pack/plugins/siem/cypress/tasks/login.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/login.ts rename to x-pack/plugins/siem/cypress/tasks/login.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/network/flows.ts b/x-pack/plugins/siem/cypress/tasks/network/flows.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/network/flows.ts rename to x-pack/plugins/siem/cypress/tasks/network/flows.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/overview.ts b/x-pack/plugins/siem/cypress/tasks/overview.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/overview.ts rename to x-pack/plugins/siem/cypress/tasks/overview.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/pagination.ts b/x-pack/plugins/siem/cypress/tasks/pagination.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/pagination.ts rename to x-pack/plugins/siem/cypress/tasks/pagination.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/siem_header.ts b/x-pack/plugins/siem/cypress/tasks/siem_header.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/siem_header.ts rename to x-pack/plugins/siem/cypress/tasks/siem_header.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/siem_main.ts b/x-pack/plugins/siem/cypress/tasks/siem_main.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/siem_main.ts rename to x-pack/plugins/siem/cypress/tasks/siem_main.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/signal_detection_rules.ts b/x-pack/plugins/siem/cypress/tasks/signal_detection_rules.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/signal_detection_rules.ts rename to x-pack/plugins/siem/cypress/tasks/signal_detection_rules.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/timeline.ts b/x-pack/plugins/siem/cypress/tasks/timeline.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tasks/timeline.ts rename to x-pack/plugins/siem/cypress/tasks/timeline.ts diff --git a/x-pack/legacy/plugins/siem/cypress/tsconfig.json b/x-pack/plugins/siem/cypress/tsconfig.json similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/tsconfig.json rename to x-pack/plugins/siem/cypress/tsconfig.json diff --git a/x-pack/legacy/plugins/siem/cypress/urls/ml_conditional_links.ts b/x-pack/plugins/siem/cypress/urls/ml_conditional_links.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/urls/ml_conditional_links.ts rename to x-pack/plugins/siem/cypress/urls/ml_conditional_links.ts diff --git a/x-pack/legacy/plugins/siem/cypress/urls/navigation.ts b/x-pack/plugins/siem/cypress/urls/navigation.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/urls/navigation.ts rename to x-pack/plugins/siem/cypress/urls/navigation.ts diff --git a/x-pack/legacy/plugins/siem/cypress/urls/state.ts b/x-pack/plugins/siem/cypress/urls/state.ts similarity index 100% rename from x-pack/legacy/plugins/siem/cypress/urls/state.ts rename to x-pack/plugins/siem/cypress/urls/state.ts From e3440eae2eec331ad2e815f3e49209e402195c33 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sat, 11 Apr 2020 16:24:48 -0500 Subject: [PATCH 04/20] Move scripts folder into NP --- .../{legacy => }/plugins/siem/scripts/check_circular_deps.js | 4 ++-- .../check_circular_deps}/run_check_circular_deps_cli.js | 0 x-pack/{legacy => }/plugins/siem/scripts/combined_schema.ts | 2 +- .../plugins/siem/scripts/convert_saved_search_to_rules.js | 2 +- .../plugins/siem/scripts/extract_tactics_techniques_mitre.js | 2 +- .../plugins/siem/scripts/generate_types_from_graphql.js | 2 +- .../{legacy => }/plugins/siem/scripts/loop_cypress_tests.js | 0 x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig.js | 0 .../plugins/siem/scripts/optimize_tsconfig/README.md | 0 .../plugins/siem/scripts/optimize_tsconfig/optimize.js | 0 .../plugins/siem/scripts/optimize_tsconfig/paths.js | 0 .../plugins/siem/scripts/optimize_tsconfig/tsconfig.json | 0 .../plugins/siem/scripts/optimize_tsconfig/unoptimize.js | 0 x-pack/{legacy => }/plugins/siem/scripts/storybook.js | 0 .../{legacy => }/plugins/siem/scripts/unoptimize_tsconfig.js | 0 15 files changed, 6 insertions(+), 6 deletions(-) rename x-pack/{legacy => }/plugins/siem/scripts/check_circular_deps.js (68%) rename x-pack/{legacy/plugins/siem/dev_tools/circular_deps => plugins/siem/scripts/check_circular_deps}/run_check_circular_deps_cli.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/combined_schema.ts (87%) rename x-pack/{legacy => }/plugins/siem/scripts/convert_saved_search_to_rules.js (99%) rename x-pack/{legacy => }/plugins/siem/scripts/extract_tactics_techniques_mitre.js (98%) rename x-pack/{legacy => }/plugins/siem/scripts/generate_types_from_graphql.js (99%) rename x-pack/{legacy => }/plugins/siem/scripts/loop_cypress_tests.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig/README.md (100%) rename x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig/optimize.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig/paths.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig/tsconfig.json (100%) rename x-pack/{legacy => }/plugins/siem/scripts/optimize_tsconfig/unoptimize.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/storybook.js (100%) rename x-pack/{legacy => }/plugins/siem/scripts/unoptimize_tsconfig.js (100%) diff --git a/x-pack/legacy/plugins/siem/scripts/check_circular_deps.js b/x-pack/plugins/siem/scripts/check_circular_deps.js similarity index 68% rename from x-pack/legacy/plugins/siem/scripts/check_circular_deps.js rename to x-pack/plugins/siem/scripts/check_circular_deps.js index 046cc010621d..4ba7020d1346 100644 --- a/x-pack/legacy/plugins/siem/scripts/check_circular_deps.js +++ b/x-pack/plugins/siem/scripts/check_circular_deps.js @@ -4,5 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -require('../../../../../src/setup_node_env'); -require('../dev_tools/circular_deps/run_check_circular_deps_cli'); +require('../../../../src/setup_node_env'); +require('./check_circular_deps/run_check_circular_deps_cli'); diff --git a/x-pack/legacy/plugins/siem/dev_tools/circular_deps/run_check_circular_deps_cli.js b/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js similarity index 100% rename from x-pack/legacy/plugins/siem/dev_tools/circular_deps/run_check_circular_deps_cli.js rename to x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js diff --git a/x-pack/legacy/plugins/siem/scripts/combined_schema.ts b/x-pack/plugins/siem/scripts/combined_schema.ts similarity index 87% rename from x-pack/legacy/plugins/siem/scripts/combined_schema.ts rename to x-pack/plugins/siem/scripts/combined_schema.ts index 3132c272110c..625eb3a4a475 100644 --- a/x-pack/legacy/plugins/siem/scripts/combined_schema.ts +++ b/x-pack/plugins/siem/scripts/combined_schema.ts @@ -6,7 +6,7 @@ import { buildSchemaFromTypeDefinitions } from 'graphql-tools'; -import { schemas as serverSchemas } from '../../../../plugins/siem/server/graphql'; +import { schemas as serverSchemas } from '../server/graphql'; export const schemas = [...serverSchemas]; diff --git a/x-pack/legacy/plugins/siem/scripts/convert_saved_search_to_rules.js b/x-pack/plugins/siem/scripts/convert_saved_search_to_rules.js similarity index 99% rename from x-pack/legacy/plugins/siem/scripts/convert_saved_search_to_rules.js rename to x-pack/plugins/siem/scripts/convert_saved_search_to_rules.js index 233d4dd7de72..65da56dd09bc 100644 --- a/x-pack/legacy/plugins/siem/scripts/convert_saved_search_to_rules.js +++ b/x-pack/plugins/siem/scripts/convert_saved_search_to_rules.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -require('../../../../../src/setup_node_env'); +require('../../../../src/setup_node_env'); const fs = require('fs'); const path = require('path'); diff --git a/x-pack/legacy/plugins/siem/scripts/extract_tactics_techniques_mitre.js b/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js similarity index 98% rename from x-pack/legacy/plugins/siem/scripts/extract_tactics_techniques_mitre.js rename to x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js index 6cb2a4004963..d4edee2cdfe4 100644 --- a/x-pack/legacy/plugins/siem/scripts/extract_tactics_techniques_mitre.js +++ b/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -require('../../../../../src/setup_node_env'); +require('../../../../src/setup_node_env'); const fs = require('fs'); // eslint-disable-next-line import/no-extraneous-dependencies diff --git a/x-pack/legacy/plugins/siem/scripts/generate_types_from_graphql.js b/x-pack/plugins/siem/scripts/generate_types_from_graphql.js similarity index 99% rename from x-pack/legacy/plugins/siem/scripts/generate_types_from_graphql.js rename to x-pack/plugins/siem/scripts/generate_types_from_graphql.js index 36674fec73e0..e6b063dfd2c0 100644 --- a/x-pack/legacy/plugins/siem/scripts/generate_types_from_graphql.js +++ b/x-pack/plugins/siem/scripts/generate_types_from_graphql.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -require('../../../../../src/setup_node_env'); +require('../../../../src/setup_node_env'); const { join, resolve } = require('path'); // eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved diff --git a/x-pack/legacy/plugins/siem/scripts/loop_cypress_tests.js b/x-pack/plugins/siem/scripts/loop_cypress_tests.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/loop_cypress_tests.js rename to x-pack/plugins/siem/scripts/loop_cypress_tests.js diff --git a/x-pack/legacy/plugins/siem/scripts/optimize_tsconfig.js b/x-pack/plugins/siem/scripts/optimize_tsconfig.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/optimize_tsconfig.js rename to x-pack/plugins/siem/scripts/optimize_tsconfig.js diff --git a/x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/README.md b/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/README.md rename to x-pack/plugins/siem/scripts/optimize_tsconfig/README.md diff --git a/x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/optimize.js b/x-pack/plugins/siem/scripts/optimize_tsconfig/optimize.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/optimize.js rename to x-pack/plugins/siem/scripts/optimize_tsconfig/optimize.js diff --git a/x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/paths.js b/x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/paths.js rename to x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js diff --git a/x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/tsconfig.json b/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/tsconfig.json rename to x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json diff --git a/x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/unoptimize.js b/x-pack/plugins/siem/scripts/optimize_tsconfig/unoptimize.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/optimize_tsconfig/unoptimize.js rename to x-pack/plugins/siem/scripts/optimize_tsconfig/unoptimize.js diff --git a/x-pack/legacy/plugins/siem/scripts/storybook.js b/x-pack/plugins/siem/scripts/storybook.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/storybook.js rename to x-pack/plugins/siem/scripts/storybook.js diff --git a/x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig.js b/x-pack/plugins/siem/scripts/unoptimize_tsconfig.js similarity index 100% rename from x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig.js rename to x-pack/plugins/siem/scripts/unoptimize_tsconfig.js From 07bea5ba8d4dea153be6849c9be9a4215b6e0ec0 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sun, 12 Apr 2020 19:24:12 -0500 Subject: [PATCH 05/20] Fix typescript errors related to module resolution These are mostly updating imports to the common/ folder on the UI side (since things changed relative to those files). --- .../siem/public/components/alerts_viewer/index.tsx | 2 +- .../siem/public/components/charts/common.tsx | 2 +- .../siem/public/components/draggables/index.tsx | 1 - .../public/components/embeddables/embedded_map.tsx | 2 +- .../siem/public/components/events_viewer/index.tsx | 3 +-- .../public/components/formatted_bytes/index.tsx | 2 +- .../plugins/siem/public/components/links/index.tsx | 4 ++-- .../public/components/matrix_histogram/types.ts | 2 +- .../ml/anomaly/use_anomalies_table_data.ts | 3 ++- .../ml/score/create_description_list.tsx | 3 ++- .../components/ml_popover/hooks/use_siem_jobs.tsx | 2 +- .../ml_popover/jobs_table/job_switch.tsx | 4 ++-- .../components/navigation/breadcrumbs/index.ts | 2 +- .../public/components/news_feed/helpers.test.ts | 2 +- .../components/page/hosts/host_overview/index.tsx | 4 ++-- .../components/page/network/ip_overview/index.tsx | 4 ++-- .../page/overview/overview_host/index.tsx | 4 ++-- .../page/overview/overview_network/index.tsx | 4 ++-- .../public/components/page/overview/stat_value.tsx | 2 +- .../components/paginated_table/index.test.tsx | 2 +- .../public/components/paginated_table/index.tsx | 2 +- .../public/components/query_bar/index.test.tsx | 2 +- .../components/super_date_picker/index.test.tsx | 2 +- .../public/components/super_date_picker/index.tsx | 2 +- .../components/timeline/query_bar/index.test.tsx | 2 +- .../anomalies/anomalies_query_tab_body/index.tsx | 3 ++- .../anomalies/anomalies_query_tab_body/types.ts | 2 +- .../anomalies/anomalies_query_tab_body/utils.ts | 3 ++- .../public/containers/authentications/index.tsx | 2 +- .../containers/detection_engine/rules/api.ts | 14 +++++++------- .../containers/detection_engine/rules/types.ts | 2 +- .../containers/detection_engine/signals/api.ts | 4 ++-- .../containers/events/last_event_time/index.ts | 2 +- .../containers/hosts/first_last_seen/index.ts | 2 +- .../plugins/siem/public/containers/hosts/index.tsx | 2 +- .../public/containers/hosts/overview/index.tsx | 2 +- .../siem/public/containers/ip_overview/index.tsx | 2 +- .../public/containers/kpi_host_details/index.tsx | 2 +- .../siem/public/containers/kpi_hosts/index.tsx | 2 +- .../siem/public/containers/kpi_network/index.tsx | 2 +- .../public/containers/matrix_histogram/index.ts | 2 +- .../siem/public/containers/network_dns/index.tsx | 2 +- .../siem/public/containers/network_http/index.tsx | 2 +- .../containers/network_top_countries/index.tsx | 2 +- .../public/containers/network_top_n_flow/index.tsx | 2 +- .../containers/overview/overview_host/index.tsx | 2 +- .../containers/overview/overview_network/index.tsx | 2 +- .../siem/public/containers/source/index.tsx | 2 +- .../siem/public/containers/timeline/all/api.ts | 5 ++++- .../public/containers/timeline/details/index.tsx | 2 +- .../siem/public/containers/timeline/index.tsx | 2 +- .../plugins/siem/public/containers/tls/index.tsx | 2 +- .../public/containers/uncommon_processes/index.tsx | 2 +- .../plugins/siem/public/containers/users/index.tsx | 2 +- .../legacy/plugins/siem/public/lib/kibana/hooks.ts | 5 ++++- .../siem/public/lib/theme/use_eui_theme.tsx | 2 +- .../signals/signals_utility_bar/index.tsx | 3 ++- .../components/signals_histogram_panel/index.tsx | 2 +- .../pages/detection_engine/rules/all/columns.tsx | 2 +- .../rules/components/description_step/helpers.tsx | 2 +- .../rules/components/description_step/index.tsx | 2 +- .../description_step/ml_job_description.tsx | 2 +- .../rules/components/ml_job_select/index.tsx | 2 +- .../rules/components/rule_actions_field/index.tsx | 2 +- .../rules/components/step_define_rule/index.tsx | 4 ++-- .../rules/components/step_define_rule/schema.tsx | 2 +- .../components/throttle_select_field/index.tsx | 2 +- .../pages/detection_engine/rules/create/helpers.ts | 8 ++++---- .../pages/detection_engine/rules/helpers.tsx | 9 ++++++--- .../public/pages/detection_engine/rules/types.ts | 5 ++++- .../siem/public/pages/hosts/navigation/types.ts | 2 +- .../siem/public/pages/network/ip_details/types.ts | 2 +- .../siem/public/pages/network/navigation/types.ts | 2 +- .../pages/overview/alerts_by_category/index.tsx | 4 ++-- .../pages/overview/events_by_dataset/index.tsx | 4 ++-- .../siem/public/pages/overview/sidebar/sidebar.tsx | 5 ++++- .../plugins/siem/public/store/inputs/model.ts | 1 - .../public/utils/default_date_settings.test.ts | 2 +- .../common/detection_engine/transform_actions.ts | 2 +- .../plugins/siem/common/detection_engine/types.ts | 2 +- .../notifications/add_tags.test.ts | 2 +- .../lib/detection_engine/notifications/add_tags.ts | 2 +- .../notifications/create_notifications.ts | 4 ++-- .../notifications/find_notifications.test.ts | 2 +- .../notifications/find_notifications.ts | 2 +- .../notifications/read_notifications.ts | 2 +- .../notifications/rules_notification_alert_type.ts | 2 +- .../lib/detection_engine/notifications/types.ts | 4 ++-- .../notifications/update_notifications.ts | 2 +- .../routes/__mocks__/request_responses.ts | 2 +- .../routes/index/create_index_route.ts | 2 +- .../routes/index/delete_index_route.ts | 2 +- .../routes/index/read_index_route.ts | 2 +- .../routes/privileges/read_privileges_route.ts | 2 +- .../routes/rules/add_prepackaged_rules_route.ts | 2 +- .../routes/rules/create_rules_bulk_route.test.ts | 2 +- .../routes/rules/create_rules_bulk_route.ts | 2 +- .../routes/rules/create_rules_route.test.ts | 2 +- .../routes/rules/create_rules_route.ts | 2 +- .../routes/rules/delete_rules_bulk_route.test.ts | 2 +- .../routes/rules/delete_rules_bulk_route.ts | 2 +- .../routes/rules/delete_rules_route.test.ts | 2 +- .../routes/rules/delete_rules_route.ts | 2 +- .../routes/rules/export_rules_route.ts | 2 +- .../routes/rules/find_rules_route.test.ts | 2 +- .../routes/rules/find_rules_route.ts | 2 +- .../routes/rules/find_rules_status_route.test.ts | 2 +- .../routes/rules/find_rules_status_route.ts | 2 +- .../rules/get_prepackaged_rules_status_route.ts | 2 +- .../routes/rules/import_rules_route.test.ts | 2 +- .../routes/rules/import_rules_route.ts | 2 +- .../routes/rules/patch_rules_bulk_route.test.ts | 2 +- .../routes/rules/patch_rules_bulk_route.ts | 2 +- .../routes/rules/patch_rules_route.test.ts | 2 +- .../routes/rules/patch_rules_route.ts | 2 +- .../routes/rules/read_rules_route.test.ts | 2 +- .../routes/rules/read_rules_route.ts | 2 +- .../routes/rules/update_rules_bulk_route.test.ts | 2 +- .../routes/rules/update_rules_bulk_route.ts | 2 +- .../routes/rules/update_rules_route.test.ts | 2 +- .../routes/rules/update_rules_route.ts | 2 +- .../detection_engine/routes/rules/utils.test.ts | 2 +- .../lib/detection_engine/routes/rules/utils.ts | 2 +- .../schemas/add_prepackaged_rules_schema.test.ts | 2 +- .../routes/schemas/add_prepackaged_rules_schema.ts | 2 +- .../routes/schemas/create_rules_schema.test.ts | 2 +- .../routes/schemas/create_rules_schema.ts | 2 +- .../routes/schemas/import_rules_schema.test.ts | 2 +- .../routes/schemas/import_rules_schema.ts | 2 +- .../routes/schemas/patch_rules_schema.test.ts | 2 +- .../schemas/response/check_type_dependents.ts | 2 +- .../routes/schemas/update_rules_schema.test.ts | 2 +- .../routes/schemas/update_rules_schema.ts | 2 +- .../routes/signals/open_close_signals.test.ts | 2 +- .../routes/signals/open_close_signals_route.ts | 2 +- .../routes/signals/query_signals_route.test.ts | 2 +- .../routes/signals/query_signals_route.ts | 2 +- .../routes/tags/read_tags_route.ts | 2 +- .../server/lib/detection_engine/routes/utils.ts | 6 +++--- .../create_rule_actions_saved_object.ts | 2 +- .../rule_actions/get_rule_actions_saved_object.ts | 2 +- .../lib/detection_engine/rule_actions/types.ts | 2 +- .../update_or_create_rule_actions_saved_object.ts | 2 +- .../update_rule_actions_saved_object.ts | 2 +- .../lib/detection_engine/rule_actions/utils.ts | 2 +- .../lib/detection_engine/rules/add_tags.test.ts | 2 +- .../server/lib/detection_engine/rules/add_tags.ts | 2 +- .../lib/detection_engine/rules/create_rules.ts | 4 ++-- .../lib/detection_engine/rules/find_rules.test.ts | 2 +- .../lib/detection_engine/rules/find_rules.ts | 2 +- .../rules/get_existing_prepackaged_rules.ts | 2 +- .../lib/detection_engine/rules/read_rules.ts | 2 +- .../server/lib/detection_engine/rules/types.ts | 2 +- .../lib/detection_engine/rules/update_rules.ts | 2 +- .../rules/update_rules_notifications.ts | 2 +- .../detection_engine/signals/build_bulk_body.ts | 2 +- .../lib/detection_engine/signals/build_rule.ts | 2 +- .../detection_engine/signals/build_signal.test.ts | 2 +- .../lib/detection_engine/signals/build_signal.ts | 2 +- .../signals/bulk_create_ml_signals.ts | 2 +- .../signals/get_input_output_index.test.ts | 6 +++--- .../signals/get_input_output_index.ts | 4 ++-- .../signals/search_after_bulk_create.test.ts | 2 +- .../signals/search_after_bulk_create.ts | 2 +- .../signals/signal_params_schema.ts | 2 +- .../signals/signal_rule_alert_type.ts | 4 ++-- .../signals/single_bulk_create.test.ts | 2 +- .../detection_engine/signals/single_bulk_create.ts | 2 +- .../server/lib/detection_engine/signals/types.ts | 8 ++------ .../lib/detection_engine/tags/read_tags.test.ts | 2 +- .../server/lib/detection_engine/tags/read_tags.ts | 2 +- x-pack/plugins/siem/server/lib/events/mock.ts | 2 +- x-pack/plugins/siem/server/lib/hosts/mock.ts | 2 +- x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts | 2 +- x-pack/plugins/siem/server/lib/kpi_network/mock.ts | 2 +- .../siem/server/lib/matrix_histogram/mock.ts | 2 +- x-pack/plugins/siem/server/lib/network/mock.ts | 2 +- x-pack/plugins/siem/server/lib/overview/mock.ts | 4 ++-- .../siem/server/lib/sources/configuration.test.ts | 2 +- .../timeline/routes/__mocks__/request_responses.ts | 2 +- .../timeline/routes/export_timelines_route.test.ts | 2 +- .../lib/timeline/routes/export_timelines_route.ts | 3 ++- .../timeline/routes/import_timelines_route.test.ts | 4 ++-- .../lib/timeline/routes/import_timelines_route.ts | 2 +- x-pack/plugins/siem/server/lib/tls/types.ts | 2 +- x-pack/plugins/siem/server/lib/types.ts | 2 +- .../utils/build_query/create_options.test.ts | 2 +- .../read_stream/create_stream_from_ndjson.test.ts | 4 ++-- .../utils/read_stream/create_stream_from_ndjson.ts | 6 +++--- 189 files changed, 244 insertions(+), 230 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx index 587002c24d52..778adc708d90 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/index.tsx @@ -6,11 +6,11 @@ import React, { useEffect, useCallback, useMemo } from 'react'; import numeral from '@elastic/numeral'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../plugins/siem/common/constants'; import { AlertsComponentsQueryProps } from './types'; import { AlertsTable } from './alerts_table'; import * as i18n from './translations'; import { useUiSetting$ } from '../../lib/kibana'; -import { DEFAULT_NUMBER_FORMAT } from '../../../common/constants'; import { MatrixHistogramContainer } from '../matrix_histogram'; import { histogramConfigs } from './histogram_configs'; import { MatrixHisrogramConfigs } from '../matrix_histogram/types'; diff --git a/x-pack/legacy/plugins/siem/public/components/charts/common.tsx b/x-pack/legacy/plugins/siem/public/components/charts/common.tsx index d8429cba1b4f..c7b40c50ffde 100644 --- a/x-pack/legacy/plugins/siem/public/components/charts/common.tsx +++ b/x-pack/legacy/plugins/siem/public/components/charts/common.tsx @@ -19,8 +19,8 @@ import { import React, { useMemo } from 'react'; import styled from 'styled-components'; +import { DEFAULT_DARK_MODE } from '../../../../../../plugins/siem/common/constants'; import { useUiSetting } from '../../lib/kibana'; -import { DEFAULT_DARK_MODE } from '../../../common/constants'; export const defaultChartHeight = '100%'; export const defaultChartWidth = '100%'; diff --git a/x-pack/legacy/plugins/siem/public/components/draggables/index.tsx b/x-pack/legacy/plugins/siem/public/components/draggables/index.tsx index 1fe6c936d282..7c0e3788c526 100644 --- a/x-pack/legacy/plugins/siem/public/components/draggables/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/draggables/index.tsx @@ -8,7 +8,6 @@ import { EuiBadge, EuiToolTip, IconType } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { Omit } from '../../../common/utility_types'; import { DragEffects, DraggableWrapper } from '../drag_and_drop/draggable_wrapper'; import { escapeDataProviderId } from '../drag_and_drop/helpers'; import { getEmptyStringTag } from '../empty_value'; diff --git a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx index cbb4006bbf93..a7272593c2b2 100644 --- a/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx +++ b/x-pack/legacy/plugins/siem/public/components/embeddables/embedded_map.tsx @@ -14,7 +14,7 @@ import { EmbeddablePanel, ErrorEmbeddable, } from '../../../../../../../src/plugins/embeddable/public'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { getIndexPatternTitleIdMapping } from '../../hooks/api/helpers'; import { useIndexPatterns } from '../../hooks/use_index_patterns'; import { Loader } from '../loader'; diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx b/x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx index 9b31be40dd95..c6d9dbc2fcfc 100644 --- a/x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/events_viewer/index.tsx @@ -8,6 +8,7 @@ import React, { useCallback, useMemo, useEffect } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import deepEqual from 'fast-deep-equal'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { inputsModel, inputsSelectors, State, timelineSelectors } from '../../store'; import { inputsActions, timelineActions } from '../../store/actions'; import { @@ -17,12 +18,10 @@ import { } from '../../store/timeline/model'; import { OnChangeItemsPerPage } from '../timeline/events'; import { Filter } from '../../../../../../../src/plugins/data/public'; - import { useUiSetting } from '../../lib/kibana'; import { EventsViewer } from './events_viewer'; import { useFetchIndexPatterns } from '../../containers/detection_engine/rules/fetch_index_patterns'; import { TimelineTypeContextProps } from '../timeline/timeline_context'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { InspectButtonContainer } from '../inspect'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx b/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx index 98a1acf47162..abde602c1bda 100644 --- a/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/formatted_bytes/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import numeral from '@elastic/numeral'; -import { DEFAULT_BYTES_FORMAT } from '../../../common/constants'; +import { DEFAULT_BYTES_FORMAT } from '../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../../lib/kibana'; type Bytes = string | number; diff --git a/x-pack/legacy/plugins/siem/public/components/links/index.tsx b/x-pack/legacy/plugins/siem/public/components/links/index.tsx index 62a67af6e08b..45225e31e9ac 100644 --- a/x-pack/legacy/plugins/siem/public/components/links/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/links/index.tsx @@ -6,9 +6,10 @@ import { EuiLink, EuiToolTip, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { useMemo } from 'react'; - import { isNil } from 'lodash/fp'; import styled from 'styled-components'; + +import { IP_REPUTATION_LINKS_SETTING } from '../../../../../../plugins/siem/common/constants'; import { DefaultFieldRendererOverflow, DEFAULT_MORE_MAX_HEIGHT, @@ -22,7 +23,6 @@ import { } from '../link_to'; import { FlowTarget, FlowTargetSourceDest } from '../../graphql/types'; import { useUiSetting$ } from '../../lib/kibana'; -import { IP_REPUTATION_LINKS_SETTING } from '../../../common/constants'; import { isUrlInvalid } from '../../pages/detection_engine/rules/components/step_about_rule/helpers'; import { ExternalLinkIcon } from '../external_link_icon'; import { navTabs } from '../../pages/home/home_navigations'; diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts b/x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts index a435c7be6c89..4c29af65fd2c 100644 --- a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts +++ b/x-pack/legacy/plugins/siem/public/components/matrix_histogram/types.ts @@ -6,7 +6,7 @@ import { ScaleType, Position, TickFormatter } from '@elastic/charts'; import { ActionCreator } from 'redux'; -import { ESQuery } from '../../../common/typed_json'; +import { ESQuery } from '../../../../../../plugins/siem/common/typed_json'; import { SetQuery } from '../../pages/hosts/navigation/types'; import { InputsModelId } from '../../store/inputs/constants'; import { HistogramType } from '../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts b/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts index c4ca7dc20361..cebfc172ee6f 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts +++ b/x-pack/legacy/plugins/siem/public/components/ml/anomaly/use_anomalies_table_data.ts @@ -5,6 +5,8 @@ */ import { useState, useEffect } from 'react'; + +import { DEFAULT_ANOMALY_SCORE } from '../../../../../../../plugins/siem/common/constants'; import { anomaliesTableData } from '../api/anomalies_table_data'; import { InfluencerInput, Anomalies, CriteriaFields } from '../types'; import { hasMlUserPermissions } from '../permissions/has_ml_user_permissions'; @@ -14,7 +16,6 @@ import { useStateToaster, errorToToaster } from '../../toasters'; import * as i18n from './translations'; import { useTimeZone, useUiSetting$ } from '../../../lib/kibana'; -import { DEFAULT_ANOMALY_SCORE } from '../../../../common/constants'; interface Args { influencers?: InfluencerInput[]; diff --git a/x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx b/x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx index e0f3ea162ee7..24f203a3682d 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx +++ b/x-pack/legacy/plugins/siem/public/components/ml/score/create_description_list.tsx @@ -7,11 +7,12 @@ import { EuiText, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; + +import { DescriptionList } from '../../../../../../../plugins/siem/common/utility_types'; import { Anomaly, NarrowDateRange } from '../types'; import { getScoreString } from './score_health'; import { PreferenceFormattedDate } from '../../formatted_date'; import { createInfluencers } from './../influencers/create_influencers'; -import { DescriptionList } from '../../../../common/utility_types'; import * as i18n from './translations'; import { createExplorerLink } from '../links/create_explorer_link'; diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx b/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx index 9a82859066f5..bc488ee00988 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx +++ b/x-pack/legacy/plugins/siem/public/components/ml_popover/hooks/use_siem_jobs.tsx @@ -6,12 +6,12 @@ import { useEffect, useState } from 'react'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { checkRecognizer, getJobsSummary, getModules } from '../api'; import { SiemJob } from '../types'; import { hasMlUserPermissions } from '../../ml/permissions/has_ml_user_permissions'; import { errorToToaster, useStateToaster } from '../../toasters'; import { useUiSetting$ } from '../../../lib/kibana'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import * as i18n from './translations'; import { createSiemJobs } from './use_siem_jobs_helpers'; diff --git a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx b/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx index a0e0c70d2f20..a0343608dc67 100644 --- a/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx +++ b/x-pack/legacy/plugins/siem/public/components/ml_popover/jobs_table/job_switch.tsx @@ -7,12 +7,12 @@ import styled from 'styled-components'; import React, { useState, useCallback } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSwitch } from '@elastic/eui'; -import { SiemJob } from '../types'; import { isJobLoading, isJobFailed, isJobStarted, -} from '../../../../common/detection_engine/ml_helpers'; +} from '../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { SiemJob } from '../types'; const StaticSwitch = styled(EuiSwitch)` .euiSwitch__thumb, diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts b/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts index 155f63145ca9..5407eba8b5b2 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts +++ b/x-pack/legacy/plugins/siem/public/components/navigation/breadcrumbs/index.ts @@ -7,7 +7,7 @@ import { getOr, omit } from 'lodash/fp'; import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; -import { APP_NAME } from '../../../../common/constants'; +import { APP_NAME } from '../../../../../../../plugins/siem/common/constants'; import { StartServices } from '../../../plugin'; import { getBreadcrumbs as getHostDetailsBreadcrumbs } from '../../../pages/hosts/details/utils'; import { getBreadcrumbs as getIPDetailsBreadcrumbs } from '../../../pages/network/ip_details'; diff --git a/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts b/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts index e7cd03d098da..686ec4e86e78 100644 --- a/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts +++ b/x-pack/legacy/plugins/siem/public/components/news_feed/helpers.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { NEWS_FEED_URL_SETTING_DEFAULT } from '../../../../../../plugins/siem/common/constants'; import { KibanaServices } from '../../lib/kibana'; -import { NEWS_FEED_URL_SETTING_DEFAULT } from '../../../common/constants'; import { rawNewsApiResponse } from '../../mock/news'; import { rawNewsJSON } from '../../mock/raw_news'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx index 4d0e6a737d30..a0ca5f855237 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/page/hosts/host_overview/index.tsx @@ -10,8 +10,8 @@ import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; import { getOr } from 'lodash/fp'; import React from 'react'; -import { DEFAULT_DARK_MODE } from '../../../../../common/constants'; -import { DescriptionList } from '../../../../../common/utility_types'; +import { DEFAULT_DARK_MODE } from '../../../../../../../../plugins/siem/common/constants'; +import { DescriptionList } from '../../../../../../../../plugins/siem/common/utility_types'; import { useUiSetting$ } from '../../../../lib/kibana'; import { getEmptyTagValue } from '../../../empty_value'; import { DefaultFieldRenderer, hostIdRenderer } from '../../../field_renderers/field_renderers'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx index 56b59ca97156..a652fef5508f 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/page/network/ip_overview/index.tsx @@ -9,8 +9,8 @@ import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; import React from 'react'; -import { DEFAULT_DARK_MODE } from '../../../../../common/constants'; -import { DescriptionList } from '../../../../../common/utility_types'; +import { DEFAULT_DARK_MODE } from '../../../../../../../../plugins/siem/common/constants'; +import { DescriptionList } from '../../../../../../../../plugins/siem/common/utility_types'; import { useUiSetting$ } from '../../../../lib/kibana'; import { FlowTarget, IpOverviewData, Overview } from '../../../../graphql/types'; import { networkModel } from '../../../../store'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx index 52c142ceff48..b43efbbde51b 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host/index.tsx @@ -10,8 +10,8 @@ import numeral from '@elastic/numeral'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useMemo } from 'react'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; -import { ESQuery } from '../../../../../common/typed_json'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../plugins/siem/common/constants'; +import { ESQuery } from '../../../../../../../../plugins/siem/common/typed_json'; import { ID as OverviewHostQueryId, OverviewHostQuery, diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx index d649a0dd9e92..af50fa88e5fe 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_network/index.tsx @@ -10,8 +10,8 @@ import numeral from '@elastic/numeral'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useMemo } from 'react'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; -import { ESQuery } from '../../../../../common/typed_json'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../plugins/siem/common/constants'; +import { ESQuery } from '../../../../../../../../plugins/siem/common/typed_json'; import { HeaderSection } from '../../../header_section'; import { useUiSetting$ } from '../../../../lib/kibana'; import { manageQuery } from '../../../page/manage_query'; diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx b/x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx index 7615001eec9d..cada0a9aff93 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx +++ b/x-pack/legacy/plugins/siem/public/components/page/overview/stat_value.tsx @@ -9,7 +9,7 @@ import numeral from '@elastic/numeral'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../../../lib/kibana'; const ProgressContainer = styled.div` diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx index 947bdee6a5cd..2f743c338720 100644 --- a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/paginated_table/index.test.tsx @@ -7,13 +7,13 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../plugins/siem/common/constants'; import { Direction } from '../../graphql/types'; import { BasicTableProps, PaginatedTable } from './index'; import { getHostsColumns, mockData, rowItems, sortedHosts } from './index.mock'; import { ThemeProvider } from 'styled-components'; import euiDarkVars from '@elastic/eui/dist/eui_theme_dark.json'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; jest.mock('react', () => { const r = jest.requireActual('react'); diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx b/x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx index 5cd200cbb41b..76f08982e71f 100644 --- a/x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/paginated_table/index.tsx @@ -21,6 +21,7 @@ import { noop } from 'lodash/fp'; import React, { FC, memo, useState, useEffect, ComponentType } from 'react'; import styled from 'styled-components'; +import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../plugins/siem/common/constants'; import { AuthTableColumns } from '../page/hosts/authentications_table'; import { HostsTableColumns } from '../page/hosts/hosts_table'; import { NetworkDnsColumns } from '../page/network/network_dns_table/columns'; @@ -39,7 +40,6 @@ import { UsersColumns } from '../page/network/users_table/columns'; import { HeaderSection } from '../header_section'; import { Loader } from '../loader'; import { useStateToaster } from '../toasters'; -import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../common/constants'; import * as i18n from './translations'; import { Panel } from '../panel'; diff --git a/x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx index 870d0b40d8cd..49afc8d5ef68 100644 --- a/x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/query_bar/index.test.tsx @@ -7,9 +7,9 @@ import { mount } from 'enzyme'; import React from 'react'; +import { DEFAULT_FROM, DEFAULT_TO } from '../../../../../../plugins/siem/common/constants'; import { TestProviders, mockIndexPattern } from '../../mock'; import { createKibanaCoreStartMock } from '../../mock/kibana_core'; -import { DEFAULT_FROM, DEFAULT_TO } from '../../../common/constants'; import { FilterManager, SearchBar } from '../../../../../../../src/plugins/data/public'; import { QueryBar, QueryBarComponentProps } from '.'; import { createKibanaContextProviderMock } from '../../mock/kibana_react'; diff --git a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx index c5838fa283e1..d64ddb9bb40b 100644 --- a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.test.tsx @@ -8,6 +8,7 @@ import { mount } from 'enzyme'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; +import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../../lib/kibana'; import { apolloClientObservable, mockGlobalState } from '../../mock'; import { createUseUiSetting$Mock } from '../../mock/kibana_react'; @@ -15,7 +16,6 @@ import { createStore, State } from '../../store'; import { SuperDatePicker, makeMapStateToProps } from '.'; import { cloneDeep } from 'lodash/fp'; -import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../common/constants'; jest.mock('../../lib/kibana'); const mockUseUiSetting$ = useUiSetting$ as jest.Mock; diff --git a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx b/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx index ad38a7d61bcb..cf350b3993a4 100644 --- a/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/super_date_picker/index.tsx @@ -17,7 +17,7 @@ import React, { useState, useCallback } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { Dispatch } from 'redux'; -import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../common/constants'; +import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../../lib/kibana'; import { inputsModel, State } from '../../store'; import { inputsActions, timelineActions } from '../../store/actions'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx index b978ef3d478d..61f7b979445d 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/query_bar/index.test.tsx @@ -7,7 +7,7 @@ import { mount } from 'enzyme'; import React from 'react'; -import { DEFAULT_FROM, DEFAULT_TO } from '../../../../common/constants'; +import { DEFAULT_FROM, DEFAULT_TO } from '../../../../../../../plugins/siem/common/constants'; import { mockBrowserFields } from '../../../containers/source/mock'; import { convertKueryToElasticSearchQuery } from '../../../lib/keury'; import { mockIndexPattern, TestProviders } from '../../../mock'; diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx b/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx index 85e19248f2eb..83c38f2a7617 100644 --- a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/index.tsx @@ -5,11 +5,12 @@ */ import React, { useEffect } from 'react'; + +import { DEFAULT_ANOMALY_SCORE } from '../../../../../../../plugins/siem/common/constants'; import { AnomaliesQueryTabBodyProps } from './types'; import { getAnomaliesFilterQuery } from './utils'; import { useSiemJobs } from '../../../components/ml_popover/hooks/use_siem_jobs'; import { useUiSetting$ } from '../../../lib/kibana'; -import { DEFAULT_ANOMALY_SCORE } from '../../../../common/constants'; import { MatrixHistogramContainer } from '../../../components/matrix_histogram'; import { histogramConfigs } from './histogram_configs'; const ID = 'anomaliesOverTimeQuery'; diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts b/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts index f6cae81e3c6c..d17eadc68d04 100644 --- a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts +++ b/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ESTermQuery } from '../../../../common/typed_json'; +import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; import { NarrowDateRange } from '../../../components/ml/types'; import { UpdateDateRange } from '../../../components/charts/common'; import { SetQuery } from '../../../pages/hosts/navigation/types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts b/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts index 9609619916ab..f698e302d342 100644 --- a/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts +++ b/x-pack/legacy/plugins/siem/public/containers/anomalies/anomalies_query_tab_body/utils.ts @@ -5,8 +5,9 @@ */ import deepmerge from 'deepmerge'; + +import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; import { createFilter } from '../../helpers'; -import { ESTermQuery } from '../../../../common/typed_json'; import { SiemJob } from '../../../components/ml_popover/types'; import { FlowTarget } from '../../../graphql/types'; diff --git a/x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx b/x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx index 6d4a88c45a76..13bb40dad04b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/authentications/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { AuthenticationsEdges, GetAuthenticationsQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts index 5cc73e17662c..69f4c93a82e2 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts @@ -4,6 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ +import { + DETECTION_ENGINE_RULES_URL, + DETECTION_ENGINE_PREPACKAGED_URL, + DETECTION_ENGINE_RULES_STATUS_URL, + DETECTION_ENGINE_PREPACKAGED_RULES_STATUS_URL, + DETECTION_ENGINE_TAGS_URL, +} from '../../../../../../../plugins/siem/common/constants'; import { AddRulesProps, DeleteRulesProps, @@ -23,13 +30,6 @@ import { BulkRuleResponse, } from './types'; import { KibanaServices } from '../../../lib/kibana'; -import { - DETECTION_ENGINE_RULES_URL, - DETECTION_ENGINE_PREPACKAGED_URL, - DETECTION_ENGINE_RULES_STATUS_URL, - DETECTION_ENGINE_PREPACKAGED_RULES_STATUS_URL, - DETECTION_ENGINE_TAGS_URL, -} from '../../../../common/constants'; import * as i18n from '../../../pages/detection_engine/rules/translations'; /** diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts index f89d21ef1aeb..2f2de2e15166 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts @@ -6,7 +6,7 @@ import * as t from 'io-ts'; -import { RuleTypeSchema } from '../../../../common/detection_engine/types'; +import { RuleTypeSchema } from '../../../../../../../plugins/siem/common/detection_engine/types'; /** * Params is an "record", since it is a type of AlertActionParams which is action templates. diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts index 25263c2d3273..ece2483adde3 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/api.ts @@ -4,13 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { KibanaServices } from '../../../lib/kibana'; import { DETECTION_ENGINE_QUERY_SIGNALS_URL, DETECTION_ENGINE_SIGNALS_STATUS_URL, DETECTION_ENGINE_INDEX_URL, DETECTION_ENGINE_PRIVILEGES_URL, -} from '../../../../common/constants'; +} from '../../../../../../../plugins/siem/common/constants'; +import { KibanaServices } from '../../../lib/kibana'; import { BasicSignals, Privilege, diff --git a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts b/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts index 9cae503d3094..8628ba502f08 100644 --- a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts +++ b/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/index.ts @@ -7,7 +7,7 @@ import { get } from 'lodash/fp'; import React, { useEffect, useState } from 'react'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { GetLastEventTimeQuery, LastEventIndexKey, LastTimeDetails } from '../../../graphql/types'; import { inputsModel } from '../../../store'; import { QueryTemplateProps } from '../../query_template'; diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts b/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts index e36da5bfbe4e..5806125f2397 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts +++ b/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/index.ts @@ -8,8 +8,8 @@ import ApolloClient from 'apollo-client'; import { get } from 'lodash/fp'; import React, { useEffect, useState } from 'react'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../../../lib/kibana'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; import { GetHostFirstLastSeenQuery } from '../../../graphql/types'; import { inputsModel } from '../../../store'; import { QueryTemplateProps } from '../../query_template'; diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx b/x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx index 733c2224d840..edf3f6855f95 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/hosts/index.tsx @@ -11,7 +11,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { Direction, GetHostsTableQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx b/x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx index 5057e872b531..405c45348b54 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/hosts/overview/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { inputsModel, inputsSelectors, State } from '../../../store'; import { getDefaultFetchPolicy } from '../../helpers'; import { QueryTemplate, QueryTemplateProps } from '../../query_template'; diff --git a/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx b/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx index ade94c430c6e..954bfede0713 100644 --- a/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/ip_overview/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetIpOverviewQuery, IpOverviewData } from '../../graphql/types'; import { networkModel, inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx b/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx index de9d54b1a185..3933aefa6048 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/kpi_host_details/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { KpiHostDetailsData, GetKpiHostDetailsQuery } from '../../graphql/types'; import { inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx b/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx index 5be2423e8a16..7035d6319311 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/kpi_hosts/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetKpiHostsQuery, KpiHostsData } from '../../graphql/types'; import { inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx b/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx index 338cdc39b178..002a819417df 100644 --- a/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/kpi_network/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetKpiNetworkQuery, KpiNetworkData } from '../../graphql/types'; import { inputsModel, inputsSelectors, State } from '../../store'; import { useUiSetting } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts b/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts index 0b369b4180fb..bea48d53fa95 100644 --- a/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts +++ b/x-pack/legacy/plugins/siem/public/containers/matrix_histogram/index.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ import { useEffect, useState, useRef } from 'react'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { MatrixHistogramQueryProps } from '../../components/matrix_histogram/types'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { errorToToaster, useStateToaster } from '../../components/toasters'; import { useUiSetting$ } from '../../lib/kibana'; import { createFilter } from '../helpers'; diff --git a/x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx b/x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx index 04c8783c30a0..060b66fc3cbb 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/network_dns/index.tsx @@ -12,7 +12,7 @@ import { compose } from 'redux'; import { DocumentNode } from 'graphql'; import { ScaleType } from '@elastic/charts'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetNetworkDnsQuery, NetworkDnsEdges, diff --git a/x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx b/x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx index bf4e64f63d55..b13637fa88d0 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/network_http/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetNetworkHttpQuery, NetworkHttpEdges, diff --git a/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx b/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx index bd1e1a002bbc..17a14ce3a112 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/network_top_countries/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { FlowTargetSourceDest, GetNetworkTopCountriesQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx b/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx index f0f1f8257f29..fdac282292a4 100644 --- a/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/network_top_n_flow/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { FlowTargetSourceDest, GetNetworkTopNFlowQuery, diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx b/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx index 2dd9ccf24d80..e7b68bf557a2 100644 --- a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { GetOverviewHostQuery, OverviewHostData } from '../../../graphql/types'; import { useUiSetting } from '../../../lib/kibana'; import { inputsModel, inputsSelectors } from '../../../store/inputs'; diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx b/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx index d0acd41c224a..c7f72ac6193f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/overview/overview_network/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { GetOverviewNetworkQuery, OverviewNetworkData } from '../../../graphql/types'; import { useUiSetting } from '../../../lib/kibana'; import { State } from '../../../store'; diff --git a/x-pack/legacy/plugins/siem/public/containers/source/index.tsx b/x-pack/legacy/plugins/siem/public/containers/source/index.tsx index e454421ca955..3467e2b5f18d 100644 --- a/x-pack/legacy/plugins/siem/public/containers/source/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/source/index.tsx @@ -11,9 +11,9 @@ import React, { useEffect, useMemo, useState } from 'react'; import memoizeOne from 'memoize-one'; import { IIndexPattern } from 'src/plugins/data/public'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../../lib/kibana'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { IndexField, SourceQuery } from '../../graphql/types'; import { sourceQuery } from './index.gql_query'; diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts b/x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts index 4c8e2384de58..32ac62d594e1 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts +++ b/x-pack/legacy/plugins/siem/public/containers/timeline/all/api.ts @@ -4,9 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ +import { + TIMELINE_IMPORT_URL, + TIMELINE_EXPORT_URL, +} from '../../../../../../../plugins/siem/common/constants'; import { ImportDataProps, ImportDataResponse } from '../../detection_engine/rules'; import { KibanaServices } from '../../../lib/kibana'; -import { TIMELINE_IMPORT_URL, TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { ExportSelectedData } from '../../../components/generic_downloader'; export const importTimelines = async ({ diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx b/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx index cf1b8954307e..0debed9c5f9a 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/timeline/details/index.tsx @@ -9,7 +9,7 @@ import memoizeOne from 'memoize-one'; import React from 'react'; import { Query } from 'react-apollo'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../plugins/siem/common/constants'; import { DetailItem, GetTimelineDetailsQuery } from '../../../graphql/types'; import { useUiSetting } from '../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx b/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx index f726ec9779dc..3c089ef6926d 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx @@ -11,8 +11,8 @@ import { Query } from 'react-apollo'; import { compose, Dispatch } from 'redux'; import { connect, ConnectedProps } from 'react-redux'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { IIndexPattern } from '../../../../../../../src/plugins/data/common/index_patterns'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetTimelineQuery, PageInfo, diff --git a/x-pack/legacy/plugins/siem/public/containers/tls/index.tsx b/x-pack/legacy/plugins/siem/public/containers/tls/index.tsx index 3738355c8846..20617b88bda9 100644 --- a/x-pack/legacy/plugins/siem/public/containers/tls/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/tls/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { PageInfoPaginated, TlsEdges, diff --git a/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx b/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx index 0a2ce67d9be8..72e4e46bc6ae 100644 --- a/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/uncommon_processes/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetUncommonProcessesQuery, PageInfoPaginated, diff --git a/x-pack/legacy/plugins/siem/public/containers/users/index.tsx b/x-pack/legacy/plugins/siem/public/containers/users/index.tsx index 5f71449c5246..658cb5785b54 100644 --- a/x-pack/legacy/plugins/siem/public/containers/users/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/users/index.tsx @@ -10,7 +10,7 @@ import { Query } from 'react-apollo'; import { connect, ConnectedProps } from 'react-redux'; import { compose } from 'redux'; -import { DEFAULT_INDEX_KEY } from '../../../common/constants'; +import { DEFAULT_INDEX_KEY } from '../../../../../../plugins/siem/common/constants'; import { GetUsersQuery, FlowTarget, PageInfoPaginated, UsersEdges } from '../../graphql/types'; import { inputsModel, networkModel, networkSelectors, State, inputsSelectors } from '../../store'; import { withKibana, WithKibanaProps } from '../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts b/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts index 775a7d7c0acc..e1d0a445bf2f 100644 --- a/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts +++ b/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts @@ -8,7 +8,10 @@ import moment from 'moment-timezone'; import { useCallback, useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { DEFAULT_DATE_FORMAT, DEFAULT_DATE_FORMAT_TZ } from '../../../common/constants'; +import { + DEFAULT_DATE_FORMAT, + DEFAULT_DATE_FORMAT_TZ, +} from '../../../../../../plugins/siem/common/constants'; import { useUiSetting, useKibana } from './kibana_react'; import { errorToToaster, useStateToaster } from '../../components/toasters'; import { AuthenticatedUser } from '../../../../../../plugins/security/common/model'; diff --git a/x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx b/x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx index 1696001203bc..b72c34d3b59a 100644 --- a/x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx +++ b/x-pack/legacy/plugins/siem/public/lib/theme/use_eui_theme.tsx @@ -7,7 +7,7 @@ import darkTheme from '@elastic/eui/dist/eui_theme_dark.json'; import lightTheme from '@elastic/eui/dist/eui_theme_light.json'; -import { DEFAULT_DARK_MODE } from '../../../common/constants'; +import { DEFAULT_DARK_MODE } from '../../../../../../plugins/siem/common/constants'; import { useUiSetting$ } from '../kibana'; export const useEuiTheme = () => { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx index 2000a699ab18..847fcc786008 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/signals_utility_bar/index.tsx @@ -7,6 +7,8 @@ import { isEmpty } from 'lodash/fp'; import React, { useCallback } from 'react'; import numeral from '@elastic/numeral'; + +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../../plugins/siem/common/constants'; import { UtilityBar, UtilityBarAction, @@ -16,7 +18,6 @@ import { } from '../../../../../components/utility_bar'; import * as i18n from './translations'; import { useUiSetting$ } from '../../../../../lib/kibana'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../../common/constants'; import { TimelineNonEcsData } from '../../../../../graphql/types'; import { UpdateSignalsStatus } from '../types'; import { FILTER_CLOSED, FILTER_OPEN } from '../signals_filter_group'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx index e25442b31da4..e5a54e989aab 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/index.tsx @@ -10,10 +10,10 @@ import React, { memo, useCallback, useMemo, useState, useEffect } from 'react'; import styled from 'styled-components'; import { isEmpty } from 'lodash/fp'; +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../../plugins/siem/common/constants'; import { HeaderSection } from '../../../../components/header_section'; import { Filter, esQuery, Query } from '../../../../../../../../../src/plugins/data/public'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; import { useQuerySignals } from '../../../../containers/detection_engine/signals/use_query'; import { getDetectionEngineUrl } from '../../../../components/link_to'; import { InspectButtonContainer } from '../../../../components/inspect'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx index 80e644f80033..8bea504f8420 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx @@ -19,6 +19,7 @@ import { FormattedRelative } from '@kbn/i18n/react'; import * as H from 'history'; import React, { Dispatch } from 'react'; +import { isMlRule } from '../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; import { Rule, RuleStatus } from '../../../../containers/detection_engine/rules'; import { getEmptyTagValue } from '../../../../components/empty_value'; import { FormattedDate } from '../../../../components/formatted_date'; @@ -38,7 +39,6 @@ import { import { Action } from './reducer'; import { LocalizedDateTooltip } from '../../../../components/localized_date_tooltip'; import * as detectionI18n from '../../translations'; -import { isMlRule } from '../../../../../common/detection_engine/ml_helpers'; export const getActions = ( dispatch: React.Dispatch, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx index 79da7999b081..5b7a85e23834 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx @@ -19,9 +19,9 @@ import { isEmpty } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; +import { RuleType } from '../../../../../../../../../plugins/siem/common/detection_engine/types'; import { esFilters } from '../../../../../../../../../../src/plugins/data/public'; -import { RuleType } from '../../../../../../common/detection_engine/types'; import { tacticsOptions, techniquesOptions } from '../../../mitre/mitre_tactics_techniques'; import * as i18n from './translations'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx index 05e47225c8f4..49977713a585 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx @@ -9,13 +9,13 @@ import { isEmpty, chunk, get, pick, isNumber } from 'lodash/fp'; import React, { memo, useState } from 'react'; import styled from 'styled-components'; +import { RuleType } from '../../../../../../../../../plugins/siem/common/detection_engine/types'; import { IIndexPattern, Filter, esFilters, FilterManager, } from '../../../../../../../../../../src/plugins/data/public'; -import { RuleType } from '../../../../../../common/detection_engine/types'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/translations'; import { useKibana } from '../../../../../lib/kibana'; import { IMitreEnterpriseAttack } from '../../types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx index 1664ea320bc1..5e8681a90d42 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/ml_job_description.tsx @@ -8,11 +8,11 @@ import React from 'react'; import styled from 'styled-components'; import { EuiBadge, EuiIcon, EuiLink, EuiToolTip } from '@elastic/eui'; +import { isJobStarted } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; import { useKibana } from '../../../../../lib/kibana'; import { SiemJob } from '../../../../../components/ml_popover/types'; import { ListItems } from './types'; import { ML_JOB_STARTED, ML_JOB_STOPPED } from './translations'; -import { isJobStarted } from '../../../../../../common/detection_engine/ml_helpers'; enum MessageLevels { info = 'info', diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx index 794edf0ab5de..82350150488d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/ml_job_select/index.tsx @@ -17,6 +17,7 @@ import { } from '@elastic/eui'; import styled from 'styled-components'; +import { isJobStarted } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../../shared_imports'; import { useSiemJobs } from '../../../../../components/ml_popover/hooks/use_siem_jobs'; import { useKibana } from '../../../../../lib/kibana'; @@ -24,7 +25,6 @@ import { ML_JOB_SELECT_PLACEHOLDER_TEXT, ENABLE_ML_JOB_WARNING, } from '../step_define_rule/translations'; -import { isJobStarted } from '../../../../../../common/detection_engine/ml_helpers'; const HelpTextWarningContainer = styled.div` margin-top: 10px; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx index a746d381c494..b4d813c48b43 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_actions_field/index.tsx @@ -7,6 +7,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import deepMerge from 'deepmerge'; +import { NOTIFICATION_SUPPORTED_ACTION_TYPES_IDS } from '../../../../../../../../../plugins/siem/common/constants'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { loadActionTypes } from '../../../../../../../../../plugins/triggers_actions_ui/public/application/lib/action_connector_api'; import { SelectField } from '../../../../../shared_imports'; @@ -16,7 +17,6 @@ import { } from '../../../../../../../../../plugins/triggers_actions_ui/public'; import { AlertAction } from '../../../../../../../../../plugins/alerting/common'; import { useKibana } from '../../../../../lib/kibana'; -import { NOTIFICATION_SUPPORTED_ACTION_TYPES_IDS } from '../../../../../../common/constants'; type ThrottleSelectField = typeof SelectField; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx index 05043e5b96a3..be9e919b806b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/index.tsx @@ -9,10 +9,10 @@ import React, { FC, memo, useCallback, useState, useEffect } from 'react'; import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; +import { DEFAULT_INDEX_KEY } from '../../../../../../../../../plugins/siem/common/constants'; +import { isMlRule } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; import { IIndexPattern } from '../../../../../../../../../../src/plugins/data/public'; import { useFetchIndexPatterns } from '../../../../../containers/detection_engine/rules'; -import { DEFAULT_INDEX_KEY } from '../../../../../../common/constants'; -import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/translations'; import { useMlCapabilities } from '../../../../../components/ml_popover/hooks/use_ml_capabilities'; import { useUiSetting$ } from '../../../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx index 4a132f94a987..629c6758a141 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_define_rule/schema.tsx @@ -9,8 +9,8 @@ import { EuiText } from '@elastic/eui'; import { isEmpty } from 'lodash/fp'; import React from 'react'; +import { isMlRule } from '../../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; import { esKuery } from '../../../../../../../../../../src/plugins/data/public'; -import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; import { FieldValueQueryBar } from '../query_bar'; import { ERROR_CODE, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx index 0cf15c41a0f9..3b297a623e34 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/throttle_select_field/index.tsx @@ -9,7 +9,7 @@ import React, { useCallback } from 'react'; import { NOTIFICATION_THROTTLE_RULE, NOTIFICATION_THROTTLE_NO_ACTIONS, -} from '../../../../../../common/constants'; +} from '../../../../../../../../../plugins/siem/common/constants'; import { SelectField } from '../../../../../shared_imports'; export const THROTTLE_OPTIONS = [ diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts index 7ad116c31336..a65e8178f75c 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts @@ -8,10 +8,10 @@ import { has, isEmpty } from 'lodash/fp'; import moment from 'moment'; import deepmerge from 'deepmerge'; -import { NOTIFICATION_THROTTLE_NO_ACTIONS } from '../../../../../common/constants'; -import { transformAlertToRuleAction } from '../../../../../common/detection_engine/transform_actions'; -import { RuleType } from '../../../../../common/detection_engine/types'; -import { isMlRule } from '../../../../../common/detection_engine/ml_helpers'; +import { NOTIFICATION_THROTTLE_NO_ACTIONS } from '../../../../../../../../plugins/siem/common/constants'; +import { transformAlertToRuleAction } from '../../../../../../../../plugins/siem/common/detection_engine/transform_actions'; +import { RuleType } from '../../../../../../../../plugins/siem/common/detection_engine/types'; +import { isMlRule } from '../../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; import { NewRule } from '../../../../containers/detection_engine/rules'; import { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx index 58a1b0fd3133..7bea41c2ab4d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx @@ -10,9 +10,12 @@ import moment from 'moment'; import memoizeOne from 'memoize-one'; import { useLocation } from 'react-router-dom'; -import { RuleAlertAction, RuleType } from '../../../../common/detection_engine/types'; -import { isMlRule } from '../../../../common/detection_engine/ml_helpers'; -import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; +import { + RuleAlertAction, + RuleType, +} from '../../../../../../../plugins/siem/common/detection_engine/types'; +import { isMlRule } from '../../../../../../../plugins/siem/common/detection_engine/ml_helpers'; +import { transformRuleToAlertAction } from '../../../../../../../plugins/siem/common/detection_engine/transform_actions'; import { Filter } from '../../../../../../../../src/plugins/data/public'; import { Rule } from '../../../containers/detection_engine/rules'; import { FormData, FormHook, FormSchema } from '../../../shared_imports'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts index 1c366e6640b2..380ef5219034 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts @@ -4,8 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ +import { + RuleAlertAction, + RuleType, +} from '../../../../../../../plugins/siem/common/detection_engine/types'; import { AlertAction } from '../../../../../../../plugins/alerting/common'; -import { RuleAlertAction, RuleType } from '../../../../common/detection_engine/types'; import { Filter } from '../../../../../../../../src/plugins/data/common'; import { FieldValueQueryBar } from './components/query_bar'; import { FormData, FormHook } from '../../../shared_imports'; diff --git a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts b/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts index cb5fc62b9658..207b86fee02b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/hosts/navigation/types.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ +import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; import { Filter, IIndexPattern } from '../../../../../../../../src/plugins/data/public'; import { NarrowDateRange } from '../../../components/ml/types'; -import { ESTermQuery } from '../../../../common/typed_json'; import { InspectQuery, Refetch } from '../../../store/inputs/model'; import { HostsTableType, HostsType } from '../../../store/hosts/model'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts b/x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts index ef989fb64eab..efd9c644ec6b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/network/ip_details/types.ts @@ -6,8 +6,8 @@ import { IIndexPattern } from 'src/plugins/data/public'; +import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; import { NetworkType } from '../../../store/network/model'; -import { ESTermQuery } from '../../../../common/typed_json'; import { InspectQuery, Refetch } from '../../../store/inputs/model'; import { FlowTarget, FlowTargetSourceDest } from '../../../graphql/types'; import { GlobalTimeArgs } from '../../../containers/global_time'; diff --git a/x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts b/x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts index 222a99992917..90c18b6ff69f 100644 --- a/x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/network/navigation/types.ts @@ -4,12 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ +import { ESTermQuery } from '../../../../../../../plugins/siem/common/typed_json'; import { IIndexPattern } from '../../../../../../../../src/plugins/data/common/'; import { NavTab } from '../../../components/navigation/types'; import { FlowTargetSourceDest } from '../../../graphql/types'; import { networkModel } from '../../../store'; -import { ESTermQuery } from '../../../../common/typed_json'; import { GlobalTimeArgs } from '../../../containers/global_time'; import { SetAbsoluteRangeDatePicker } from '../types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx index 744102fbac4b..8e09572cb279 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx @@ -7,9 +7,9 @@ import { EuiButton } from '@elastic/eui'; import numeral from '@elastic/numeral'; import React, { useEffect, useMemo } from 'react'; - import { Position } from '@elastic/charts'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; + +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../plugins/siem/common/constants'; import { SHOWING, UNIT } from '../../../components/alerts_viewer/translations'; import { getDetectionEngineAlertUrl } from '../../../components/link_to/redirect_to_detection_engine'; import { MatrixHistogramContainer } from '../../../components/matrix_histogram'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx index cc1f9b1cc568..f47342075365 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/overview/events_by_dataset/index.tsx @@ -7,8 +7,9 @@ import { EuiButton } from '@elastic/eui'; import numeral from '@elastic/numeral'; import React, { useEffect, useMemo } from 'react'; - import { Position } from '@elastic/charts'; + +import { DEFAULT_NUMBER_FORMAT } from '../../../../../../../plugins/siem/common/constants'; import { SHOWING, UNIT } from '../../../components/events_viewer/translations'; import { convertToBuildEsQuery } from '../../../lib/keury'; import { getTabsOnHostsUrl } from '../../../components/link_to/redirect_to_hosts'; @@ -24,7 +25,6 @@ import { } from '../../../../../../../../src/plugins/data/public'; import { inputsModel } from '../../../store'; import { HostsTableType, HostsType } from '../../../store/hosts/model'; -import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; import * as i18n from '../translations'; import { MatrixHisrogramConfigs } from '../../../components/matrix_histogram/types'; diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx index 52e36b472a0e..4d4d96803cd6 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/overview/sidebar/sidebar.tsx @@ -8,9 +8,12 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import styled from 'styled-components'; +import { + ENABLE_NEWS_FEED_SETTING, + NEWS_FEED_URL_SETTING, +} from '../../../../../../../plugins/siem/common/constants'; import { Filters as RecentCasesFilters } from '../../../components/recent_cases/filters'; import { Filters as RecentTimelinesFilters } from '../../../components/recent_timelines/filters'; -import { ENABLE_NEWS_FEED_SETTING, NEWS_FEED_URL_SETTING } from '../../../../common/constants'; import { StatefulRecentCases } from '../../../components/recent_cases'; import { StatefulRecentTimelines } from '../../../components/recent_timelines'; import { StatefulNewsFeed } from '../../../components/news_feed'; diff --git a/x-pack/legacy/plugins/siem/public/store/inputs/model.ts b/x-pack/legacy/plugins/siem/public/store/inputs/model.ts index 04facf3b98c3..e851caf523eb 100644 --- a/x-pack/legacy/plugins/siem/public/store/inputs/model.ts +++ b/x-pack/legacy/plugins/siem/public/store/inputs/model.ts @@ -5,7 +5,6 @@ */ import { Dispatch } from 'redux'; -import { Omit } from '../../../common/utility_types'; import { InputsModelId } from './constants'; import { CONSTANTS } from '../../components/url_state/constants'; import { Query, Filter, SavedQuery } from '../../../../../../../src/plugins/data/public'; diff --git a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts b/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts index e7033b304386..bb66067512d1 100644 --- a/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts +++ b/x-pack/legacy/plugins/siem/public/utils/default_date_settings.test.ts @@ -30,7 +30,7 @@ import { Policy } from '../store/inputs/model'; // we have to repeat ourselves once const DEFAULT_FROM_DATE = '1983-05-31T13:03:54.234Z'; const DEFAULT_TO_DATE = '1990-05-31T13:03:54.234Z'; -jest.mock('../../common/constants', () => ({ +jest.mock('../../../../../plugins/siem/common/constants', () => ({ DEFAULT_FROM: '1983-05-31T13:03:54.234Z', DEFAULT_TO: '1990-05-31T13:03:54.234Z', DEFAULT_INTERVAL_PAUSE: true, diff --git a/x-pack/plugins/siem/common/detection_engine/transform_actions.ts b/x-pack/plugins/siem/common/detection_engine/transform_actions.ts index aeb4d5393302..4ce382357583 100644 --- a/x-pack/plugins/siem/common/detection_engine/transform_actions.ts +++ b/x-pack/plugins/siem/common/detection_engine/transform_actions.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AlertAction } from '../../../../../plugins/alerting/common'; +import { AlertAction } from '../../../alerting/common'; import { RuleAlertAction } from './types'; export const transformRuleToAlertAction = ({ diff --git a/x-pack/plugins/siem/common/detection_engine/types.ts b/x-pack/plugins/siem/common/detection_engine/types.ts index 39012d0b4b68..5a91cfd4809c 100644 --- a/x-pack/plugins/siem/common/detection_engine/types.ts +++ b/x-pack/plugins/siem/common/detection_engine/types.ts @@ -5,7 +5,7 @@ */ import * as t from 'io-ts'; -import { AlertAction } from '../../../../../plugins/alerting/common'; +import { AlertAction } from '../../../alerting/common'; export type RuleAlertAction = Omit & { action_type_id: string; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts index 796b024a8557..e14d20e3bc56 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.test.ts @@ -5,7 +5,7 @@ */ import { addTags } from './add_tags'; -import { INTERNAL_RULE_ALERT_ID_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; describe('add_tags', () => { test('it should add a rule id as an internal structure', () => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts index 6245182c795f..14b2e1ae9e36 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/add_tags.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_RULE_ALERT_ID_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; export const addTags = (tags: string[], ruleAlertId: string): string[] => Array.from(new Set([...tags, `${INTERNAL_RULE_ALERT_ID_KEY}:${ruleAlertId}`])); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts index 50b3efd388b8..35a737177ad4 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/create_notifications.ts @@ -5,10 +5,10 @@ */ import { Alert } from '../../../../../alerting/common'; -import { APP_ID, NOTIFICATIONS_ID } from 'siem/common/constants'; +import { APP_ID, NOTIFICATIONS_ID } from '../../../../common/constants'; import { CreateNotificationParams } from './types'; import { addTags } from './add_tags'; -import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; +import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; export const createNotifications = async ({ alertsClient, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts index 6bcc96a553d3..0e9e4a8370ec 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.test.ts @@ -5,7 +5,7 @@ */ import { getFilter } from './find_notifications'; -import { NOTIFICATIONS_ID } from 'siem/common/constants'; +import { NOTIFICATIONS_ID } from '../../../../common/constants'; describe('find_notifications', () => { test('it returns a full filter with an AND if sent down', () => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts index 536734beba36..b47ea348bd4d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/find_notifications.ts @@ -5,7 +5,7 @@ */ import { FindResult } from '../../../../../alerting/server'; -import { NOTIFICATIONS_ID } from 'siem/common/constants'; +import { NOTIFICATIONS_ID } from '../../../../common/constants'; import { FindNotificationParams } from './types'; export const getFilter = (filter: string | null | undefined) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts index c05d178bba2f..c585c474556a 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/read_notifications.ts @@ -7,7 +7,7 @@ import { SanitizedAlert } from '../../../../../alerting/common'; import { ReadNotificationParams, isAlertType } from './types'; import { findNotifications } from './find_notifications'; -import { INTERNAL_RULE_ALERT_ID_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ALERT_ID_KEY } from '../../../../common/constants'; export const readNotifications = async ({ alertsClient, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts index 601a33c2d5ed..e4ad53de742d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/rules_notification_alert_type.ts @@ -6,7 +6,7 @@ import { Logger } from 'src/core/server'; import { schema } from '@kbn/config-schema'; -import { NOTIFICATIONS_ID } from 'siem/common/constants'; +import { NOTIFICATIONS_ID } from '../../../../common/constants'; import { NotificationAlertTypeDefinition } from './types'; import { getSignalsCount } from './get_signals_count'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts index e75d00bd6c38..d740b79cb3b9 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/types.ts @@ -12,8 +12,8 @@ import { AlertExecutorOptions, } from '../../../../../alerting/server'; import { Alert } from '../../../../../alerting/common'; -import { NOTIFICATIONS_ID } from 'siem/common/constants'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { NOTIFICATIONS_ID } from '../../../../common/constants'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; export interface RuleNotificationAlertType extends Alert { params: { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts index 29c1b3bf6a45..5889b0e4dcfb 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/notifications/update_notifications.ts @@ -9,7 +9,7 @@ import { readNotifications } from './read_notifications'; import { UpdateNotificationParams } from './types'; import { addTags } from './add_tags'; import { createNotifications } from './create_notifications'; -import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; +import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; export const updateNotifications = async ({ alertsClient, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts index af6a38c3f1ed..469f91c8211c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts @@ -19,7 +19,7 @@ import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY, DETECTION_ENGINE_PREPACKAGED_URL, -} from 'siem/common/constants'; +} from '../../../../../common/constants'; import { ShardsResponse } from '../../../types'; import { RuleAlertType, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts index 41aa96dbc4dd..cb48e3522885 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/create_index_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_INDEX_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getIndexExists } from '../../index/get_index_exists'; import { getPolicyExists } from '../../index/get_policy_exists'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts index 1a3641471919..5eff38b77849 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/delete_index_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_INDEX_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getIndexExists } from '../../index/get_index_exists'; import { getPolicyExists } from '../../index/get_policy_exists'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts index 48bd18a4f69f..8ff8d7461ecd 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/index/read_index_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_INDEX_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getIndexExists } from '../../index/get_index_exists'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts index 5fb6bbde7353..7dbbe837e656 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/privileges/read_privileges_route.ts @@ -7,7 +7,7 @@ import { merge } from 'lodash/fp'; import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_PRIVILEGES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_PRIVILEGES_URL } from '../../../../../common/constants'; import { SetupPlugins } from '../../../../plugin'; import { buildSiemResponse, transformError } from '../utils'; import { readPrivileges } from '../../privileges/read_privileges'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index fc2e7433f377..bfc8c9c54b2c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../../common/constants'; import { getIndexExists } from '../../index/get_index_exists'; import { transformError, buildSiemResponse } from '../utils'; import { getPrepackagedRules } from '../../rules/get_prepackaged_rules'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts index 97c9da99225d..e6facf6f3b7a 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { typicalPayload, getReadBulkRequest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index d78ff01e7c0d..a40952c078a3 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -7,7 +7,7 @@ import uuid from 'uuid'; import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { createRules } from '../../rules/create_rules'; import { RuleAlertParamsRest } from '../../types'; import { readRules } from '../../rules/read_rules'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts index b11210d6f532..f15f47432f83 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getEmptyFindResult, getResult, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts index 0e30b7f0d872..19c5d479deb7 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -7,7 +7,7 @@ import uuid from 'uuid'; import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { createRules } from '../../rules/create_rules'; import { IRuleSavedAttributesSavedObjectAttributes } from '../../rules/types'; import { readRules } from '../../rules/read_rules'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts index 64c66b5fe8b2..f2da3ab4be8f 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getEmptyFindResult, getFindResultWithSingleHit, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts index 47bcffeceb2e..38748e287ab4 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts @@ -5,7 +5,7 @@ */ import { IRouter, RouteConfig, RequestHandler } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { queryRulesBulkSchema } from '../schemas/query_rules_bulk_schema'; import { rulesBulkSchema } from '../schemas/response/rules_bulk_schema'; import { getIdBulkError } from './utils'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts index cff70a360bf8..e30f332ecd1c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getEmptyFindResult, getResult, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts index 01e805ce6cf4..098d556741fe 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { deleteRules } from '../../rules/delete_rules'; import { queryRulesSchema } from '../schemas/query_rules_schema'; import { getIdError } from './utils'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts index 9299341de2ca..9b4d19876dba 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { LegacyServices } from '../../../../types'; import { ExportRulesRequestParams } from '../../rules/types'; import { getNonPackagedRulesCount } from '../../rules/get_existing_prepackaged_rules'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts index d978dec21364..b4591a8141f7 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getResult, getFindRequest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts index a15358780997..9661fac81497 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { findRules } from '../../rules/find_rules'; import { FindRulesRequestParams, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts index fc59d5d6238f..d7c6d317227f 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getFindResultStatus, ruleStatusRequest } from '../__mocks__/request_responses'; import { serverMock, requestContextMock, requestMock } from '../__mocks__'; import { findRulesStatusesRoute } from './find_rules_status_route'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts index f3e596ceaa8a..6b54a25a1b1c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { findRulesStatusesSchema } from '../schemas/find_rules_statuses_schema'; import { FindRulesStatusesRequestParams, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts index 1d5d0a9c35a6..67a54f3ba492 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_PREPACKAGED_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../../common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { getPrepackagedRules } from '../../rules/get_prepackaged_rules'; import { getRulesToInstall } from '../../rules/get_rules_to_install'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index 089c56b3622e..61f5e6faf1bd 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -23,7 +23,7 @@ import { } from '../__mocks__/request_responses'; import { createMockConfig, requestContextMock, serverMock, requestMock } from '../__mocks__'; import { importRulesRoute } from './import_rules_route'; -import { DEFAULT_SIGNALS_INDEX } from 'siem/common/constants'; +import { DEFAULT_SIGNALS_INDEX } from '../../../../../common/constants'; import * as createRulesStreamFromNdJson from '../../rules/create_rules_stream_from_ndjson'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts index 20c58d1359a9..318fedba25c6 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -9,7 +9,7 @@ import { extname } from 'path'; import { IRouter } from '../../../../../../../../src/core/server'; import { createPromiseFromStreams } from '../../../../../../../../src/legacy/utils/streams'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { LegacyServices } from '../../../../types'; import { createRules } from '../../rules/create_rules'; import { ImportRulesRequestParams } from '../../rules/types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts index 3d4bf104a6f4..a1f39936dd67 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getEmptyFindResult, typicalPayload, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts index 25ecfac09409..e4236f4632dc 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { IRuleSavedAttributesSavedObjectAttributes, PatchRuleAlertParamsRest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts index 2b600d456b23..dbb0a3bb3e1d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getEmptyFindResult, getFindResultStatus, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts index 85181b625901..23469144e11f 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/patch_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { patchRules } from '../../rules/patch_rules'; import { PatchRuleAlertParamsRest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts index bd948a4c3974..982e1bb47a53 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { readRulesRoute } from './read_rules_route'; import { getEmptyFindResult, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts index fe13016edc67..4d23e0217f2e 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { getIdError } from './utils'; import { transformValidate } from './validate'; import { buildRouteValidation, transformError, buildSiemResponse } from '../utils'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts index 04200611ea0e..332a47d0c0fc 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts @@ -16,7 +16,7 @@ import { import { serverMock, requestContextMock, requestMock } from '../__mocks__'; import { updateRulesBulkRoute } from './update_rules_bulk_route'; import { BulkError } from '../utils'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; describe('update_rules_bulk', () => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts index 14621ac6212b..8f319063b2a9 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { IRuleSavedAttributesSavedObjectAttributes, UpdateRuleAlertParamsRest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts index 237451d2c995..53c52153e84e 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts @@ -16,7 +16,7 @@ import { typicalMlRulePayload, } from '../__mocks__/request_responses'; import { requestContextMock, serverMock, requestMock } from '../__mocks__'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; import { updateRulesNotifications } from '../../rules/update_rules_notifications'; jest.mock('../../rules/update_rules_notifications'); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts index d43c05225f4b..7d69af4bcbd9 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_RULES_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { UpdateRuleAlertParamsRest, IRuleSavedAttributesSavedObjectAttributes, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts index fb57a78f3d35..ec9e84d4fa6b 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts @@ -18,7 +18,7 @@ import { getTupleDuplicateErrorsAndUniqueRules, } from './utils'; import { getResult } from '../__mocks__/request_responses'; -import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; +import { INTERNAL_IDENTIFIER } from '../../../../../common/constants'; import { ImportRuleAlertRest, RuleAlertParamsRest, RuleTypeParams } from '../../types'; import { BulkError, ImportSuccessError } from '../utils'; import { getSimpleRule, getOutputRuleAlertForRest } from '../__mocks__/utils'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts index 1fa2dbf011d7..49d40354e68a 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts @@ -9,7 +9,7 @@ import { SavedObject, SavedObjectsFindResponse } from 'kibana/server'; import uuid from 'uuid'; import { PartialAlert, FindResult } from '../../../../../../alerting/server'; -import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; +import { INTERNAL_IDENTIFIER } from '../../../../../common/constants'; import { RuleAlertType, isAlertType, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts index 5c4e552fbd6e..346da53736ad 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts @@ -5,7 +5,7 @@ */ import { AlertAction } from '../../../../../../alerting/common'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../../common/detection_engine/types'; import { ThreatParams, PrepackagedRules } from '../../types'; import { addPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts index 1bc98c35e918..006fc81e3ee8 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts @@ -42,7 +42,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; +import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; import { hasListsFeature } from '../../feature_flags'; /** diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts index 69f2997c97be..fa961994a8be 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts @@ -7,7 +7,7 @@ import { AlertAction } from '../../../../../../alerting/common'; import { createRulesSchema } from './create_rules_schema'; import { PatchRuleAlertParamsRest } from '../../rules/types'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../../common/detection_engine/types'; import { ThreatParams, RuleAlertParamsRest } from '../../types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts index ec6cecc75279..5213f3faaf48 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts @@ -42,7 +42,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; +import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; import { hasListsFeature } from '../../feature_flags'; export const createRulesSchema = Joi.object({ diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts index 28e1617c9008..b8d601b74389 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts @@ -10,7 +10,7 @@ import { importRulesQuerySchema, importRulesPayloadSchema, } from './import_rules_schema'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../../common/detection_engine/types'; import { ThreatParams, ImportRuleAlertRest } from '../../types'; import { ImportRulesRequestParams } from '../../rules/types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts index decc167335be..56aa45659fda 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts @@ -48,7 +48,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; +import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; import { hasListsFeature } from '../../feature_flags'; /** diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts index 6a9aeb4b347f..00e2ff9a9f0f 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/patch_rules_schema.test.ts @@ -7,7 +7,7 @@ import { AlertAction } from '../../../../../../alerting/common'; import { patchRulesSchema } from './patch_rules_schema'; import { PatchRuleAlertParamsRest } from '../../rules/types'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../../common/detection_engine/types'; import { ThreatParams } from '../../types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts index b3c6e4321fde..25e76f367037 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/response/check_type_dependents.ts @@ -8,7 +8,7 @@ import * as t from 'io-ts'; import { Either, left, fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { isMlRule } from 'siem/common/detection_engine/ml_helpers'; +import { isMlRule } from '../../../../../../common/detection_engine/ml_helpers'; import { dependentRulesSchema, RequiredRulesSchema, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts index 008f09fb3fca..43834d67a2d6 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts @@ -7,7 +7,7 @@ import { AlertAction } from '../../../../../../alerting/common'; import { updateRulesSchema } from './update_rules_schema'; import { PatchRuleAlertParamsRest } from '../../rules/types'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../../common/detection_engine/types'; import { ThreatParams, RuleAlertParamsRest } from '../../types'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts index 75c8ad91d7db..f842c14f41ae 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts @@ -43,7 +43,7 @@ import { } from './schemas'; /* eslint-enable @typescript-eslint/camelcase */ -import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; +import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; import { hasListsFeature } from '../../feature_flags'; /** diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts index d9b8d8489675..72f3c89f660c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../../common/constants'; import { getSetSignalStatusByIdsRequest, getSetSignalStatusByQueryRequest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts index 3f52542c5ce8..c71761fcc39d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/open_close_signals_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_SIGNALS_STATUS_URL } from '../../../../../common/constants'; import { SignalsStatusRestParams } from '../../signals/types'; import { setSignalsStatusSchema } from '../schemas/set_signal_status_schema'; import { transformError, buildRouteValidation, buildSiemResponse } from '../utils'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts index b2243e1fa60f..8d7b171a8537 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.test.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../common/constants'; import { getSignalsQueryRequest, getSignalsAggsQueryRequest, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts index c7c8558f882d..fd02b3371ed3 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/signals/query_signals_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../common/constants'; import { SignalsQueryRestParams } from '../../signals/types'; import { querySignalsSchema } from '../schemas/query_signals_index_schema'; import { transformError, buildRouteValidation, buildSiemResponse } from '../utils'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts index e87ca3dcd6b7..2b885385521d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts @@ -5,7 +5,7 @@ */ import { IRouter } from '../../../../../../../../src/core/server'; -import { DETECTION_ENGINE_TAGS_URL } from 'siem/common/constants'; +import { DETECTION_ENGINE_TAGS_URL } from '../../../../../common/constants'; import { transformError, buildSiemResponse } from '../utils'; import { readTags } from '../../tags/read_tags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts index 2e7964bfb401..52493a9be9b8 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts @@ -15,9 +15,9 @@ import { CustomHttpResponseOptions, } from '../../../../../../../src/core/server'; import { ILicense } from '../../../../../licensing/server'; -import { MINIMUM_ML_LICENSE } from 'siem/common/constants'; -import { RuleType } from 'siem/common/detection_engine/types'; -import { isMlRule } from 'siem/common/detection_engine/ml_helpers'; +import { MINIMUM_ML_LICENSE } from '../../../../common/constants'; +import { RuleType } from '../../../../common/detection_engine/types'; +import { isMlRule } from '../../../../common/detection_engine/ml_helpers'; import { BadRequestError } from '../errors/bad_request_error'; export interface OutputError { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts index 738e330554ba..26c3b29ff2c5 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/create_rule_actions_saved_object.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts index 3b3ea600397e..83cd59f0a1cd 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts index d5a20cd95f5a..525eb74d18fb 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/types.ts @@ -6,7 +6,7 @@ import { get } from 'lodash/fp'; import { SavedObject, SavedObjectAttributes, SavedObjectsFindResponse } from 'kibana/server'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export interface IRuleActionsAttributes extends Record { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts index d6ec95e0205b..3364827d397d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_or_create_rule_actions_saved_object.ts @@ -5,7 +5,7 @@ */ import { AlertServices } from '../../../../../alerting/server'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { getRuleActionsSavedObject } from './get_rule_actions_saved_object'; import { createRuleActionsSavedObject } from './create_rule_actions_saved_object'; import { updateRuleActionsSavedObject } from './update_rule_actions_saved_object'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts index 51c3207a0939..c8a3b1bbc38a 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/update_rule_actions_saved_object.ts @@ -7,7 +7,7 @@ import { AlertServices } from '../../../../../alerting/server'; import { ruleActionsSavedObjectType } from './saved_object_mappings'; import { RulesActionsSavedObject } from './get_rule_actions_saved_object'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { getThrottleOptions } from './utils'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts index 30758937b0b1..554c2b4a3dd9 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rule_actions/utils.ts @@ -5,7 +5,7 @@ */ import { SavedObjectsUpdateResponse } from 'kibana/server'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { IRuleActionsAttributesSavedObjectAttributes } from './types'; export const getThrottleOptions = ( diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts index d51c227120e3..70b705309b88 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.test.ts @@ -5,7 +5,7 @@ */ import { addTags } from './add_tags'; -import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; describe('add_tags', () => { test('it should add a rule id as an internal structure with immutable true', () => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts index 3be49da325c2..a1f240495045 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/add_tags.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; export const addTags = (tags: string[], ruleId: string, immutable: boolean): string[] => { return Array.from( diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts index 307dbfa9d1c8..76cfffdfe9f4 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/create_rules.ts @@ -4,9 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ -import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; +import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; import { Alert } from '../../../../../alerting/common'; -import { APP_ID, SIGNALS_ID } from 'siem/common/constants'; +import { APP_ID, SIGNALS_ID } from '../../../../common/constants'; import { CreateRuleParams } from './types'; import { addTags } from './add_tags'; import { hasListsFeature } from '../feature_flags'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts index 1160793761de..23f031b22a9d 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.test.ts @@ -5,7 +5,7 @@ */ import { getFilter } from './find_rules'; -import { SIGNALS_ID } from 'siem/common/constants'; +import { SIGNALS_ID } from '../../../../common/constants'; describe('find_rules', () => { test('it returns a full filter with an AND if sent down', () => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts index 5d4fd2060271..ac600b0b5b21 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/find_rules.ts @@ -5,7 +5,7 @@ */ import { FindResult } from '../../../../../alerting/server'; -import { SIGNALS_ID } from 'siem/common/constants'; +import { SIGNALS_ID } from '../../../../common/constants'; import { FindRuleParams } from './types'; export const getFilter = (filter: string | null | undefined) => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts index 834966010244..512164fc3d2e 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; +import { INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; import { AlertsClient } from '../../../../../alerting/server'; import { RuleAlertType, isAlertTypes } from './types'; import { findRules } from './find_rules'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts index e7640ec06907..9e0d5b3d05b3 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/read_rules.ts @@ -5,7 +5,7 @@ */ import { SanitizedAlert } from '../../../../../alerting/common'; -import { INTERNAL_RULE_ID_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ID_KEY } from '../../../../common/constants'; import { findRules } from './find_rules'; import { ReadRuleParams, isAlertType } from './types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts index d98d9a488f60..6fde199e0ba7 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts @@ -15,7 +15,7 @@ import { } from 'kibana/server'; import { AlertsClient, PartialAlert } from '../../../../../alerting/server'; import { Alert } from '../../../../../alerting/common'; -import { SIGNALS_ID } from 'siem/common/constants'; +import { SIGNALS_ID } from '../../../../common/constants'; import { ActionsClient } from '../../../../../actions/server'; import { RuleAlertParams, RuleTypeParams, RuleAlertParamsRest } from '../types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts index 37fa4f9b11bb..183b81f3a3c7 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { transformRuleToAlertAction } from 'siem/common/detection_engine/transform_actions'; +import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; import { PartialAlert } from '../../../../../alerting/server'; import { readRules } from './read_rules'; import { IRuleSavedAttributesSavedObjectAttributes, UpdateRuleParams } from './types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts index c140417364e3..ddcd34b18cae 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/rules/update_rules_notifications.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { AlertsClient, AlertServices } from '../../../../../alerting/server'; import { updateOrCreateRuleActionsSavedObject } from '../rule_actions/update_or_create_rule_actions_saved_object'; import { updateNotifications } from '../notifications/update_notifications'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts index ad88203daa37..75c4d75cedf1 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_bulk_body.ts @@ -8,7 +8,7 @@ import { SignalSourceHit, SignalHit } from './types'; import { buildRule } from './build_rule'; import { buildSignal } from './build_signal'; import { buildEventTypeSignal } from './build_event_type_signal'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams } from '../types'; interface BuildBulkBodyParams { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts index 3835de6f9dfa..9c375d7d45d5 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_rule.ts @@ -5,7 +5,7 @@ */ import { pickBy } from 'lodash/fp'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams, OutputRuleAlertRest } from '../types'; interface BuildRuleParams { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts index 06d9a881e167..0a50c33fbbfe 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.test.ts @@ -12,7 +12,7 @@ import { removeInternalTagsFromRule, } from './build_signal'; import { Signal, Ancestor } from './types'; -import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from 'siem/common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IMMUTABLE_KEY } from '../../../../common/constants'; describe('buildSignal', () => { beforeEach(() => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts index 3e3bace5566f..684cad99f09f 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/build_signal.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; +import { INTERNAL_IDENTIFIER } from '../../../../common/constants'; import { SignalSourceHit, Signal, Ancestor } from './types'; import { OutputRuleAlertRest } from '../types'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts index b935602cc01d..d298f1cc7cbc 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/bulk_create_ml_signals.ts @@ -9,7 +9,7 @@ import { SearchResponse } from 'elasticsearch'; import { Logger } from '../../../../../../../src/core/server'; import { AlertServices } from '../../../../../alerting/server'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; import { singleBulkCreate, SingleBulkCreateResponse } from './single_bulk_create'; import { AnomalyResults, Anomaly } from '../../machine_learning'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts index 066a47097ed6..c734eedf0661 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts @@ -4,10 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { DEFAULT_INDEX_KEY } from 'siem/common/constants'; -import { getInputIndex } from './get_input_output_index'; -import { defaultIndexPattern } from 'siem/default_index_pattern'; import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { defaultIndexPattern } from '../../../../common/default_index_pattern'; +import { getInputIndex } from './get_input_output_index'; describe('get_input_output_index', () => { let servicesMock: AlertServicesMock; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts index 77f679442b84..36cf4f5485e9 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts @@ -5,8 +5,8 @@ */ import { AlertServices } from '../../../../../alerting/server'; -import { defaultIndexPattern } from 'siem/default_index_pattern'; -import { DEFAULT_INDEX_KEY } from 'siem/common/constants'; +import { defaultIndexPattern } from '../../../../common/default_index_pattern'; +import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; export const getInputIndex = async ( services: AlertServices, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts index 3f271c12c1de..cec011ae8c44 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.test.ts @@ -15,7 +15,7 @@ import { sampleDocSearchResultsNoSortIdNoHits, } from './__mocks__/es_results'; import { searchAfterAndBulkCreate } from './search_after_bulk_create'; -import { DEFAULT_SIGNALS_INDEX } from 'siem/common/constants'; +import { DEFAULT_SIGNALS_INDEX } from '../../../../common/constants'; import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; import uuid from 'uuid'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts index 9af5201c567d..e287e33295c8 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts @@ -5,7 +5,7 @@ */ import { AlertServices } from '../../../../../alerting/server'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; import { Logger } from '../../../../../../../src/core/server'; import { singleSearchAfter } from './single_search_after'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts index 90438bbc3ae1..58dd53b6447c 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_params_schema.ts @@ -6,7 +6,7 @@ import { schema } from '@kbn/config-schema'; -import { DEFAULT_MAX_SIGNALS } from 'siem/common/constants'; +import { DEFAULT_MAX_SIGNALS } from '../../../../common/constants'; /** * This is the schema for the Alert Rule that represents the SIEM alert for signals diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts index da38dda7bd5f..0357f906f803 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts @@ -7,8 +7,8 @@ import { performance } from 'perf_hooks'; import { Logger } from 'src/core/server'; -import { SIGNALS_ID, DEFAULT_SEARCH_AFTER_PAGE_SIZE } from 'siem/common/constants'; -import { isJobStarted, isMlRule } from 'siem/common/detection_engine/ml_helpers'; +import { SIGNALS_ID, DEFAULT_SEARCH_AFTER_PAGE_SIZE } from '../../../../common/constants'; +import { isJobStarted, isMlRule } from '../../../../common/detection_engine/ml_helpers'; import { SetupPlugins } from '../../../plugin'; import { buildEventsSearchQuery } from './build_events_query'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts index 883002e75a49..51cc0f449b17 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.test.ts @@ -16,7 +16,7 @@ import { sampleBulkCreateErrorResult, sampleDocWithAncestors, } from './__mocks__/es_results'; -import { DEFAULT_SIGNALS_INDEX } from 'siem/common/constants'; +import { DEFAULT_SIGNALS_INDEX } from '../../../../common/constants'; import { singleBulkCreate, filterDuplicateRules } from './single_bulk_create'; import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts index 09637c11669a..c098a4b68450 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/single_bulk_create.ts @@ -8,7 +8,7 @@ import { countBy, isEmpty } from 'lodash'; import { performance } from 'perf_hooks'; import { AlertServices } from '../../../../../alerting/server'; import { SignalSearchResponse, BulkResponse } from './types'; -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleTypeParams, RefreshTypes } from '../types'; import { generateId, makeFloatString, errorAggregator } from './utils'; import { buildBulkBody } from './build_bulk_body'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts index 87f30ede11fb..b493bab8b461 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/types.ts @@ -4,14 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RuleAlertAction } from 'siem/common/detection_engine/types'; +import { AlertType, State, AlertExecutorOptions } from '../../../../../alerting/server'; +import { RuleAlertAction } from '../../../../common/detection_engine/types'; import { RuleAlertParams, OutputRuleAlertRest } from '../types'; import { SearchResponse } from '../../types'; -import { - AlertType, - State, - AlertExecutorOptions, -} from '../../../../../alerting/server'; export interface SignalsParams { signalIds: string[] | undefined | null; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts index 8dcf83b4b776..d29d885f9797 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.test.ts @@ -6,7 +6,7 @@ import { alertsClientMock } from '../../../../../alerting/server/mocks'; import { getResult, getFindResultWithMultiHits } from '../routes/__mocks__/request_responses'; -import { INTERNAL_RULE_ID_KEY, INTERNAL_IDENTIFIER } from 'siem/common/constants'; +import { INTERNAL_RULE_ID_KEY, INTERNAL_IDENTIFIER } from '../../../../common/constants'; import { readRawTags, readTags, convertTagsToSet, convertToTags, isTags } from './read_tags'; describe('read_tags', () => { diff --git a/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts index 8b04a931bc25..addd37371285 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/tags/read_tags.ts @@ -5,7 +5,7 @@ */ import { has } from 'lodash/fp'; -import { INTERNAL_IDENTIFIER } from 'siem/common/constants'; +import { INTERNAL_IDENTIFIER } from '../../../../common/constants'; import { AlertsClient } from '../../../../../alerting/server'; import { findRules } from '../rules/find_rules'; diff --git a/x-pack/plugins/siem/server/lib/events/mock.ts b/x-pack/plugins/siem/server/lib/events/mock.ts index f05f3f7d1acd..c72ac516c1f8 100644 --- a/x-pack/plugins/siem/server/lib/events/mock.ts +++ b/x-pack/plugins/siem/server/lib/events/mock.ts @@ -5,7 +5,7 @@ */ import { cloneDeep } from 'lodash/fp'; -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { RequestDetailsOptions } from './types'; export const mockResponseSearchTimelineDetails = { diff --git a/x-pack/plugins/siem/server/lib/hosts/mock.ts b/x-pack/plugins/siem/server/lib/hosts/mock.ts index af6ddd1b1045..7bb7bc20a5ac 100644 --- a/x-pack/plugins/siem/server/lib/hosts/mock.ts +++ b/x-pack/plugins/siem/server/lib/hosts/mock.ts @@ -5,7 +5,7 @@ */ import { Direction, HostsFields } from '../../graphql/types'; -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { HostOverviewRequestOptions, diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts index 8ea366227e92..4a2edc54a594 100644 --- a/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts +++ b/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { RequestBasicOptions } from '../framework/types'; const FROM = new Date('2019-05-03T13:24:00.660Z').valueOf(); diff --git a/x-pack/plugins/siem/server/lib/kpi_network/mock.ts b/x-pack/plugins/siem/server/lib/kpi_network/mock.ts index 5f083bfbefbe..6f0382ddd739 100644 --- a/x-pack/plugins/siem/server/lib/kpi_network/mock.ts +++ b/x-pack/plugins/siem/server/lib/kpi_network/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { RequestBasicOptions } from '../framework/types'; export const mockOptions: RequestBasicOptions = { diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts index a0bf8748f78d..ea60858207a3 100644 --- a/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts +++ b/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { HistogramType } from '../../graphql/types'; export const mockAlertsHistogramDataResponse = { diff --git a/x-pack/plugins/siem/server/lib/network/mock.ts b/x-pack/plugins/siem/server/lib/network/mock.ts index b2bc6513bc36..dc079438455d 100644 --- a/x-pack/plugins/siem/server/lib/network/mock.ts +++ b/x-pack/plugins/siem/server/lib/network/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { Direction, FlowTargetSourceDest, NetworkTopTablesFields } from '../../graphql/types'; import { NetworkTopNFlowRequestOptions } from '.'; diff --git a/x-pack/plugins/siem/server/lib/overview/mock.ts b/x-pack/plugins/siem/server/lib/overview/mock.ts index 3f5759240016..e336164a710f 100644 --- a/x-pack/plugins/siem/server/lib/overview/mock.ts +++ b/x-pack/plugins/siem/server/lib/overview/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { RequestBasicOptions } from '../framework/types'; export const mockOptionsNetwork: RequestBasicOptions = { @@ -79,7 +79,7 @@ export const mockResultNetwork = { }; export const mockOptionsHost: RequestBasicOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', diff --git a/x-pack/plugins/siem/server/lib/sources/configuration.test.ts b/x-pack/plugins/siem/server/lib/sources/configuration.test.ts index 5b162282e0d1..b01327b0aaf2 100644 --- a/x-pack/plugins/siem/server/lib/sources/configuration.test.ts +++ b/x-pack/plugins/siem/server/lib/sources/configuration.test.ts @@ -5,7 +5,7 @@ */ import { InmemoryConfigurationAdapter } from '../configuration/inmemory_configuration_adapter'; -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { ConfigurationSourcesAdapter } from './configuration'; import { PartialSourceConfiguration } from './types'; diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts index 6530dccbbdca..a83c44377330 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/request_responses.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { TIMELINE_EXPORT_URL, TIMELINE_IMPORT_URL } from 'siem/common/constants'; +import { TIMELINE_EXPORT_URL, TIMELINE_IMPORT_URL } from '../../../../../common/constants'; import { requestMock } from '../../../detection_engine/routes/__mocks__'; import stream from 'stream'; const readable = new stream.Readable(); diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts index b877c76d8219..4eadede40f5d 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts @@ -17,7 +17,7 @@ import { requestContextMock, requestMock, } from '../../detection_engine/routes/__mocks__'; -import { TIMELINE_EXPORT_URL } from 'siem/common/constants'; +import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { convertSavedObjectToSavedNote } from '../../note/saved_object'; import { convertSavedObjectToSavedPinnedEvent } from '../../pinned_event/saved_object'; import { convertSavedObjectToSavedTimeline } from '../convert_saved_object_to_savedtimeline'; diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts index d3b83a33bdbb..28aedc1087e1 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts @@ -5,11 +5,12 @@ */ import { set as _set } from 'lodash/fp'; + +import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { IRouter } from '../../../../../../../src/core/server'; import { LegacyServices } from '../../../types'; import { transformError, buildSiemResponse } from '../../detection_engine/routes/utils'; -import { TIMELINE_EXPORT_URL } from 'siem/common/constants'; import { getExportTimelineByObjectIds } from './utils/export_timelines'; import { diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts index 608e2ac4b107..ad5fed1cab1f 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts @@ -10,7 +10,7 @@ import { requestContextMock, requestMock, } from '../../detection_engine/routes/__mocks__'; -import { TIMELINE_EXPORT_URL } from 'siem/common/constants'; +import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { SecurityPluginSetup } from '../../../../../security/server'; import { @@ -65,7 +65,7 @@ describe('import timelines', () => { }; }); - jest.doMock('../../../../../../../../src/legacy/utils', () => { + jest.doMock('../../../../../../../src/legacy/utils', () => { return { createPromiseFromStreams: jest.fn().mockReturnValue(mockParsedObjects), }; diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts index b982f0c0005c..c341b6467d0a 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts @@ -7,6 +7,7 @@ import { extname } from 'path'; import { chunk, omit, set } from 'lodash/fp'; +import { TIMELINE_IMPORT_URL } from '../../../../common/constants'; import { buildSiemResponse, createBulkErrorObject, @@ -28,7 +29,6 @@ import { } from './utils/import_timelines'; import { IRouter } from '../../../../../../../src/core/server'; -import { TIMELINE_IMPORT_URL } from 'siem/common/constants'; import { SetupPlugins } from '../../../plugin'; import { ImportTimelinesPayloadSchemaRt } from './schemas/import_timelines_schema'; import { importRulesSchema } from '../../detection_engine/routes/schemas/response/import_rules_schema'; diff --git a/x-pack/plugins/siem/server/lib/tls/types.ts b/x-pack/plugins/siem/server/lib/tls/types.ts index 1949b0868e80..f18ddc04e14a 100644 --- a/x-pack/plugins/siem/server/lib/tls/types.ts +++ b/x-pack/plugins/siem/server/lib/tls/types.ts @@ -5,7 +5,7 @@ */ import { FrameworkRequest, RequestBasicOptions } from '../framework'; -import { TlsData } from 'siem/public/graphql/types'; +import { TlsData } from '../../graphql/types'; export interface TlsAdapter { getTls(request: FrameworkRequest, options: RequestBasicOptions): Promise; diff --git a/x-pack/plugins/siem/server/lib/types.ts b/x-pack/plugins/siem/server/lib/types.ts index 946427431efb..a74fe8f778ba 100644 --- a/x-pack/plugins/siem/server/lib/types.ts +++ b/x-pack/plugins/siem/server/lib/types.ts @@ -6,7 +6,7 @@ import { AuthenticatedUser } from '../../../security/public'; import { RequestHandlerContext } from '../../../../../src/core/server'; -export { ConfigType as Configuration } from '../../../../../plugins/siem/server'; +export { ConfigType as Configuration } from '../'; import { Authentications } from './authentications'; import { Events } from './events'; diff --git a/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts b/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts index 7e9b8bec39a2..3a98395d122f 100644 --- a/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts +++ b/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts @@ -6,7 +6,7 @@ import { omit } from 'lodash/fp'; -import { defaultIndexPattern } from 'siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../common/default_index_pattern'; import { Direction } from '../../graphql/types'; import { RequestOptions } from '../../lib/framework'; diff --git a/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts index c3b590d7ee82..2b5b34edca14 100644 --- a/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts +++ b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.test.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ import { transformDataToNdjson } from './create_stream_from_ndjson'; -import { ImportRuleAlertRest } from 'siem-legacy-ui/server/lib/detection_engine/types'; -import { sampleRule } from 'siem-legacy-ui/server/lib/detection_engine/signals/__mocks__/es_results'; +import { ImportRuleAlertRest } from '../../lib/detection_engine/types'; +import { sampleRule } from '../../lib/detection_engine/signals/__mocks__/es_results'; export const getOutputSample = (): Partial => ({ rule_id: 'rule-1', diff --git a/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts index f58c9422e1af..2d630d0b92c6 100644 --- a/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts +++ b/x-pack/plugins/siem/server/utils/read_stream/create_stream_from_ndjson.ts @@ -5,10 +5,10 @@ */ import { Transform } from 'stream'; import { has, isString } from 'lodash/fp'; -import { ImportRuleAlertRest } from 'siem-legacy-ui/server/lib/detection_engine/types'; +import { ImportRuleAlertRest } from '../../lib/detection_engine/types'; import { createMapStream, createFilterStream } from '../../../../../../src/legacy/utils/streams'; -import { importRulesSchema } from 'siem-legacy-ui/server/lib/detection_engine/routes/schemas/import_rules_schema'; -import { BadRequestError } from 'siem-legacy-ui/server/lib/detection_engine/errors/bad_request_error'; +import { importRulesSchema } from '../../lib/detection_engine/routes/schemas/import_rules_schema'; +import { BadRequestError } from '../../lib/detection_engine/errors/bad_request_error'; export interface RulesObjectsExportResultDetails { /** number of successfully exported objects */ From f24c1dbcd48a44611525b3431e08933f24d22eef Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sat, 11 Apr 2020 16:57:17 -0500 Subject: [PATCH 06/20] Move misc. config into NP folder A few of these were moved into the cypress folder as they're cypress-specific. I tried to update all the relative paths but some are likely broken. I'm not going to know until other stuff is fixed, though. --- x-pack/legacy/plugins/siem/cypress.json | 8 -------- x-pack/legacy/plugins/siem/index.ts | 2 +- x-pack/legacy/plugins/siem/package.json | 10 ++-------- .../rules/fetch_index_patterns.test.tsx | 2 +- .../containers/events/last_event_time/mock.ts | 2 +- .../containers/hosts/first_last_seen/mock.ts | 2 +- .../siem/public/containers/source/mock.ts | 2 +- .../plugins/siem/public/mock/kibana_react.ts | 2 +- .../legacy/plugins/siem/reporter_config.json | 10 ---------- x-pack/plugins/siem/.gitattributes | 4 ++++ .../siem/common}/default_index_pattern.ts | 0 x-pack/plugins/siem/cypress/cypress.json | 8 ++++++++ .../plugins/siem/cypress/reporter_config.json | 10 ++++++++++ x-pack/plugins/siem/package.json | 20 +++++++++++++++++++ .../extract_tactics_techniques_mitre.js | 8 +++++++- .../scripts/generate_types_from_graphql.js | 13 +++++++++--- x-pack/plugins/siem/tsconfig.json | 3 +++ .../apis/siem/overview_host.ts | 2 +- 18 files changed, 71 insertions(+), 37 deletions(-) delete mode 100644 x-pack/legacy/plugins/siem/cypress.json delete mode 100644 x-pack/legacy/plugins/siem/reporter_config.json create mode 100644 x-pack/plugins/siem/.gitattributes rename x-pack/{legacy/plugins/siem => plugins/siem/common}/default_index_pattern.ts (100%) create mode 100644 x-pack/plugins/siem/cypress/cypress.json create mode 100644 x-pack/plugins/siem/cypress/reporter_config.json create mode 100644 x-pack/plugins/siem/package.json create mode 100644 x-pack/plugins/siem/tsconfig.json diff --git a/x-pack/legacy/plugins/siem/cypress.json b/x-pack/legacy/plugins/siem/cypress.json deleted file mode 100644 index a0333a106814..000000000000 --- a/x-pack/legacy/plugins/siem/cypress.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "baseUrl": "http://localhost:5601", - "defaultCommandTimeout": 120000, - "screenshotsFolder": "../../../../target/kibana-siem/cypress/screenshots", - "trashAssetsBeforeRuns": false, - "video": false, - "videosFolder": "../../../../target/kibana-siem/cypress/videos" -} diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 1a36cd3bbc2b..434eccb9292b 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -31,7 +31,7 @@ import { IP_REPUTATION_LINKS_SETTING, IP_REPUTATION_LINKS_SETTING_DEFAULT, } from '../../../plugins/siem/common/constants'; -import { defaultIndexPattern } from './default_index_pattern'; +import { defaultIndexPattern } from '../../../plugins/siem/common/default_index_pattern'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/utils'; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/x-pack/legacy/plugins/siem/package.json b/x-pack/legacy/plugins/siem/package.json index 472a473842f0..3a93beef963a 100644 --- a/x-pack/legacy/plugins/siem/package.json +++ b/x-pack/legacy/plugins/siem/package.json @@ -1,16 +1,10 @@ { "author": "Elastic", - "name": "siem", + "name": "siem-legacy-ui", "version": "8.0.0", "private": true, "license": "Elastic-License", - "scripts": { - "extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js & node ../../../../scripts/eslint ./public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix", - "build-graphql-types": "node scripts/generate_types_from_graphql.js", - "cypress:open": "../../../node_modules/.bin/cypress open", - "cypress:run": "../../../node_modules/.bin/cypress run --spec ./cypress/integration/**/*.spec.ts --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./reporter_config.json; status=$?; ../../../node_modules/.bin/mochawesome-merge --reportDir ../../../../target/kibana-siem/cypress/results > ../../../../target/kibana-siem/cypress/results/output.json; ../../../../node_modules/.bin/marge ../../../../target/kibana-siem/cypress/results/output.json --reportDir ../../../../target/kibana-siem/cypress/results; mkdir -p ../../../../target/junit && cp ../../../../target/kibana-siem/cypress/results/*.xml ../../../../target/junit/ && exit $status;", - "cypress:run-as-ci": "node ../../../../scripts/functional_tests --config ../../../test/siem_cypress/config.ts" - }, + "scripts": {}, "devDependencies": { "@types/lodash": "^4.14.110", "@types/js-yaml": "^3.12.1", diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx index cad78ac56590..27d90531c99f 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx @@ -6,7 +6,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { defaultIndexPattern } from '../../../../default_index_pattern'; +import { defaultIndexPattern } from '../../../../../../../plugins/siem/common/default_index_pattern'; import { useApolloClient } from '../../../utils/apollo_context'; import { mocksSource } from '../../source/mock'; diff --git a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts b/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts index ca8786077851..73064b2ac604 100644 --- a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts +++ b/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../../default_index_pattern'; +import { defaultIndexPattern } from '../../../../../../../plugins/siem/common/default_index_pattern'; import { GetLastEventTimeQuery, LastEventIndexKey } from '../../../graphql/types'; import { LastEventTimeGqlQuery } from './last_event_time.gql_query'; diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts b/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts index 2c9d418763e8..d0385015ce4c 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts +++ b/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../../default_index_pattern'; +import { defaultIndexPattern } from '../../../../../../../plugins/siem/common/default_index_pattern'; import { GetHostFirstLastSeenQuery } from '../../../graphql/types'; import { HostFirstLastSeenGqlQuery } from './first_last_seen.gql_query'; diff --git a/x-pack/legacy/plugins/siem/public/containers/source/mock.ts b/x-pack/legacy/plugins/siem/public/containers/source/mock.ts index 738c1681f40a..652f6a7fbc3b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/source/mock.ts +++ b/x-pack/legacy/plugins/siem/public/containers/source/mock.ts @@ -6,7 +6,7 @@ import { BrowserFields } from '.'; import { sourceQuery } from './index.gql_query'; -import { defaultIndexPattern } from '../../../default_index_pattern'; +import { defaultIndexPattern } from '../../../../../../plugins/siem/common/default_index_pattern'; export const mocksSource = [ { diff --git a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts b/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts index 384ba28c7c80..d5d17f2c041d 100644 --- a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts +++ b/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts @@ -24,7 +24,7 @@ import { DEFAULT_INTERVAL_VALUE, DEFAULT_BYTES_FORMAT, } from '../../../../../plugins/siem/common/constants'; -import { defaultIndexPattern } from '../../default_index_pattern'; +import { defaultIndexPattern } from '../../../../../plugins/siem/common/default_index_pattern'; import { createKibanaCoreStartMock, createKibanaPluginsStartMock } from './kibana_core'; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/x-pack/legacy/plugins/siem/reporter_config.json b/x-pack/legacy/plugins/siem/reporter_config.json deleted file mode 100644 index dda68d501f97..000000000000 --- a/x-pack/legacy/plugins/siem/reporter_config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "reporterEnabled": "mochawesome, mocha-junit-reporter", - "reporterOptions": { - "html": false, - "json": true, - "mochaFile": "../../../../target/kibana-siem/cypress/results/TEST-siem-cypress-[hash].xml", - "overwrite": false, - "reportDir": "../../../../target/kibana-siem/cypress/results" - } -} diff --git a/x-pack/plugins/siem/.gitattributes b/x-pack/plugins/siem/.gitattributes new file mode 100644 index 000000000000..96ab5dadbda1 --- /dev/null +++ b/x-pack/plugins/siem/.gitattributes @@ -0,0 +1,4 @@ +# Auto-collapse generated files in GitHub +# https://help.github.com/en/articles/customizing-how-changed-files-appear-on-github +x-pack/plugins/siem/server/graphql/types.ts linguist-generated=true + diff --git a/x-pack/legacy/plugins/siem/default_index_pattern.ts b/x-pack/plugins/siem/common/default_index_pattern.ts similarity index 100% rename from x-pack/legacy/plugins/siem/default_index_pattern.ts rename to x-pack/plugins/siem/common/default_index_pattern.ts diff --git a/x-pack/plugins/siem/cypress/cypress.json b/x-pack/plugins/siem/cypress/cypress.json new file mode 100644 index 000000000000..7a4efba8c2d6 --- /dev/null +++ b/x-pack/plugins/siem/cypress/cypress.json @@ -0,0 +1,8 @@ +{ + "baseUrl": "http://localhost:5601", + "defaultCommandTimeout": 120000, + "screenshotsFolder": "../../../target/kibana-siem/cypress/screenshots", + "trashAssetsBeforeRuns": false, + "video": false, + "videosFolder": "../../../target/kibana-siem/cypress/videos" +} diff --git a/x-pack/plugins/siem/cypress/reporter_config.json b/x-pack/plugins/siem/cypress/reporter_config.json new file mode 100644 index 000000000000..e7e08eeae1da --- /dev/null +++ b/x-pack/plugins/siem/cypress/reporter_config.json @@ -0,0 +1,10 @@ +{ + "reporterEnabled": "mochawesome, mocha-junit-reporter", + "reporterOptions": { + "html": false, + "json": true, + "mochaFile": "../../../target/kibana-siem/cypress/results/TEST-siem-cypress-[hash].xml", + "overwrite": false, + "reportDir": "../../../target/kibana-siem/cypress/results" + } +} diff --git a/x-pack/plugins/siem/package.json b/x-pack/plugins/siem/package.json new file mode 100644 index 000000000000..1fcef4624362 --- /dev/null +++ b/x-pack/plugins/siem/package.json @@ -0,0 +1,20 @@ +{ + "author": "Elastic", + "name": "siem", + "version": "8.0.0", + "private": true, + "license": "Elastic-License", + "scripts": { + "extract-mitre-attacks": "node scripts/extract_tactics_techniques_mitre.js & node ../../../scripts/eslint ../../legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts --fix", + "build-graphql-types": "node scripts/generate_types_from_graphql.js", + "cypress:open": "cypress open --config-file ./cypress/cypress.json", + "cypress:run": "cypress run --spec ./cypress/integration/**/*.spec.ts --config-file ./cypress/cypress.json --reporter ../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; ../../node_modules/.bin/mochawesome-merge --reportDir ../../../target/kibana-siem/cypress/results > ../../../target/kibana-siem/cypress/results/output.json; ../../../node_modules/.bin/marge ../../../target/kibana-siem/cypress/results/output.json --reportDir ../../../target/kibana-siem/cypress/results; mkdir -p ../../../target/junit && cp ../../../target/kibana-siem/cypress/results/*.xml ../../../target/junit/ && exit $status;", + "cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/siem_cypress/config.ts" + }, + "devDependencies": { + "@types/lodash": "^4.14.110" + }, + "dependencies": { + "lodash": "^4.17.15" + } +} diff --git a/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js b/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js index d4edee2cdfe4..478463b1a806 100644 --- a/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js +++ b/x-pack/plugins/siem/scripts/extract_tactics_techniques_mitre.js @@ -12,7 +12,13 @@ const fetch = require('node-fetch'); const { camelCase } = require('lodash'); const { resolve } = require('path'); -const OUTPUT_DIRECTORY = resolve('public', 'pages', 'detection_engine', 'mitre'); +const OUTPUT_DIRECTORY = resolve( + '../../legacy/plugins/siem', + 'public', + 'pages', + 'detection_engine', + 'mitre' +); const MITRE_ENTREPRISE_ATTACK_URL = 'https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json'; diff --git a/x-pack/plugins/siem/scripts/generate_types_from_graphql.js b/x-pack/plugins/siem/scripts/generate_types_from_graphql.js index e6b063dfd2c0..bded8832aba5 100644 --- a/x-pack/plugins/siem/scripts/generate_types_from_graphql.js +++ b/x-pack/plugins/siem/scripts/generate_types_from_graphql.js @@ -10,12 +10,19 @@ const { join, resolve } = require('path'); // eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved const { generate } = require('graphql-code-generator'); +const legacyPluginPath = '../../legacy/plugins/siem'; + const GRAPHQL_GLOBS = [ - join('public', 'containers', '**', '*.gql_query.ts{,x}'), + join(legacyPluginPath, 'public', 'containers', '**', '*.gql_query.ts{,x}'), join('common', 'graphql', '**', '*.gql_query.ts{,x}'), ]; -const OUTPUT_INTROSPECTION_PATH = resolve('public', 'graphql', 'introspection.json'); -const OUTPUT_CLIENT_TYPES_PATH = resolve('public', 'graphql', 'types.ts'); +const OUTPUT_INTROSPECTION_PATH = resolve( + legacyPluginPath, + 'public', + 'graphql', + 'introspection.json' +); +const OUTPUT_CLIENT_TYPES_PATH = resolve(legacyPluginPath, 'public', 'graphql', 'types.ts'); const OUTPUT_SERVER_TYPES_PATH = resolve('server', 'graphql', 'types.ts'); const SCHEMA_PATH = resolve(__dirname, 'combined_schema.ts'); diff --git a/x-pack/plugins/siem/tsconfig.json b/x-pack/plugins/siem/tsconfig.json new file mode 100644 index 000000000000..4082f16a5d91 --- /dev/null +++ b/x-pack/plugins/siem/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.json" +} diff --git a/x-pack/test/api_integration/apis/siem/overview_host.ts b/x-pack/test/api_integration/apis/siem/overview_host.ts index d32eeaec884f..b116deb879ca 100644 --- a/x-pack/test/api_integration/apis/siem/overview_host.ts +++ b/x-pack/test/api_integration/apis/siem/overview_host.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { overviewHostQuery } from '../../../../legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query'; import { GetOverviewHostQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; -import { defaultIndexPattern } from '../../../../legacy/plugins/siem/default_index_pattern'; +import { defaultIndexPattern } from '../../../../plugins/siem/common/default_index_pattern'; export default function({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); From 1b36855279e6e463893d336382a52c994a718b1e Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sun, 12 Apr 2020 17:46:50 -0500 Subject: [PATCH 07/20] Move value for siem index pattern into common/constants The other default values live in there, this is no different. --- x-pack/legacy/plugins/siem/index.ts | 4 ++-- .../rules/fetch_index_patterns.test.tsx | 6 +++--- .../public/containers/events/last_event_time/mock.ts | 4 ++-- .../public/containers/hosts/first_last_seen/mock.ts | 4 ++-- .../plugins/siem/public/containers/source/mock.ts | 9 +++++---- .../legacy/plugins/siem/public/mock/kibana_react.ts | 4 ++-- x-pack/plugins/siem/common/constants.ts | 10 ++++++++++ .../signals/get_input_output_index.test.ts | 11 +++++------ .../signals/get_input_output_index.ts | 5 ++--- x-pack/plugins/siem/server/lib/events/mock.ts | 4 ++-- x-pack/plugins/siem/server/lib/hosts/mock.ts | 9 ++++----- x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts | 8 ++++---- x-pack/plugins/siem/server/lib/kpi_network/mock.ts | 4 ++-- .../plugins/siem/server/lib/matrix_histogram/mock.ts | 4 ++-- x-pack/plugins/siem/server/lib/network/mock.ts | 4 ++-- x-pack/plugins/siem/server/lib/overview/mock.ts | 4 ++-- .../siem/server/lib/sources/configuration.test.ts | 5 ++--- .../server/utils/build_query/create_options.test.ts | 8 ++++---- .../test/api_integration/apis/siem/overview_host.ts | 5 +++-- 19 files changed, 60 insertions(+), 52 deletions(-) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 434eccb9292b..4d12276035d7 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -30,8 +30,8 @@ import { SIGNALS_INDEX_KEY, IP_REPUTATION_LINKS_SETTING, IP_REPUTATION_LINKS_SETTING_DEFAULT, + DEFAULT_INDEX_PATTERN, } from '../../../plugins/siem/common/constants'; -import { defaultIndexPattern } from '../../../plugins/siem/common/default_index_pattern'; import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/utils'; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -102,7 +102,7 @@ export const siem = (kibana: any) => { name: i18n.translate('xpack.siem.uiSettings.defaultIndexLabel', { defaultMessage: 'Elasticsearch indices', }), - value: defaultIndexPattern, + value: DEFAULT_INDEX_PATTERN, description: i18n.translate('xpack.siem.uiSettings.defaultIndexDescription', { defaultMessage: '

Comma-delimited list of Elasticsearch indices from which the SIEM app collects events.

', diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx index 27d90531c99f..83b8a3581a4b 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/fetch_index_patterns.test.tsx @@ -6,7 +6,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { defaultIndexPattern } from '../../../../../../../plugins/siem/common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../../../../../plugins/siem/common/constants'; import { useApolloClient } from '../../../utils/apollo_context'; import { mocksSource } from '../../source/mock'; @@ -25,7 +25,7 @@ describe('useFetchIndexPatterns', () => { query: () => Promise.resolve(mocksSource[0].result), })); const { result, waitForNextUpdate } = renderHook(() => - useFetchIndexPatterns(defaultIndexPattern) + useFetchIndexPatterns(DEFAULT_INDEX_PATTERN) ); await waitForNextUpdate(); await waitForNextUpdate(); @@ -429,7 +429,7 @@ describe('useFetchIndexPatterns', () => { query: () => Promise.reject(new Error('Something went wrong')), })); const { result, waitForNextUpdate } = renderHook(() => - useFetchIndexPatterns(defaultIndexPattern) + useFetchIndexPatterns(DEFAULT_INDEX_PATTERN) ); await waitForNextUpdate(); diff --git a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts b/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts index 73064b2ac604..5ef8e67deddd 100644 --- a/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts +++ b/x-pack/legacy/plugins/siem/public/containers/events/last_event_time/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../../../../../plugins/siem/common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../../../../../plugins/siem/common/constants'; import { GetLastEventTimeQuery, LastEventIndexKey } from '../../../graphql/types'; import { LastEventTimeGqlQuery } from './last_event_time.gql_query'; @@ -43,7 +43,7 @@ export const mockLastEventTimeQuery: MockLastEventTimeQuery[] = [ sourceId: 'default', indexKey: LastEventIndexKey.hosts, details: {}, - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, }, }, result: { diff --git a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts b/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts index d0385015ce4c..7376f38ae8d0 100644 --- a/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts +++ b/x-pack/legacy/plugins/siem/public/containers/hosts/first_last_seen/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../../../../../plugins/siem/common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../../../../../plugins/siem/common/constants'; import { GetHostFirstLastSeenQuery } from '../../../graphql/types'; import { HostFirstLastSeenGqlQuery } from './first_last_seen.gql_query'; @@ -34,7 +34,7 @@ export const mockFirstLastSeenHostQuery: MockedProvidedQuery[] = [ variables: { sourceId: 'default', hostName: 'kibana-siem', - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, }, }, result: { diff --git a/x-pack/legacy/plugins/siem/public/containers/source/mock.ts b/x-pack/legacy/plugins/siem/public/containers/source/mock.ts index 652f6a7fbc3b..805c69f7fcc1 100644 --- a/x-pack/legacy/plugins/siem/public/containers/source/mock.ts +++ b/x-pack/legacy/plugins/siem/public/containers/source/mock.ts @@ -4,9 +4,10 @@ * you may not use this file except in compliance with the Elastic License. */ +import { DEFAULT_INDEX_PATTERN } from '../../../../../../plugins/siem/common/constants'; + import { BrowserFields } from '.'; import { sourceQuery } from './index.gql_query'; -import { defaultIndexPattern } from '../../../../../../plugins/siem/common/default_index_pattern'; export const mocksSource = [ { @@ -14,7 +15,7 @@ export const mocksSource = [ query: sourceQuery, variables: { sourceId: 'default', - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, }, }, result: { @@ -333,7 +334,7 @@ export const mocksSource = [ 'event.end contains the date when the event ended or when the activity was last observed.', example: null, format: '', - indexes: defaultIndexPattern, + indexes: DEFAULT_INDEX_PATTERN, name: 'event.end', searchable: true, type: 'date', @@ -661,7 +662,7 @@ export const mockBrowserFields: BrowserFields = { 'event.end contains the date when the event ended or when the activity was last observed.', example: null, format: '', - indexes: defaultIndexPattern, + indexes: DEFAULT_INDEX_PATTERN, name: 'event.end', searchable: true, type: 'date', diff --git a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts b/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts index d5d17f2c041d..db7a931b3fb1 100644 --- a/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts +++ b/x-pack/legacy/plugins/siem/public/mock/kibana_react.ts @@ -23,8 +23,8 @@ import { DEFAULT_INTERVAL_PAUSE, DEFAULT_INTERVAL_VALUE, DEFAULT_BYTES_FORMAT, + DEFAULT_INDEX_PATTERN, } from '../../../../../plugins/siem/common/constants'; -import { defaultIndexPattern } from '../../../../../plugins/siem/common/default_index_pattern'; import { createKibanaCoreStartMock, createKibanaPluginsStartMock } from './kibana_core'; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -39,7 +39,7 @@ export const mockUiSettings: Record = { pause: DEFAULT_INTERVAL_PAUSE, value: DEFAULT_INTERVAL_VALUE, }, - [DEFAULT_INDEX_KEY]: defaultIndexPattern, + [DEFAULT_INDEX_KEY]: DEFAULT_INDEX_PATTERN, [DEFAULT_BYTES_FORMAT]: '0,0.[0]b', [DEFAULT_DATE_FORMAT_TZ]: 'UTC', [DEFAULT_DATE_FORMAT]: 'MMM D, YYYY @ HH:mm:ss.SSS', diff --git a/x-pack/plugins/siem/common/constants.ts b/x-pack/plugins/siem/common/constants.ts index 22f1b3beffa3..ccdf60b8eb26 100644 --- a/x-pack/plugins/siem/common/constants.ts +++ b/x-pack/plugins/siem/common/constants.ts @@ -29,6 +29,16 @@ export const DEFAULT_INTERVAL_TYPE = 'manual'; export const DEFAULT_INTERVAL_VALUE = 300000; // ms export const DEFAULT_TIMEPICKER_QUICK_RANGES = 'timepicker:quickRanges'; +/** The comma-delimited list of Elasticsearch indices from which the SIEM app collects events */ +export const DEFAULT_INDEX_PATTERN = [ + 'apm-*-transaction*', + 'auditbeat-*', + 'endgame-*', + 'filebeat-*', + 'packetbeat-*', + 'winlogbeat-*', +]; + /** This Kibana Advanced Setting enables the `Security news` feed widget */ export const ENABLE_NEWS_FEED_SETTING = 'siem:enableNewsFeed'; diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts index c734eedf0661..6fc99ada16ec 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.test.ts @@ -5,8 +5,7 @@ */ import { alertsMock, AlertServicesMock } from '../../../../../alerting/server/mocks'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; -import { defaultIndexPattern } from '../../../../common/default_index_pattern'; +import { DEFAULT_INDEX_KEY, DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { getInputIndex } from './get_input_output_index'; describe('get_input_output_index', () => { @@ -78,7 +77,7 @@ describe('get_input_output_index', () => { }, })); const inputIndex = await getInputIndex(servicesMock, '8.0.0', null); - expect(inputIndex).toEqual(defaultIndexPattern); + expect(inputIndex).toEqual(DEFAULT_INDEX_PATTERN); }); test('Returns a saved object inputIndex default from constants if inputIndex passed in is undefined and the key is also null', async () => { @@ -91,17 +90,17 @@ describe('get_input_output_index', () => { }, })); const inputIndex = await getInputIndex(servicesMock, '8.0.0', undefined); - expect(inputIndex).toEqual(defaultIndexPattern); + expect(inputIndex).toEqual(DEFAULT_INDEX_PATTERN); }); test('Returns a saved object inputIndex default from constants if both passed in inputIndex and configuration attributes are missing and the index is undefined', async () => { const inputIndex = await getInputIndex(servicesMock, '8.0.0', undefined); - expect(inputIndex).toEqual(defaultIndexPattern); + expect(inputIndex).toEqual(DEFAULT_INDEX_PATTERN); }); test('Returns a saved object inputIndex default from constants if both passed in inputIndex and configuration attributes are missing and the index is null', async () => { const inputIndex = await getInputIndex(servicesMock, '8.0.0', null); - expect(inputIndex).toEqual(defaultIndexPattern); + expect(inputIndex).toEqual(DEFAULT_INDEX_PATTERN); }); }); }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts index 36cf4f5485e9..85e3eeac476e 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/signals/get_input_output_index.ts @@ -4,9 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { DEFAULT_INDEX_KEY, DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { AlertServices } from '../../../../../alerting/server'; -import { defaultIndexPattern } from '../../../../common/default_index_pattern'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; export const getInputIndex = async ( services: AlertServices, @@ -22,7 +21,7 @@ export const getInputIndex = async ( if (configuration.attributes != null && configuration.attributes[DEFAULT_INDEX_KEY] != null) { return configuration.attributes[DEFAULT_INDEX_KEY]; } else { - return defaultIndexPattern; + return DEFAULT_INDEX_PATTERN; } } }; diff --git a/x-pack/plugins/siem/server/lib/events/mock.ts b/x-pack/plugins/siem/server/lib/events/mock.ts index c72ac516c1f8..f5fb2f481ca7 100644 --- a/x-pack/plugins/siem/server/lib/events/mock.ts +++ b/x-pack/plugins/siem/server/lib/events/mock.ts @@ -5,7 +5,7 @@ */ import { cloneDeep } from 'lodash/fp'; -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { RequestDetailsOptions } from './types'; export const mockResponseSearchTimelineDetails = { @@ -185,7 +185,7 @@ export const mockResponseSearchTimelineDetails = { export const mockOptions: RequestDetailsOptions = { indexName: 'auditbeat-8.0.0-2019.03.29-000003', eventId: 'TUfUymkBCQofM5eXGBYL', - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, }; export const mockRequest = { diff --git a/x-pack/plugins/siem/server/lib/hosts/mock.ts b/x-pack/plugins/siem/server/lib/hosts/mock.ts index 7bb7bc20a5ac..30082990b55f 100644 --- a/x-pack/plugins/siem/server/lib/hosts/mock.ts +++ b/x-pack/plugins/siem/server/lib/hosts/mock.ts @@ -4,9 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { Direction, HostsFields } from '../../graphql/types'; -import { defaultIndexPattern } from '../../../common/default_index_pattern'; - import { HostOverviewRequestOptions, HostLastFirstSeenRequestOptions, @@ -14,7 +13,7 @@ import { } from '.'; export const mockGetHostsOptions: HostsRequestOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', @@ -297,7 +296,7 @@ export const mockGetHostOverviewOptions: HostOverviewRequestOptions = { }, }, timerange: { interval: '12h', to: 1554824274610, from: 1554737874610 }, - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, fields: [ '_id', 'host.architecture', @@ -501,7 +500,7 @@ export const mockGetHostOverviewResult = { }; export const mockGetHostLastFirstSeenOptions: HostLastFirstSeenRequestOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', diff --git a/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts b/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts index 4a2edc54a594..a5affea2842a 100644 --- a/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts +++ b/x-pack/plugins/siem/server/lib/kpi_hosts/mock.ts @@ -4,14 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { RequestBasicOptions } from '../framework/types'; const FROM = new Date('2019-05-03T13:24:00.660Z').valueOf(); const TO = new Date('2019-05-04T13:24:00.660Z').valueOf(); export const mockKpiHostsOptions: RequestBasicOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', @@ -27,7 +27,7 @@ export const mockKpiHostsOptions: RequestBasicOptions = { }; export const mockKpiHostDetailsOptions: RequestBasicOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', @@ -290,7 +290,7 @@ export const mockKpiHostsResponse = { export const mockKpiHostsResponseNodata = { responses: [null, null, null] }; const mockMsearchHeader = { - index: defaultIndexPattern, + index: DEFAULT_INDEX_PATTERN, allowNoIndices: true, ignoreUnavailable: true, }; diff --git a/x-pack/plugins/siem/server/lib/kpi_network/mock.ts b/x-pack/plugins/siem/server/lib/kpi_network/mock.ts index 6f0382ddd739..cc0849ccdf1d 100644 --- a/x-pack/plugins/siem/server/lib/kpi_network/mock.ts +++ b/x-pack/plugins/siem/server/lib/kpi_network/mock.ts @@ -4,11 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { RequestBasicOptions } from '../framework/types'; export const mockOptions: RequestBasicOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', diff --git a/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts b/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts index ea60858207a3..1d1ebfff936d 100644 --- a/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts +++ b/x-pack/plugins/siem/server/lib/matrix_histogram/mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { HistogramType } from '../../graphql/types'; export const mockAlertsHistogramDataResponse = { @@ -111,7 +111,7 @@ export const mockOptions = { to: 9999, from: 1234, }, - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, filterQuery: '', stackByField: 'event.module', histogramType: HistogramType.alerts, diff --git a/x-pack/plugins/siem/server/lib/network/mock.ts b/x-pack/plugins/siem/server/lib/network/mock.ts index dc079438455d..38e82a4f19dc 100644 --- a/x-pack/plugins/siem/server/lib/network/mock.ts +++ b/x-pack/plugins/siem/server/lib/network/mock.ts @@ -4,13 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { Direction, FlowTargetSourceDest, NetworkTopTablesFields } from '../../graphql/types'; import { NetworkTopNFlowRequestOptions } from '.'; export const mockOptions: NetworkTopNFlowRequestOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', diff --git a/x-pack/plugins/siem/server/lib/overview/mock.ts b/x-pack/plugins/siem/server/lib/overview/mock.ts index e336164a710f..51d8a258569a 100644 --- a/x-pack/plugins/siem/server/lib/overview/mock.ts +++ b/x-pack/plugins/siem/server/lib/overview/mock.ts @@ -4,11 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { RequestBasicOptions } from '../framework/types'; export const mockOptionsNetwork: RequestBasicOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { container: 'docker.container.name', diff --git a/x-pack/plugins/siem/server/lib/sources/configuration.test.ts b/x-pack/plugins/siem/server/lib/sources/configuration.test.ts index b01327b0aaf2..00fca7b77de4 100644 --- a/x-pack/plugins/siem/server/lib/sources/configuration.test.ts +++ b/x-pack/plugins/siem/server/lib/sources/configuration.test.ts @@ -4,9 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { InmemoryConfigurationAdapter } from '../configuration/inmemory_configuration_adapter'; -import { defaultIndexPattern } from '../../../common/default_index_pattern'; - import { ConfigurationSourcesAdapter } from './configuration'; import { PartialSourceConfiguration } from './types'; @@ -76,7 +75,7 @@ describe('the ConfigurationSourcesAdapter', () => { new InmemoryConfigurationAdapter({ sources: { sourceOne: { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, fields: { container: 'DIFFERENT_CONTAINER_FIELD', }, diff --git a/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts b/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts index 3a98395d122f..5ca67ad6ae51 100644 --- a/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts +++ b/x-pack/plugins/siem/server/utils/build_query/create_options.test.ts @@ -6,7 +6,7 @@ import { omit } from 'lodash/fp'; -import { defaultIndexPattern } from '../../../common/default_index_pattern'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; import { Direction } from '../../graphql/types'; import { RequestOptions } from '../../lib/framework'; @@ -30,7 +30,7 @@ describe('createOptions', () => { }, }; args = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, pagination: { limit: 5, }, @@ -57,7 +57,7 @@ describe('createOptions', () => { test('should create options given all input including sort field', () => { const options = createOptions(source, args, info); const expected: RequestOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { host: 'host-1', @@ -87,7 +87,7 @@ describe('createOptions', () => { const argsWithoutSort: Args = omit('sortField', args); const options = createOptions(source, argsWithoutSort, info); const expected: RequestOptions = { - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, sourceConfiguration: { fields: { host: 'host-1', diff --git a/x-pack/test/api_integration/apis/siem/overview_host.ts b/x-pack/test/api_integration/apis/siem/overview_host.ts index b116deb879ca..7e5cbd7673af 100644 --- a/x-pack/test/api_integration/apis/siem/overview_host.ts +++ b/x-pack/test/api_integration/apis/siem/overview_host.ts @@ -5,10 +5,11 @@ */ import expect from '@kbn/expect'; + +import { DEFAULT_INDEX_PATTERN } from '../../../../plugins/siem/common/constants'; import { overviewHostQuery } from '../../../../legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query'; import { GetOverviewHostQuery } from '../../../../legacy/plugins/siem/public/graphql/types'; import { FtrProviderContext } from '../../ftr_provider_context'; -import { defaultIndexPattern } from '../../../../plugins/siem/common/default_index_pattern'; export default function({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); @@ -51,7 +52,7 @@ export default function({ getService }: FtrProviderContext) { to: TO, from: FROM, }, - defaultIndex: defaultIndexPattern, + defaultIndex: DEFAULT_INDEX_PATTERN, inspect: false, }, }) From e528beaeea95ea0243749cf259d3ea32046dfe6d Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sun, 12 Apr 2020 18:06:23 -0500 Subject: [PATCH 08/20] Update paths following file move If this was referencing the full project, it now references both paths (legacy for UI, and NP for server). --- .eslintrc.js | 4 ++-- Jenkinsfile | 2 +- src/cli/cluster/cluster_manager.ts | 2 +- src/dev/storybook/aliases.ts | 2 +- src/dev/typescript/projects.ts | 2 +- test/scripts/jenkins_xpack.sh | 2 +- x-pack/.i18nrc.json | 2 +- x-pack/legacy/plugins/siem/.gitattributes | 1 - x-pack/plugins/siem/cypress/README.md | 16 ++++++++-------- .../siem/scripts/optimize_tsconfig/README.md | 4 ++-- .../siem/scripts/optimize_tsconfig/paths.js | 2 +- .../siem/scripts/optimize_tsconfig/tsconfig.json | 2 +- .../siem/server/lib/detection_engine/README.md | 4 ++-- x-pack/test/siem_cypress/runner.ts | 2 +- x-pack/tsconfig.json | 2 +- 15 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index dc2eaa993ce8..a2b8ae7622d0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -567,7 +567,7 @@ module.exports = { }, { // typescript only for front and back end - files: ['x-pack/legacy/plugins/siem/**/*.{ts,tsx}'], + files: ['x-pack/{,legacy/}plugins/siem/**/*.{ts,tsx}'], rules: { // This will be turned on after bug fixes are complete // '@typescript-eslint/explicit-member-accessibility': 'warn', @@ -613,7 +613,7 @@ module.exports = { // }, { // typescript and javascript for front and back end - files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'], + files: ['x-pack/{,legacy/}plugins/siem/**/*.{js,ts,tsx}'], plugins: ['eslint-plugin-node', 'react'], env: { mocha: true, diff --git a/Jenkinsfile b/Jenkinsfile index 79d3c93006cb..6646ee15ba1c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,7 +41,7 @@ kibanaPipeline(timeoutMinutes: 135, checkPrChanges: true) { 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10), 'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'), 'xpack-siemCypress': { processNumber -> - whenChanged(['x-pack/legacy/plugins/siem/', 'x-pack/test/siem_cypress/']) { + whenChanged(['x-pack/plugins/siem/', 'x-pack/legacy/plugins/siem/', 'x-pack/test/siem_cypress/']) { kibanaPipeline.functionalTestProcess('xpack-siemCypress', './test/scripts/jenkins_siem_cypress.sh')(processNumber) } }, diff --git a/src/cli/cluster/cluster_manager.ts b/src/cli/cluster/cluster_manager.ts index 44b6c39556af..a87e2aa11f2c 100644 --- a/src/cli/cluster/cluster_manager.ts +++ b/src/cli/cluster/cluster_manager.ts @@ -263,7 +263,7 @@ export class ClusterManager { ...pluginInternalDirsIgnore, fromRoot('src/legacy/server/sass/__tmp__'), fromRoot('x-pack/legacy/plugins/reporting/.chromium'), - fromRoot('x-pack/legacy/plugins/siem/cypress'), + fromRoot('x-pack/plugins/siem/cypress'), fromRoot('x-pack/legacy/plugins/apm/e2e'), fromRoot('x-pack/legacy/plugins/apm/scripts'), fromRoot('x-pack/legacy/plugins/canvas/canvas_plugin_src'), // prevents server from restarting twice for Canvas plugin changes, diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 8ed64f004c9b..43114b2edccf 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -24,6 +24,6 @@ export const storybookAliases = { drilldowns: 'x-pack/plugins/drilldowns/scripts/storybook.js', embeddable: 'src/plugins/embeddable/scripts/storybook.js', infra: 'x-pack/legacy/plugins/infra/scripts/storybook.js', - siem: 'x-pack/legacy/plugins/siem/scripts/storybook.js', + siem: 'x-pack/plugins/siem/scripts/storybook.js', ui_actions: 'x-pack/plugins/advanced_ui_actions/scripts/storybook.js', }; diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index 34756912fc24..721474130826 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -27,7 +27,7 @@ export const PROJECTS = [ new Project(resolve(REPO_ROOT, 'test/tsconfig.json'), { name: 'kibana/test' }), new Project(resolve(REPO_ROOT, 'x-pack/tsconfig.json')), new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), { name: 'x-pack/test' }), - new Project(resolve(REPO_ROOT, 'x-pack/legacy/plugins/siem/cypress/tsconfig.json'), { + new Project(resolve(REPO_ROOT, 'x-pack/plugins/siem/cypress/tsconfig.json'), { name: 'siem/cypress', }), new Project(resolve(REPO_ROOT, 'x-pack/legacy/plugins/apm/e2e/tsconfig.json'), { diff --git a/test/scripts/jenkins_xpack.sh b/test/scripts/jenkins_xpack.sh index 7070fb1063cb..67d88b308ed9 100755 --- a/test/scripts/jenkins_xpack.sh +++ b/test/scripts/jenkins_xpack.sh @@ -17,7 +17,7 @@ if [[ -z "$CODE_COVERAGE" ]] ; then echo " -> Running SIEM cyclic dependency test" cd "$XPACK_DIR" - checks-reporter-with-killswitch "X-Pack SIEM cyclic dependency test" node legacy/plugins/siem/scripts/check_circular_deps + checks-reporter-with-killswitch "X-Pack SIEM cyclic dependency test" node plugins/siem/scripts/check_circular_deps echo "" echo "" diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 50f36ddd21c9..cb124cc54e5a 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -36,7 +36,7 @@ "xpack.searchProfiler": "plugins/searchprofiler", "xpack.security": ["legacy/plugins/security", "plugins/security"], "xpack.server": "legacy/server", - "xpack.siem": "legacy/plugins/siem", + "xpack.siem": ["plugins/siem", "legacy/plugins/siem"], "xpack.snapshotRestore": "plugins/snapshot_restore", "xpack.spaces": ["legacy/plugins/spaces", "plugins/spaces"], "xpack.taskManager": "legacy/plugins/task_manager", diff --git a/x-pack/legacy/plugins/siem/.gitattributes b/x-pack/legacy/plugins/siem/.gitattributes index f40e829b6545..a4071d39e63c 100644 --- a/x-pack/legacy/plugins/siem/.gitattributes +++ b/x-pack/legacy/plugins/siem/.gitattributes @@ -1,6 +1,5 @@ # Auto-collapse generated files in GitHub # https://help.github.com/en/articles/customizing-how-changed-files-appear-on-github x-pack/legacy/plugins/siem/public/graphql/types.ts linguist-generated=true -x-pack/legacy/plugins/siem/server/graphql/types.ts linguist-generated=true x-pack/legacy/plugins/siem/public/graphql/introspection.json linguist-generated=true diff --git a/x-pack/plugins/siem/cypress/README.md b/x-pack/plugins/siem/cypress/README.md index 89bafce9c9dc..1a200ec5315f 100644 --- a/x-pack/plugins/siem/cypress/README.md +++ b/x-pack/plugins/siem/cypress/README.md @@ -124,7 +124,7 @@ yarn kbn bootstrap 2. Launch Cypress command line test runner: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem yarn cypress:run-as-ci ``` @@ -193,7 +193,7 @@ We are using es_archiver in order to manage the data that our Cypress tests need 1. Setup if possible a clean instance of kibana and elasticsearch (if not, possible please try to clean the data that you are going to generate). 2. With the kibana and elasticsearch instance up and running, create the data that you need for your test. -3. When you are sure that you have all the data you need run the following command from: `x-pack/legacy/plugins/siem` +3. When you are sure that you have all the data you need run the following command from: `x-pack/plugins/siem` ```sh node ../../../../scripts/es_archiver save --dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url http://:@: @@ -236,7 +236,7 @@ yarn start --no-base-path `baseUrl`, as configured in `plugins/siem/cypress.json`: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem yarn cypress:open ``` @@ -245,7 +245,7 @@ yarn cypress:open test runner, as shown in the following example: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem CYPRESS_baseUrl=http://localhost:5601 yarn cypress:open ``` @@ -253,7 +253,7 @@ CYPRESS_baseUrl=http://localhost:5601 yarn cypress:open running tests interactively: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD= yarn cypress:open ``` @@ -285,7 +285,7 @@ yarn start --no-base-path `baseUrl`, as configured in `plugins/siem/cypress.json`: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem yarn cypress:run ``` @@ -294,7 +294,7 @@ yarn cypress:run the following example: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem CYPRESS_baseUrl=http://localhost:5601 yarn cypress:run ``` @@ -302,7 +302,7 @@ CYPRESS_baseUrl=http://localhost:5601 yarn cypress:run running via the command line: ```sh -cd x-pack/legacy/plugins/siem +cd x-pack/plugins/siem CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD= yarn cypress:run ``` diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md b/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md index d3615d2870ef..2b402367c1db 100644 --- a/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md +++ b/x-pack/plugins/siem/scripts/optimize_tsconfig/README.md @@ -8,9 +8,9 @@ Kibana and X-Pack are very large TypeScript projects, and it comes at a cost. Ed To run the optimization: -`$ node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig` +`$ node x-pack/plugins/siem/scripts/optimize_tsconfig` To undo the optimization: -`$ node x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig` +`$ node x-pack/plugins/siem/scripts/unoptimize_tsconfig` diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js b/x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js index ca26203e17d2..c75e16f74b93 100644 --- a/x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js +++ b/x-pack/plugins/siem/scripts/optimize_tsconfig/paths.js @@ -5,7 +5,7 @@ */ const path = require('path'); -const xpackRoot = path.resolve(__dirname, '../../../../..'); +const xpackRoot = path.resolve(__dirname, '../../../..'); const kibanaRoot = path.resolve(xpackRoot, '..'); const tsconfigTpl = path.resolve(__dirname, './tsconfig.json'); diff --git a/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json b/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json index c4705c8b8c16..42d26c4c27ed 100644 --- a/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json +++ b/x-pack/plugins/siem/scripts/optimize_tsconfig/tsconfig.json @@ -10,7 +10,7 @@ "exclude": [ "test/**/*", "**/__fixtures__/**/*", - "legacy/plugins/siem/cypress/**/*", + "plugins/siem/cypress/**/*", "**/typespec_tests.ts" ] } diff --git a/x-pack/plugins/siem/server/lib/detection_engine/README.md b/x-pack/plugins/siem/server/lib/detection_engine/README.md index 1e8e3d5e3dd7..610e82fd5f6e 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/README.md +++ b/x-pack/plugins/siem/server/lib/detection_engine/README.md @@ -46,7 +46,7 @@ server log [22:05:22.277] [info][status][plugin:alerting@8.0.0] Status changed f server log [22:05:22.270] [info][status][plugin:actions@8.0.0] Status changed from uninitialized to green - Ready ``` -Go to the scripts folder `cd kibana/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts` and run: +Go to the scripts folder `cd kibana/x-pack/plugins/siem/server/lib/detection_engine/scripts` and run: ```sh ./hard_reset.sh @@ -159,7 +159,7 @@ https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions To update the status of a signal or group of signals, the following scripts provide an example of how to go about doing so. -`cd x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts` +`cd x-pack/plugins/siem/server/lib/detection_engine/scripts` `./signals/put_signal_doc.sh` will post a sample signal doc into the signals index to play with `./signals/set_status_with_id.sh closed` will update the status of the sample signal to closed `./signals/set_status_with_id.sh open` will update the status of the sample signal to open diff --git a/x-pack/test/siem_cypress/runner.ts b/x-pack/test/siem_cypress/runner.ts index 2462f75d4d0a..b84e2953cc14 100644 --- a/x-pack/test/siem_cypress/runner.ts +++ b/x-pack/test/siem_cypress/runner.ts @@ -23,7 +23,7 @@ export async function SiemCypressTestRunner({ getService }: FtrProviderContext) await procs.run('cypress', { cmd: 'yarn', args: ['cypress:run'], - cwd: resolve(__dirname, '../../legacy/plugins/siem'), + cwd: resolve(__dirname, '../../plugins/siem'), env: { FORCE_COLOR: '1', CYPRESS_baseUrl: Url.format(config.get('servers.kibana')), diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index a6c94ff74620..e2da4853a0f4 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -11,7 +11,7 @@ ], "exclude": [ "test/**/*", - "legacy/plugins/siem/cypress/**/*", + "plugins/siem/cypress/**/*", "legacy/plugins/apm/e2e/cypress/**/*", "**/typespec_tests.ts" ], From 7faeeed3d1d850cef0d0e9d4a5d20ad7d2ce33af Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Sun, 12 Apr 2020 19:41:38 -0500 Subject: [PATCH 09/20] Replace Legacy Config with NP Config * Updates plugin to use NP config * defines new config previously coming from savedObjects config * cleans up legacy types Conflicts: x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts x-pack/plugins/siem/server/plugin.ts x-pack/plugins/siem/server/routes/index.ts x-pack/plugins/siem/server/types.ts --- x-pack/plugins/siem/server/client/client.ts | 10 +++------- x-pack/plugins/siem/server/client/factory.ts | 5 ++--- x-pack/plugins/siem/server/config.ts | 2 ++ .../routes/rules/export_rules_route.ts | 6 +++--- .../routes/rules/import_rules_route.ts | 8 ++++---- .../lib/timeline/routes/export_timelines_route.ts | 7 +++---- .../lib/timeline/routes/import_timelines_route.ts | 8 ++++---- x-pack/plugins/siem/server/plugin.ts | 15 +++++++++------ x-pack/plugins/siem/server/routes/index.ts | 4 ++-- x-pack/plugins/siem/server/types.ts | 5 ----- 10 files changed, 32 insertions(+), 38 deletions(-) diff --git a/x-pack/plugins/siem/server/client/client.ts b/x-pack/plugins/siem/server/client/client.ts index 245b81d0be97..6cb0d4cfade7 100644 --- a/x-pack/plugins/siem/server/client/client.ts +++ b/x-pack/plugins/siem/server/client/client.ts @@ -4,17 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Legacy } from 'kibana'; - -import { APP_ID, SIGNALS_INDEX_KEY } from '../../common/constants'; +import { ConfigType } from '..'; export class SiemClient { public readonly signalsIndex: string; - constructor(private spaceId: string, private config: Legacy.Server['config']) { - const configuredSignalsIndex = this.config().get( - `xpack.${APP_ID}.${SIGNALS_INDEX_KEY}` - ); + constructor(private spaceId: string, private config: ConfigType) { + const configuredSignalsIndex = this.config.signalsIndex; this.signalsIndex = `${configuredSignalsIndex}-${this.spaceId}`; } diff --git a/x-pack/plugins/siem/server/client/factory.ts b/x-pack/plugins/siem/server/client/factory.ts index d0335b333d01..d3d6b84e5b09 100644 --- a/x-pack/plugins/siem/server/client/factory.ts +++ b/x-pack/plugins/siem/server/client/factory.ts @@ -4,14 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Legacy } from 'kibana'; - import { KibanaRequest } from '../../../../../src/core/server'; import { SiemClient } from './client'; +import { ConfigType } from '..'; interface SetupDependencies { getSpaceId?: (request: KibanaRequest) => string | undefined; - config: Legacy.Server['config']; + config: ConfigType; } export class SiemClientFactory { diff --git a/x-pack/plugins/siem/server/config.ts b/x-pack/plugins/siem/server/config.ts index 44cc7b363c9d..ad8ab7923b16 100644 --- a/x-pack/plugins/siem/server/config.ts +++ b/x-pack/plugins/siem/server/config.ts @@ -11,6 +11,8 @@ import { SIGNALS_INDEX_KEY, DEFAULT_SIGNALS_INDEX } from '../common/constants'; export const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), + maxImportPayloadBytes: schema.number({ defaultValue: 10485760 }), + maxImportExportSize: schema.number({ defaultValue: 10000 }), [SIGNALS_INDEX_KEY]: schema.string({ defaultValue: DEFAULT_SIGNALS_INDEX }), }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts index 9b4d19876dba..38ae0e9c9eea 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -6,7 +6,7 @@ import { IRouter } from '../../../../../../../../src/core/server'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { LegacyServices } from '../../../../types'; +import { ConfigType } from '../../../..'; import { ExportRulesRequestParams } from '../../rules/types'; import { getNonPackagedRulesCount } from '../../rules/get_existing_prepackaged_rules'; import { exportRulesSchema, exportRulesQuerySchema } from '../schemas/export_rules_schema'; @@ -14,7 +14,7 @@ import { getExportByObjectIds } from '../../rules/get_export_by_object_ids'; import { getExportAll } from '../../rules/get_export_all'; import { transformError, buildRouteValidation, buildSiemResponse } from '../utils'; -export const exportRulesRoute = (router: IRouter, config: LegacyServices['config']) => { +export const exportRulesRoute = (router: IRouter, config: ConfigType) => { router.post( { path: `${DETECTION_ENGINE_RULES_URL}/_export`, @@ -35,7 +35,7 @@ export const exportRulesRoute = (router: IRouter, config: LegacyServices['config } try { - const exportSizeLimit = config().get('savedObjects.maxImportExportSize'); + const exportSizeLimit = config.maxImportExportSize; if (request.body?.objects != null && request.body.objects.length > exportSizeLimit) { return siemResponse.error({ statusCode: 400, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts index 318fedba25c6..6085cdb8156a 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -10,7 +10,7 @@ import { extname } from 'path'; import { IRouter } from '../../../../../../../../src/core/server'; import { createPromiseFromStreams } from '../../../../../../../../src/legacy/utils/streams'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { LegacyServices } from '../../../../types'; +import { ConfigType } from '../../../..'; import { createRules } from '../../rules/create_rules'; import { ImportRulesRequestParams } from '../../rules/types'; import { readRules } from '../../rules/read_rules'; @@ -38,7 +38,7 @@ type PromiseFromStreams = ImportRuleAlertRest | Error; const CHUNK_PARSED_OBJECT_SIZE = 10; -export const importRulesRoute = (router: IRouter, config: LegacyServices['config']) => { +export const importRulesRoute = (router: IRouter, config: ConfigType) => { router.post( { path: `${DETECTION_ENGINE_RULES_URL}/_import`, @@ -49,7 +49,7 @@ export const importRulesRoute = (router: IRouter, config: LegacyServices['config options: { tags: ['access:siem'], body: { - maxBytes: config().get('savedObjects.maxImportPayloadBytes'), + maxBytes: config.maxImportPayloadBytes, output: 'stream', }, }, @@ -77,7 +77,7 @@ export const importRulesRoute = (router: IRouter, config: LegacyServices['config }); } - const objectLimit = config().get('savedObjects.maxImportExportSize'); + const objectLimit = config.maxImportExportSize; const readStream = createRulesStreamFromNdJson(objectLimit); const parsedObjects = await createPromiseFromStreams([ request.body.file, diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts index 28aedc1087e1..7219372c6d84 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts @@ -8,8 +8,7 @@ import { set as _set } from 'lodash/fp'; import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { IRouter } from '../../../../../../../src/core/server'; -import { LegacyServices } from '../../../types'; - +import { ConfigType } from '../../..'; import { transformError, buildSiemResponse } from '../../detection_engine/routes/utils'; import { getExportTimelineByObjectIds } from './utils/export_timelines'; @@ -19,7 +18,7 @@ import { } from './schemas/export_timelines_schema'; import { buildRouteValidation } from '../../../utils/build_validation/route_validation'; -export const exportTimelinesRoute = (router: IRouter, config: LegacyServices['config']) => { +export const exportTimelinesRoute = (router: IRouter, config: ConfigType) => { router.post( { path: TIMELINE_EXPORT_URL, @@ -35,7 +34,7 @@ export const exportTimelinesRoute = (router: IRouter, config: LegacyServices['co try { const siemResponse = buildSiemResponse(response); const savedObjectsClient = context.core.savedObjects.client; - const exportSizeLimit = config().get('savedObjects.maxImportExportSize'); + const exportSizeLimit = config.maxImportExportSize; if (request.body?.ids != null && request.body.ids.length > exportSizeLimit) { return siemResponse.error({ diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts index c341b6467d0a..c840c11ff7ea 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts @@ -32,7 +32,7 @@ import { IRouter } from '../../../../../../../src/core/server'; import { SetupPlugins } from '../../../plugin'; import { ImportTimelinesPayloadSchemaRt } from './schemas/import_timelines_schema'; import { importRulesSchema } from '../../detection_engine/routes/schemas/response/import_rules_schema'; -import { LegacyServices } from '../../../types'; +import { ConfigType } from '../../..'; import { Timeline } from '../saved_object'; import { validate } from '../../detection_engine/routes/rules/validate'; @@ -44,7 +44,7 @@ const timelineLib = new Timeline(); export const importTimelinesRoute = ( router: IRouter, - config: LegacyServices['config'], + config: ConfigType, security: SetupPlugins['security'] ) => { router.post( @@ -56,7 +56,7 @@ export const importTimelinesRoute = ( options: { tags: ['access:siem'], body: { - maxBytes: config().get('savedObjects.maxImportPayloadBytes'), + maxBytes: config.maxImportPayloadBytes, output: 'stream', }, }, @@ -81,7 +81,7 @@ export const importTimelinesRoute = ( }); } - const objectLimit = config().get('savedObjects.maxImportExportSize'); + const objectLimit = config.maxImportExportSize; const readStream = createTimelinesStreamFromNdJson(objectLimit); const parsedObjects = await createPromiseFromStreams([ diff --git a/x-pack/plugins/siem/server/plugin.ts b/x-pack/plugins/siem/server/plugin.ts index dba9ce34bdd4..8b85cc7c7755 100644 --- a/x-pack/plugins/siem/server/plugin.ts +++ b/x-pack/plugins/siem/server/plugin.ts @@ -5,6 +5,7 @@ */ import { Observable } from 'rxjs'; +import { first } from 'rxjs/operators'; import { i18n } from '@kbn/i18n'; import { @@ -24,7 +25,6 @@ import { EncryptedSavedObjectsPluginSetup as EncryptedSavedObjectsSetup } from ' import { SpacesPluginSetup as SpacesSetup } from '../../spaces/server'; import { PluginStartContract as ActionsStart } from '../../actions/server'; import { LicensingPluginSetup } from '../../licensing/server'; -import { LegacyServices } from './types'; import { initServer } from './init_server'; import { compose } from './lib/compose/kibana'; import { initRoutes } from './routes'; @@ -73,11 +73,12 @@ export class Plugin { this.config$ = createConfig$(context); this.siemClientFactory = new SiemClientFactory(); - this.logger.debug('Shim plugin initialized'); + this.logger.debug('plugin initialized'); } - public setup(core: CoreSetup, plugins: SetupPlugins, __legacy: LegacyServices) { - this.logger.debug('Shim plugin setup'); + public async setup(core: CoreSetup, plugins: SetupPlugins) { + this.logger.debug('plugin setup'); + if (hasListsFeature()) { // TODO: Remove this once we have the lists feature supported this.logger.error( @@ -90,14 +91,16 @@ export class Plugin { getSiemClient: () => this.siemClientFactory.create(request), })); + const config = await this.config$.pipe(first()).toPromise(); + this.siemClientFactory.setup({ getSpaceId: plugins.spaces?.spacesService?.getSpaceId, - config: __legacy.config, + config, }); initRoutes( router, - __legacy.config, + config, plugins.encryptedSavedObjects?.usingEphemeralEncryptionKey ?? false, plugins.security ); diff --git a/x-pack/plugins/siem/server/routes/index.ts b/x-pack/plugins/siem/server/routes/index.ts index 18bc0f575ebe..64b232a2686b 100644 --- a/x-pack/plugins/siem/server/routes/index.ts +++ b/x-pack/plugins/siem/server/routes/index.ts @@ -5,7 +5,6 @@ */ import { IRouter } from '../../../../../src/core/server'; -import { LegacyServices } from '../types'; import { createRulesRoute } from '../lib/detection_engine/routes/rules/create_rules_route'; import { createIndexRoute } from '../lib/detection_engine/routes/index/create_index_route'; @@ -32,10 +31,11 @@ import { getPrepackagedRulesStatusRoute } from '../lib/detection_engine/routes/r import { importTimelinesRoute } from '../lib/timeline/routes/import_timelines_route'; import { exportTimelinesRoute } from '../lib/timeline/routes/export_timelines_route'; import { SetupPlugins } from '../plugin'; +import { ConfigType } from '..'; export const initRoutes = ( router: IRouter, - config: LegacyServices['config'], + config: ConfigType, usingEphemeralEncryptionKey: boolean, security: SetupPlugins['security'] ) => { diff --git a/x-pack/plugins/siem/server/types.ts b/x-pack/plugins/siem/server/types.ts index a52322f5f830..3a5c6cf94c65 100644 --- a/x-pack/plugins/siem/server/types.ts +++ b/x-pack/plugins/siem/server/types.ts @@ -4,13 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Legacy } from 'kibana'; import { SiemClient } from './client'; -export interface LegacyServices { - config: Legacy.Server['config']; -} - export { SiemClient }; export interface SiemRequestContext { From c3c487fafa8763a80d1c94212166c898ef59a8e2 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 14:04:51 -0500 Subject: [PATCH 10/20] Remove local SIEM tsconfig This was originally added to address an issue with tsserver, but that issue is no longer relevant. The presence of this file confuses typescript into thinking that siem is a separate TS project. --- x-pack/legacy/plugins/siem/tsconfig.json | 3 --- x-pack/plugins/siem/tsconfig.json | 3 --- 2 files changed, 6 deletions(-) delete mode 100644 x-pack/legacy/plugins/siem/tsconfig.json delete mode 100644 x-pack/plugins/siem/tsconfig.json diff --git a/x-pack/legacy/plugins/siem/tsconfig.json b/x-pack/legacy/plugins/siem/tsconfig.json deleted file mode 100644 index b027bb4567b9..000000000000 --- a/x-pack/legacy/plugins/siem/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.json" -} \ No newline at end of file diff --git a/x-pack/plugins/siem/tsconfig.json b/x-pack/plugins/siem/tsconfig.json deleted file mode 100644 index 4082f16a5d91..000000000000 --- a/x-pack/plugins/siem/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} From faa3d93c4fefe28b29939e9ca513f01deeb7aba0 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 16:13:17 -0500 Subject: [PATCH 11/20] Update kibana.json to declare our dependencies These are not necessarily correct in terms of what's required/optional, but this is what's declared in our types. --- x-pack/plugins/siem/kibana.json | 2 ++ x-pack/plugins/siem/server/plugin.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/siem/kibana.json b/x-pack/plugins/siem/kibana.json index 2bc33b87a1b4..1eb1a7dbde87 100644 --- a/x-pack/plugins/siem/kibana.json +++ b/x-pack/plugins/siem/kibana.json @@ -3,6 +3,8 @@ "version": "8.0.0", "kibanaVersion": "kibana", "configPath": ["xpack", "siem"], + "requiredPlugins": ["actions", "alerting", "features", "licensing"], + "optionalPlugins": ["encryptedSavedObjects", "ml", "security", "spaces"], "server": true, "ui": false } diff --git a/x-pack/plugins/siem/server/plugin.ts b/x-pack/plugins/siem/server/plugin.ts index 8b85cc7c7755..b9ec1c2e9243 100644 --- a/x-pack/plugins/siem/server/plugin.ts +++ b/x-pack/plugins/siem/server/plugin.ts @@ -47,7 +47,7 @@ export { CoreSetup, CoreStart }; export interface SetupPlugins { alerting: AlertingSetup; - encryptedSavedObjects: EncryptedSavedObjectsSetup; + encryptedSavedObjects?: EncryptedSavedObjectsSetup; features: FeaturesSetup; licensing: LicensingPluginSetup; security?: SecuritySetup; From 3b661249a98adf8790069b4f13bda9539e86a072 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 16:26:50 -0500 Subject: [PATCH 12/20] Remove legacy plugin instantiation * Removes legacy instantiation of server plugin, which is now handled by NP * Loosens legacy config spec so we no longer have to duplicate config types --- x-pack/legacy/plugins/siem/index.ts | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 4d12276035d7..006472316858 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -6,10 +6,8 @@ import { i18n } from '@kbn/i18n'; import { resolve } from 'path'; -import { Server } from 'hapi'; import { Root } from 'joi'; -import { plugin } from '../../../plugins/siem/server'; import { savedObjectMappings } from '../../../plugins/siem/server/saved_objects'; import { @@ -23,11 +21,9 @@ import { DEFAULT_INTERVAL_VALUE, DEFAULT_FROM, DEFAULT_TO, - DEFAULT_SIGNALS_INDEX, ENABLE_NEWS_FEED_SETTING, NEWS_FEED_URL_SETTING, NEWS_FEED_URL_SETTING_DEFAULT, - SIGNALS_INDEX_KEY, IP_REPUTATION_LINKS_SETTING, IP_REPUTATION_LINKS_SETTING_DEFAULT, DEFAULT_INDEX_PATTERN, @@ -162,31 +158,12 @@ export const siem = (kibana: any) => { }, mappings: savedObjectMappings, }, - init(server: Server) { - const { coreContext, env, setup, start } = server.newPlatform; - const initializerContext = { ...coreContext, env }; - const __legacy = { - config: server.config, - route: server.route.bind(server), - }; - - // @ts-ignore-next-line: NewPlatform shim is too loosely typed - const pluginInstance = plugin(initializerContext); - // @ts-ignore-next-line: NewPlatform shim is too loosely typed - pluginInstance.setup(setup.core, setup.plugins, __legacy); - // @ts-ignore-next-line: NewPlatform shim is too loosely typed - pluginInstance.start(start.core, start.plugins); - }, config(Joi: Root) { - // See x-pack/plugins/siem/server/config.ts if you're adding another - // value where the configuration has to be duplicated at the moment. - // When we move over to the new platform completely this will be - // removed and only server/config.ts should be used. return Joi.object() .keys({ enabled: Joi.boolean().default(true), - [SIGNALS_INDEX_KEY]: Joi.string().default(DEFAULT_SIGNALS_INDEX), }) + .unknown(true) .default(); }, }); From 6030b1b892e98cc590d4cf2be5e255eba42cb185 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 16:48:22 -0500 Subject: [PATCH 13/20] Update tests with NP config These were written against the old Hapi config function; now, we just have a POJO. --- .../plugins/siem/server/client/client.test.ts | 12 ++++----- .../siem/server/client/factory.test.ts | 5 ++-- .../routes/__mocks__/index.ts | 9 ++++--- .../routes/rules/import_rules_route.test.ts | 25 ++----------------- .../routes/__mocks__/import_timelines.ts | 7 ------ .../routes/export_timelines_route.test.ts | 11 ++------ .../routes/import_timelines_route.test.ts | 8 +++--- 7 files changed, 22 insertions(+), 55 deletions(-) diff --git a/x-pack/plugins/siem/server/client/client.test.ts b/x-pack/plugins/siem/server/client/client.test.ts index bfe7b97f4300..94ff2149b8c6 100644 --- a/x-pack/plugins/siem/server/client/client.test.ts +++ b/x-pack/plugins/siem/server/client/client.test.ts @@ -4,17 +4,17 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SiemClient } from './client'; +import { SIGNALS_INDEX_KEY } from '../../common/constants'; import { createMockConfig } from '../lib/detection_engine/routes/__mocks__'; +import { SiemClient } from './client'; describe('SiemClient', () => { describe('#signalsIndex', () => { it('returns the index scoped to the specified spaceId', () => { - let mockConfig = createMockConfig(); - mockConfig = () => ({ - get: jest.fn(() => 'mockSignalsIndex'), - has: jest.fn(), - }); + const mockConfig = { + ...createMockConfig(), + [SIGNALS_INDEX_KEY]: 'mockSignalsIndex', + }; const spaceId = 'fooSpace'; const client = new SiemClient(spaceId, mockConfig); diff --git a/x-pack/plugins/siem/server/client/factory.test.ts b/x-pack/plugins/siem/server/client/factory.test.ts index bdb3b011b6e0..f0cddc5f0974 100644 --- a/x-pack/plugins/siem/server/client/factory.test.ts +++ b/x-pack/plugins/siem/server/client/factory.test.ts @@ -5,6 +5,7 @@ */ import { httpServerMock } from '../../../../../src/core/server/mocks'; +import { createMockConfig } from '../lib/detection_engine/routes/__mocks__'; import { SiemClientFactory } from './factory'; import { SiemClient } from './client'; @@ -16,7 +17,7 @@ describe('SiemClientFactory', () => { it('constructs a client with the current spaceId', () => { const factory = new SiemClientFactory(); const mockRequest = httpServerMock.createKibanaRequest(); - factory.setup({ getSpaceId: () => 'mockSpace', config: jest.fn() }); + factory.setup({ getSpaceId: () => 'mockSpace', config: createMockConfig() }); factory.create(mockRequest); expect(mockClient).toHaveBeenCalledWith('mockSpace', expect.anything()); @@ -25,7 +26,7 @@ describe('SiemClientFactory', () => { it('constructs a client with the default spaceId if spaces are disabled', () => { const factory = new SiemClientFactory(); const mockRequest = httpServerMock.createKibanaRequest(); - factory.setup({ getSpaceId: undefined, config: jest.fn() }); + factory.setup({ getSpaceId: undefined, config: createMockConfig() }); factory.create(mockRequest); expect(mockClient).toHaveBeenCalledWith('default', expect.anything()); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts index 1ccd43c06aac..e5e87c230e63 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +import { DEFAULT_SIGNALS_INDEX, SIGNALS_INDEX_KEY } from '../../../../../common/constants'; import { requestContextMock } from './request_context'; import { serverMock } from './server'; import { requestMock } from './request'; @@ -11,7 +12,9 @@ import { responseMock } from './response_factory'; export { requestMock, requestContextMock, responseMock, serverMock }; -export const createMockConfig = () => () => ({ - get: jest.fn(), - has: jest.fn(), +export const createMockConfig = () => ({ + enabled: true, + [SIGNALS_INDEX_KEY]: DEFAULT_SIGNALS_INDEX, + maxImportPayloadBytes: 10485760, + maxImportExportSize: 10000, }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index 61f5e6faf1bd..8c052cfdf402 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -23,7 +23,6 @@ import { } from '../__mocks__/request_responses'; import { createMockConfig, requestContextMock, serverMock, requestMock } from '../__mocks__'; import { importRulesRoute } from './import_rules_route'; -import { DEFAULT_SIGNALS_INDEX } from '../../../../../common/constants'; import * as createRulesStreamFromNdJson from '../../rules/create_rules_stream_from_ndjson'; import { setFeatureFlagsForTestsOnly, unSetFeatureFlagsForTestsOnly } from '../../feature_flags'; @@ -36,7 +35,7 @@ describe('import_rules_route', () => { unSetFeatureFlagsForTestsOnly(); }); - let config = createMockConfig(); + let config: ReturnType; let server: ReturnType; let request: ReturnType; let { clients, context } = requestContextMock.createTools(); @@ -51,30 +50,10 @@ describe('import_rules_route', () => { server = serverMock.create(); ({ clients, context } = requestContextMock.createTools()); + config = createMockConfig(); const hapiStream = buildHapiStream(ruleIdsToNdJsonString(['rule-1'])); request = getImportRulesRequest(hapiStream); - config = () => ({ - get: jest.fn(value => { - switch (value) { - case 'savedObjects.maxImportPayloadBytes': { - return 10000; - } - case 'savedObjects.maxImportExportSize': { - return 10000; - } - case 'xpack.siem.signalsIndex': { - return DEFAULT_SIGNALS_INDEX; - } - default: { - const dummyMock = jest.fn(); - return dummyMock(); - } - } - }), - has: jest.fn(), - }); - clients.clusterClient.callAsCurrentUser.mockResolvedValue(getNonEmptyIndex()); // index exists clients.alertsClient.find.mockResolvedValue(getEmptyFindResult()); // no extant rules diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts index 74d3744e2929..686f2b491cf8 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/__mocks__/import_timelines.ts @@ -163,13 +163,6 @@ export const mockParsedTimelineObject = omit( mockUniqueParsedObjects[0] ); -export const mockConfig = { - get: () => { - return 100000000; - }, - has: jest.fn(), -}; - export const mockGetCurrentUser = { user: { username: 'mockUser', diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts index 4eadede40f5d..47ca25e16bd5 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.test.ts @@ -16,6 +16,7 @@ import { serverMock, requestContextMock, requestMock, + createMockConfig, } from '../../detection_engine/routes/__mocks__'; import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { convertSavedObjectToSavedNote } from '../../note/saved_object'; @@ -41,14 +42,6 @@ jest.mock('../../pinned_event/saved_object', () => { describe('export timelines', () => { let server: ReturnType; let { clients, context } = requestContextMock.createTools(); - const config = jest.fn().mockImplementation(() => { - return { - get: () => { - return 100; - }, - has: jest.fn(), - }; - }); beforeEach(() => { server = serverMock.create(); @@ -61,7 +54,7 @@ describe('export timelines', () => { ((convertSavedObjectToSavedPinnedEvent as unknown) as jest.Mock).mockReturnValue( mockPinnedEvents() ); - exportTimelinesRoute(server.router, config); + exportTimelinesRoute(server.router, createMockConfig()); }); describe('status codes', () => { diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts index ad5fed1cab1f..3931bf0e5bea 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.test.ts @@ -6,6 +6,7 @@ import { getImportTimelinesRequest } from './__mocks__/request_responses'; import { + createMockConfig, serverMock, requestContextMock, requestMock, @@ -14,7 +15,6 @@ import { TIMELINE_EXPORT_URL } from '../../../../common/constants'; import { SecurityPluginSetup } from '../../../../../security/server'; import { - mockConfig, mockUniqueParsedObjects, mockParsedObjects, mockDuplicateIdErrors, @@ -24,7 +24,7 @@ import { } from './__mocks__/import_timelines'; describe('import timelines', () => { - let config: jest.Mock; + let config: ReturnType; let server: ReturnType; let request: ReturnType; let securitySetup: SecurityPluginSetup; @@ -43,9 +43,7 @@ describe('import timelines', () => { server = serverMock.create(); context = requestContextMock.createTools().context; - config = jest.fn().mockImplementation(() => { - return mockConfig; - }); + config = createMockConfig(); securitySetup = ({ authc: { From c4ceebb24da9479c1a1fdeb428574adea6153fb5 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 19:14:14 -0500 Subject: [PATCH 14/20] Update es_archiver helpers' paths I'm not quite sure if these are working yet, but they're no longer throwing errors. --- x-pack/plugins/siem/cypress/tasks/es_archiver.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/siem/cypress/tasks/es_archiver.ts b/x-pack/plugins/siem/cypress/tasks/es_archiver.ts index 6417a7d87225..8a4ab8c81945 100644 --- a/x-pack/plugins/siem/cypress/tasks/es_archiver.ts +++ b/x-pack/plugins/siem/cypress/tasks/es_archiver.ts @@ -6,7 +6,7 @@ export const esArchiverLoadEmptyKibana = () => { cy.exec( - `node ../../../../scripts/es_archiver empty_kibana load empty--dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver empty_kibana load empty--dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -14,7 +14,7 @@ export const esArchiverLoadEmptyKibana = () => { export const esArchiverLoad = (folder: string) => { cy.exec( - `node ../../../../scripts/es_archiver load ${folder} --dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver load ${folder} --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -22,7 +22,7 @@ export const esArchiverLoad = (folder: string) => { export const esArchiverUnload = (folder: string) => { cy.exec( - `node ../../../../scripts/es_archiver unload ${folder} --dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver unload ${folder} --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -30,7 +30,7 @@ export const esArchiverUnload = (folder: string) => { export const esArchiverUnloadEmptyKibana = () => { cy.exec( - `node ../../../../scripts/es_archiver unload empty_kibana empty--dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver unload empty_kibana empty--dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); @@ -38,7 +38,7 @@ export const esArchiverUnloadEmptyKibana = () => { export const esArchiverResetKibana = () => { cy.exec( - `node ../../../../scripts/es_archiver empty-kibana-index --config ../../../../test/functional/config.js --es-url ${Cypress.env( + `node ../../../scripts/es_archiver empty-kibana-index --config ../../../test/functional/config.js --es-url ${Cypress.env( 'ELASTICSEARCH_URL' )} --kibana-url ${Cypress.config().baseUrl}` ); From c6cdbc2c1c7a2624ad2301858370c27d1168ed43 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 19:29:39 -0500 Subject: [PATCH 15/20] Ignore restricted path on script This was cribbed from infra, who has made a similar change. --- x-pack/plugins/siem/scripts/combined_schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/siem/scripts/combined_schema.ts b/x-pack/plugins/siem/scripts/combined_schema.ts index 625eb3a4a475..48215548650f 100644 --- a/x-pack/plugins/siem/scripts/combined_schema.ts +++ b/x-pack/plugins/siem/scripts/combined_schema.ts @@ -6,6 +6,7 @@ import { buildSchemaFromTypeDefinitions } from 'graphql-tools'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { schemas as serverSchemas } from '../server/graphql'; export const schemas = [...serverSchemas]; From 06c62cf37ae3871a8de02f8141505334fcc8abdf Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 19:30:56 -0500 Subject: [PATCH 16/20] Ignore restricted path on temporary savedObject mappings import This will be changed subsequently when we switch to the NP form of savedObject type registration. --- x-pack/legacy/plugins/siem/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 006472316858..6e03583dda69 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -8,6 +8,7 @@ import { i18n } from '@kbn/i18n'; import { resolve } from 'path'; import { Root } from 'joi'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { savedObjectMappings } from '../../../plugins/siem/server/saved_objects'; import { From b36cdf3c746fe1ae685907578f1ed4af8692b177 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 13 Apr 2020 21:01:00 -0500 Subject: [PATCH 17/20] Add symlink to lockfile --- x-pack/plugins/siem/yarn.lock | 1 + 1 file changed, 1 insertion(+) create mode 120000 x-pack/plugins/siem/yarn.lock diff --git a/x-pack/plugins/siem/yarn.lock b/x-pack/plugins/siem/yarn.lock new file mode 120000 index 000000000000..6e09764ec763 --- /dev/null +++ b/x-pack/plugins/siem/yarn.lock @@ -0,0 +1 @@ +../../../yarn.lock \ No newline at end of file From a8f272baae0a097c9f4645e7f9f781f26efeacb8 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Tue, 14 Apr 2020 10:49:01 -0500 Subject: [PATCH 18/20] Fix paths on circular deps script --- .../check_circular_deps/run_check_circular_deps_cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js b/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js index f3a97f5b9c9b..0b5e5d6cf13b 100644 --- a/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js +++ b/x-pack/plugins/siem/scripts/check_circular_deps/run_check_circular_deps_cli.js @@ -11,10 +11,13 @@ import madge from 'madge'; /* eslint-disable-next-line import/no-extraneous-dependencies */ import { run, createFailError } from '@kbn/dev-utils'; +const legacyPluginPath = '../../../../legacy/plugins/siem'; +const pluginPath = '../..'; + run( async ({ log }) => { const result = await madge( - [resolve(__dirname, '../../public'), resolve(__dirname, '../../common')], + [resolve(__dirname, legacyPluginPath, 'public'), resolve(__dirname, pluginPath, 'common')], { fileExtensions: ['ts', 'js', 'tsx'], excludeRegExp: [ From 6b09a1fc523d42e78ca0bc42485a418ecdc76cf2 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Tue, 14 Apr 2020 19:38:42 -0500 Subject: [PATCH 19/20] Add separate config for Rule and Timeline saved objects We had previously used the savedObjects' config, but those are not currently exposed to us on New Platform. For now, we're going to split this into two sets of values for the SOs we deal with importing/exporting within the SIEM app, with the same defaults as savedObjects. --- x-pack/plugins/siem/server/config.ts | 6 ++++-- .../server/lib/detection_engine/routes/__mocks__/index.ts | 6 ++++-- .../lib/detection_engine/routes/rules/export_rules_route.ts | 2 +- .../lib/detection_engine/routes/rules/import_rules_route.ts | 4 ++-- .../server/lib/timeline/routes/export_timelines_route.ts | 2 +- .../server/lib/timeline/routes/import_timelines_route.ts | 4 ++-- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/siem/server/config.ts b/x-pack/plugins/siem/server/config.ts index ad8ab7923b16..4b0e8d34ef1a 100644 --- a/x-pack/plugins/siem/server/config.ts +++ b/x-pack/plugins/siem/server/config.ts @@ -11,8 +11,10 @@ import { SIGNALS_INDEX_KEY, DEFAULT_SIGNALS_INDEX } from '../common/constants'; export const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), - maxImportPayloadBytes: schema.number({ defaultValue: 10485760 }), - maxImportExportSize: schema.number({ defaultValue: 10000 }), + maxRuleImportExportSize: schema.number({ defaultValue: 10000 }), + maxRuleImportPayloadBytes: schema.number({ defaultValue: 10485760 }), + maxTimelineImportExportSize: schema.number({ defaultValue: 10000 }), + maxTimelineImportPayloadBytes: schema.number({ defaultValue: 10485760 }), [SIGNALS_INDEX_KEY]: schema.string({ defaultValue: DEFAULT_SIGNALS_INDEX }), }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts index e5e87c230e63..a28eb6ba3cca 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/__mocks__/index.ts @@ -15,6 +15,8 @@ export { requestMock, requestContextMock, responseMock, serverMock }; export const createMockConfig = () => ({ enabled: true, [SIGNALS_INDEX_KEY]: DEFAULT_SIGNALS_INDEX, - maxImportPayloadBytes: 10485760, - maxImportExportSize: 10000, + maxRuleImportExportSize: 10000, + maxRuleImportPayloadBytes: 10485760, + maxTimelineImportExportSize: 10000, + maxTimelineImportPayloadBytes: 10485760, }); diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts index 38ae0e9c9eea..8433b74adf31 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -35,7 +35,7 @@ export const exportRulesRoute = (router: IRouter, config: ConfigType) => { } try { - const exportSizeLimit = config.maxImportExportSize; + const exportSizeLimit = config.maxRuleImportExportSize; if (request.body?.objects != null && request.body.objects.length > exportSizeLimit) { return siemResponse.error({ statusCode: 400, diff --git a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts index 6085cdb8156a..58da27916c19 100644 --- a/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -49,7 +49,7 @@ export const importRulesRoute = (router: IRouter, config: ConfigType) => { options: { tags: ['access:siem'], body: { - maxBytes: config.maxImportPayloadBytes, + maxBytes: config.maxRuleImportPayloadBytes, output: 'stream', }, }, @@ -77,7 +77,7 @@ export const importRulesRoute = (router: IRouter, config: ConfigType) => { }); } - const objectLimit = config.maxImportExportSize; + const objectLimit = config.maxRuleImportExportSize; const readStream = createRulesStreamFromNdJson(objectLimit); const parsedObjects = await createPromiseFromStreams([ request.body.file, diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts index 7219372c6d84..c59f6eb6ce3d 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/export_timelines_route.ts @@ -34,7 +34,7 @@ export const exportTimelinesRoute = (router: IRouter, config: ConfigType) => { try { const siemResponse = buildSiemResponse(response); const savedObjectsClient = context.core.savedObjects.client; - const exportSizeLimit = config.maxImportExportSize; + const exportSizeLimit = config.maxTimelineImportExportSize; if (request.body?.ids != null && request.body.ids.length > exportSizeLimit) { return siemResponse.error({ diff --git a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts index c840c11ff7ea..258ef9faf671 100644 --- a/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts +++ b/x-pack/plugins/siem/server/lib/timeline/routes/import_timelines_route.ts @@ -56,7 +56,7 @@ export const importTimelinesRoute = ( options: { tags: ['access:siem'], body: { - maxBytes: config.maxImportPayloadBytes, + maxBytes: config.maxTimelineImportPayloadBytes, output: 'stream', }, }, @@ -81,7 +81,7 @@ export const importTimelinesRoute = ( }); } - const objectLimit = config.maxImportExportSize; + const objectLimit = config.maxTimelineImportExportSize; const readStream = createTimelinesStreamFromNdJson(objectLimit); const parsedObjects = await createPromiseFromStreams([ From 4baa5bb9b69bfd580fee5a6d53d16c3c532a680b Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Fri, 17 Apr 2020 10:28:56 -0500 Subject: [PATCH 20/20] Fixing relative paths within cypress These are strings that wouldn't be caught by typescript. --- x-pack/plugins/siem/cypress/README.md | 4 ++-- x-pack/plugins/siem/cypress/tasks/login.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/siem/cypress/README.md b/x-pack/plugins/siem/cypress/README.md index 1a200ec5315f..d84c66fec1c3 100644 --- a/x-pack/plugins/siem/cypress/README.md +++ b/x-pack/plugins/siem/cypress/README.md @@ -196,12 +196,12 @@ We are using es_archiver in order to manage the data that our Cypress tests need 3. When you are sure that you have all the data you need run the following command from: `x-pack/plugins/siem` ```sh -node ../../../../scripts/es_archiver save --dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url http://:@: +node ../../../scripts/es_archiver save --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url http://:@: ``` Example: ```sh -node ../../../../scripts/es_archiver save custom_rules ".kibana",".siem-signal*" --dir ../../../test/siem_cypress/es_archives --config ../../../../test/functional/config.js --es-url http://elastic:changeme@localhost:9220 +node ../../../scripts/es_archiver save custom_rules ".kibana",".siem-signal*" --dir ../../test/siem_cypress/es_archives --config ../../../test/functional/config.js --es-url http://elastic:changeme@localhost:9220 ``` Note that the command is going to create the folder if does not exist in the directory with the imported data. diff --git a/x-pack/plugins/siem/cypress/tasks/login.ts b/x-pack/plugins/siem/cypress/tasks/login.ts index c7788b080d06..1bbf41d05db0 100644 --- a/x-pack/plugins/siem/cypress/tasks/login.ts +++ b/x-pack/plugins/siem/cypress/tasks/login.ts @@ -10,7 +10,7 @@ import * as yaml from 'js-yaml'; * Credentials in the `kibana.dev.yml` config file will be used to authenticate * with Kibana when credentials are not provided via environment variables */ -const KIBANA_DEV_YML_PATH = '../../../../config/kibana.dev.yml'; +const KIBANA_DEV_YML_PATH = '../../../config/kibana.dev.yml'; /** * The configuration path in `kibana.dev.yml` to the username to be used when