@@ -22,7 +22,7 @@ import { notify } from '../../database/redis';
2222import type { DomainFindById } from '../../domain/domainTypes' ;
2323import { ABSTRACT_INTERNAL_OBJECT } from '../../schema/general' ;
2424import type { AuthContext , AuthUser } from '../../types/user' ;
25- import { type EditInput , FilterMode , type PlaybookAddInput , type PlaybookAddLinkInput , type PlaybookAddNodeInput , type PositionInput } from '../../generated/graphql' ;
25+ import { type EditInput , type PlaybookAddInput , type PlaybookAddLinkInput , type PlaybookAddNodeInput , type PositionInput } from '../../generated/graphql' ;
2626import type { BasicStoreEntityPlaybook , ComponentDefinition } from './playbook-types' ;
2727import { ENTITY_TYPE_PLAYBOOK } from './playbook-types' ;
2828import { PLAYBOOK_COMPONENTS , type SharingConfiguration , type StreamConfiguration } from './playbook-components' ;
@@ -32,7 +32,6 @@ import { isStixMatchFilterGroup } from '../../utils/filtering/filtering-stix/sti
3232import { registerConnectorQueues , unregisterConnector } from '../../database/rabbitmq' ;
3333import { getEntitiesListFromCache } from '../../database/cache' ;
3434import { SYSTEM_USER } from '../../utils/access' ;
35- import { findFiltersFromKey } from '../../utils/filtering/filtering-utils' ;
3635import { checkEnterpriseEdition , isEnterpriseEdition } from '../../enterprise-edition/ee' ;
3736import pjson from '../../../package.json' ;
3837import { extractContentFrom } from '../../utils/fileToContent' ;
@@ -72,12 +71,7 @@ export const findPlaybooksForEntity = async (context: AuthContext, user: AuthUse
7271 if ( instance && ( instance . component_id === 'PLAYBOOK_INTERNAL_DATA_STREAM' || instance . component_id === 'PLAYBOOK_INTERNAL_MANUAL_TRIGGER' ) ) {
7372 const { filters } = JSON . parse ( instance . configuration ?? '{}' ) as StreamConfiguration ;
7473 const jsonFilters = filters ? JSON . parse ( filters ) : null ;
75- const newFilters = {
76- mode : FilterMode . And ,
77- filters : findFiltersFromKey ( jsonFilters ?. filters ?? [ ] , 'entity_type' ) ,
78- filterGroups : [ ] ,
79- } ;
80- const isMatch = await isStixMatchFilterGroup ( context , SYSTEM_USER , stixEntity , newFilters ) ;
74+ const isMatch = await isStixMatchFilterGroup ( context , SYSTEM_USER , stixEntity , jsonFilters ) ;
8175 if ( isMatch ) {
8276 filteredPlaybooks . push ( playbook ) ;
8377 }
0 commit comments