File tree Expand file tree Collapse file tree
x-pack/solutions/security/plugins/security_solution/server/lists_integration/endpoint/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 */
77
88import type { ExceptionsListPreImportServerExtension } from '@kbn/lists-plugin/server' ;
9- import { ENDPOINT_ARTIFACT_LISTS } from '@kbn/securitysolution-list-constants' ;
9+ import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants' ;
1010import type { PromiseFromStreams } from '@kbn/lists-plugin/server/services/exception_lists/import_exception_list_and_items' ;
1111import { stringify } from '../../../endpoint/utils/stringify' ;
1212import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services' ;
@@ -24,11 +24,7 @@ export const getExceptionsPreImportHandler = (
2424 return async ( { data } ) => {
2525 const hasEndpointArtifactListOrListItems = [ ...data . lists , ...data . items ] . some ( ( item ) => {
2626 if ( 'list_id' in item ) {
27- const NON_IMPORTABLE_ENDPOINT_ARTIFACT_IDS = ALL_ENDPOINT_ARTIFACT_LIST_IDS . filter (
28- ( listId ) => listId !== ENDPOINT_ARTIFACT_LISTS . endpointExceptions . id
29- ) as string [ ] ;
30-
31- return NON_IMPORTABLE_ENDPOINT_ARTIFACT_IDS . includes ( item . list_id ) ;
27+ return ( ALL_ENDPOINT_ARTIFACT_LIST_IDS as string [ ] ) . includes ( item . list_id ) ;
3228 }
3329
3430 return false ;
@@ -50,7 +46,7 @@ export const getExceptionsPreImportHandler = (
5046 for ( const item of data . items ) {
5147 if (
5248 ! ( item instanceof Error ) &&
53- item . list_id === ENDPOINT_ARTIFACT_LISTS . endpointExceptions . id &&
49+ item . list_id === ENDPOINT_LIST_ID &&
5450 item . tags ?. includes ( GLOBAL_ARTIFACT_TAG ) === false
5551 ) {
5652 item . tags = item . tags ?? [ ] ;
You can’t perform that action at this time.
0 commit comments