A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat(enrichers): remove dependency for neo4jConnection
dextmorgnffe220341022
diff --git a/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.py b/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.pyindex 48912388..2dc8d487 100644--- a/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.py+++ b/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.py@@ -3,7 +3,6 @@ import osfrom typing import List, Dict, Any, Union, Optionalfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricher-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_types.cidr import CIDRfrom flowsint_types.asn import ASNfrom flowsint_core.utils import is_valid_asn, parse_asn@@ -23,14 +22,12 @@ class AsnToCidrsEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -126,7 +123,7 @@ class AsnToCidrsEnricher(Enricher):for cidr in cidr_list:if str(cidr.network) == "0.0.0.0/0":continue # Skip default CIDR for unknown ASN- if self.neo4j_conn:+ if self._graph_service:self.create_node(asn)self.create_node(cidr)@@ -141,7 +138,7 @@ class AsnToCidrsEnricher(Enricher):for asn, cidr in zip(original_input, results):if str(cidr.network) == "0.0.0.0/0":continue # Skip default CIDR for unknown ASN- if self.neo4j_conn:+ if self._graph_service:self.create_node("asn","number",diff --git a/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.py b/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.pyindex 5fe28444..e522e5ce 100644--- a/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.py+++ b/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.py@@ -2,7 +2,6 @@ import osfrom typing import Any, Dict, List, Optional, Unionfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricher-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_types.cidr import CIDRfrom flowsint_types.ip import Ipfrom flowsint_core.core.logger import Logger@@ -21,14 +20,12 @@ class CidrToIpsEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -123,7 +120,7 @@ class CidrToIpsEnricher(Enricher):f"Found {len(ip_list)} IPs in CIDR {cidr.network}")for ip in ip_list:- if self.neo4j_conn:+ if self._graph_service:# Create CIDR nodeself.create_node(cidr)@@ -135,7 +132,7 @@ class CidrToIpsEnricher(Enricher):else:# Fallback: original behavior (one-to-one zip)for cidr, ip in zip(original_input, results):- if self.neo4j_conn:+ if self._graph_service:# Create CIDR nodeself.create_node(cidr)# Create IP nodediff --git a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.py b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.pyindex 6ae8d386..3d1676ec 100644--- a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.py+++ b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.py@@ -5,7 +5,6 @@ from flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.wallet import CryptoWallet, CryptoNFTfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnectionfrom dotenv import load_dotenvload_dotenv()@@ -23,14 +22,12 @@ class CryptoWalletAddressToNFTs(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -121,7 +118,7 @@ class CryptoWalletAddressToNFTs(Enricher):return nftsdef postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:- if not self.neo4j_conn:+ if not self._graph_service:return resultsfor nfts in results:diff --git a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.py b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.pyindex b98573d2..8365d6d3 100644--- a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.py+++ b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.py@@ -7,7 +7,6 @@ from dotenv import load_dotenvfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.wallet import CryptoWallet, CryptoWalletTransaction-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_core.core.logger import Loggerload_dotenv()@@ -29,14 +28,12 @@ class CryptoWalletAddressToTransactions(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -176,7 +173,7 @@ class CryptoWalletAddressToTransactions(Enricher):return transactionsdef postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:- if not self.neo4j_conn:+ if not self._graph_service:return resultsfor transactions in results:@@ -206,7 +203,7 @@ class CryptoWalletAddressToTransactions(Enricher):tx.caption = $hash,tx.type = "transaction""""- self.neo4j_conn.query(+ self._graph_service.query(tx_query,{"hash": tx.hash,diff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.pyindex 7bb8b50d..b58ff2c9 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.py@@ -4,7 +4,6 @@ import socketfrom typing import Any, Dict, List, Optional, Unionfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricher-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_types.domain import Domainfrom flowsint_types.asn import ASNfrom flowsint_core.utils import is_valid_domain@@ -24,14 +23,12 @@ class DomainToAsnEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -118,7 +115,7 @@ class DomainToAsnEnricher(Enricher):self, results: List[OutputType], input_data: List[InputType] = None) -> List[OutputType]:# Create Neo4j relationships between domains and their corresponding ASNs- if input_data and self.neo4j_conn:+ if input_data and self._graph_service:for domain, asn in zip(input_data, results):# Create domain nodeself.create_node(domain)diff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.pyindex 837c92d9..d7af1906 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.py@@ -12,7 +12,6 @@ from flowsint_types.phone import Phonefrom flowsint_core.utils import is_valid_domain, is_root_domainfrom flowsint_types.address import Locationfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnectionfrom tools.network.whoxy import WhoxyToolfrom dotenv import load_dotenv@@ -30,14 +29,12 @@ class DomainToHistoryEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -394,7 +391,7 @@ class DomainToHistoryEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:"""Create Neo4j nodes and relationships from extracted data."""- if not self.neo4j_conn:+ if not self._graph_service:Logger.info(self.sketch_id,{"message": "[WHOXY] No Neo4j connection, skipping postprocess"},diff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_root_domain.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_root_domain.pyindex 889c6436..eeb236fd 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_root_domain.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_root_domain.py@@ -56,7 +56,7 @@ class DomainToRootDomain(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:# Use the mapping we created during scan to create relationshipsfor original_domain, root_domain in self.domain_root_mapping:- if not self.neo4j_conn:+ if not self._graph_service:continue# New simplified pattern: pass Pydantic objects directlydiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.pyindex e730f3b9..d65d0178 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.py@@ -92,7 +92,7 @@ class SubdomainEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:output: List[OutputType] = []for domain_obj in results:- if not self.neo4j_conn:+ if not self._graph_service:continuefor subdomain in domain_obj["subdomains"]:output.append(Domain(domain=subdomain))diff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.pyindex c2c9d627..8a247164 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py@@ -183,7 +183,7 @@ class DomainToWebsiteEnricher(Enricher):}Logger.info(self.sketch_id, redirect_payload)- if self.neo4j_conn:+ if self._graph_service:# Create domain nodeself.create_node(website.domain)diff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.pyindex 4ab71001..df91076b 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.py@@ -111,7 +111,7 @@ class WhoisEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:for whois_obj in results:- if not self.neo4j_conn:+ if not self._graph_service:continue# Create domain nodeself.create_node(whois_obj.domain)diff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.pyindex 12f4cb6d..d26eca92 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.py@@ -9,7 +9,6 @@ from flowsint_types.email import Emailfrom flowsint_types.phone import Phonefrom flowsint_types.address import Locationfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnectionfrom tools.network.whoxy import WhoxyToolfrom dotenv import load_dotenv@@ -30,14 +29,12 @@ class EmailToDomainsEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -219,7 +216,7 @@ class EmailToDomainsEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:"""Create Neo4j nodes and relationships from extracted data."""- if not self.neo4j_conn:+ if not self._graph_service:return results# Track processed entities to avoid duplicatesdiff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.pyindex 4ddfb96d..81798922 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.py@@ -86,7 +86,7 @@ class EmailToGravatarEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:for email_obj, gravatar_obj in zip(original_input, results):- if not self.neo4j_conn:+ if not self._graph_service:continue# Create email nodeself.create_node(email_obj)diff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.pyindex 2e8d504f..802c6a8b 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.py@@ -8,7 +8,6 @@ from flowsint_core.core.logger import Loggerfrom flowsint_types.email import Emailfrom flowsint_types.breach import Breachfrom dotenv import load_dotenv-from flowsint_core.core.graph_db import Neo4jConnection# Load environment variablesload_dotenv()@@ -27,14 +26,12 @@ class EmailToBreachesEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -136,13 +133,13 @@ class EmailToBreachesEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:# Create email nodes firstfor email_obj in original_input:- if not self.neo4j_conn:+ if not self._graph_service:continueself.create_node(email_obj)# Process all breachesfor email_address, breach_obj in results:- if not self.neo4j_conn:+ if not self._graph_service:continue# Create breach nodediff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_username.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_username.pyindex f3a01788..43965dc0 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_username.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_username.py@@ -40,7 +40,7 @@ class EmailToUsernameEnricher(Enricher):self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:for email_obj, username_obj in zip(original_input, results):- if not self.neo4j_conn:+ if not self._graph_service:continue# Create email nodeself.create_node(email_obj)diff --git a/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.py b/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.pyindex 70840c91..f7687c96 100644--- a/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.py@@ -8,7 +8,6 @@ from flowsint_types.organization import Organizationfrom flowsint_types.individual import Individualfrom flowsint_types.address import Locationfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnectionfrom tools.network.whoxy import WhoxyToolfrom dotenv import load_dotenv@@ -29,14 +28,12 @@ class IndividualToDomainsEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -251,7 +248,7 @@ class IndividualToDomainsEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:"""Create Neo4j nodes and relationships from extracted data."""- if not self.neo4j_conn:+ if not self._graph_service:return results# Track processed entities to avoid duplicatesdiff --git a/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.py b/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.pyindex 199a2a58..42df7104 100644--- a/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.py+++ b/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.py@@ -281,7 +281,7 @@ class IndividualToOrgEnricher(Enricher):return Nonedef postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:- if not self.neo4j_conn:+ if not self._graph_service:return results# Track processed entities to avoid duplicatesdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.pyindex 21b3b2aa..60446268 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.py@@ -3,7 +3,6 @@ import osfrom typing import Any, Dict, List, Optional, Unionfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricher-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_types.ip import Ipfrom flowsint_types.asn import ASNfrom flowsint_core.utils import is_valid_ip@@ -23,14 +22,12 @@ class IpToAsnEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -113,7 +110,7 @@ class IpToAsnEnricher(Enricher):self, results: List[OutputType], input_data: List[InputType] = None) -> List[OutputType]:# Create Neo4j relationships between IPs and their corresponding ASNs- if input_data and self.neo4j_conn:+ if input_data and self._graph_service:for ip, asn in zip(input_data, results):# Create IP nodeself.create_node(ip)diff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.pyindex 9edded47..fe8240df 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.py@@ -43,7 +43,7 @@ class IpToInfosEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:"""Update IP nodes in Neo4j with geolocation information."""- if self.neo4j_conn:+ if self._graph_service:for ip in results:self.create_node(ip)self.log_graph_message(diff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.pyindex 9a8caaa8..ad738160 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.py@@ -1,7 +1,6 @@from typing import Any, Dict, List, Optional, Unionfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricher-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_types.ip import Ipfrom flowsint_types.port import Portfrom flowsint_core.utils import is_valid_ip@@ -21,14 +20,12 @@ class IpToPortsEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -194,7 +191,7 @@ class IpToPortsEnricher(Enricher):self, results: List[OutputType], input_data: List[InputType] = None) -> List[OutputType]:"""Create Neo4j nodes for ports and relationships with IP addresses"""- if self.neo4j_conn and results:+ if self._graph_service and results:for port in results:# Get the IP address this port belongs toip_address = getattr(port, "_ip_address", None)diff --git a/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.py b/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.pyindex 7fbaf740..e922d8ee 100644--- a/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.py+++ b/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.py@@ -4,7 +4,6 @@ from typing import List, Dict, Any, Optionalfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnection@flowsint_enricher@@ -21,14 +20,12 @@ class N8nConnector(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,diff --git a/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.py b/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.pyindex b49cd8ab..ea26784e 100644--- a/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.py+++ b/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.py@@ -2,7 +2,6 @@ import osfrom typing import List, Dict, Any, Union, Optionalfrom flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricher-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_types.organization import Organizationfrom flowsint_types.asn import ASNfrom flowsint_core.core.logger import Logger@@ -21,14 +20,12 @@ class OrgToAsnEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -114,7 +111,7 @@ class OrgToAsnEnricher(Enricher):# Skip if no valid ASN was foundif result_asn.number == 0:continue- if self.neo4j_conn:+ if self._graph_service:# Create organization nodeself.create_node(input_org)# Create ASN nodediff --git a/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.py b/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.pyindex bc6e8bad..58ce5d29 100644--- a/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.py@@ -9,7 +9,6 @@ from flowsint_types.organization import Organizationfrom flowsint_types.individual import Individualfrom flowsint_types.address import Locationfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnectionfrom tools.network.whoxy import WhoxyToolfrom flowsint_core.utils import is_valid_domain, is_root_domainfrom dotenv import load_dotenv@@ -29,14 +28,12 @@ class OrgToDomainsEnricher(Enricher):self,sketch_id: Optional[str] = None,scan_id: Optional[str] = None,- neo4j_conn: Optional[Neo4jConnection] = None,vault=None,params: Optional[Dict[str, Any]] = None,):super().__init__(sketch_id=sketch_id,scan_id=scan_id,- neo4j_conn=neo4j_conn,params_schema=self.get_params_schema(),vault=vault,params=params,@@ -390,7 +387,7 @@ class OrgToDomainsEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:"""Create Neo4j nodes and relationships from extracted data."""- if not self.neo4j_conn:+ if not self._graph_service:Logger.info(self.sketch_id,{"message": "[WHOXY] No Neo4j connection, skipping postprocess"},diff --git a/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.py b/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.pyindex 62bf7012..da8232fd 100644--- a/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.py+++ b/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.py@@ -247,7 +247,7 @@ class OrgToInfosEnricher(Enricher):return Nonedef postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:- if not self.neo4j_conn:+ if not self._graph_service:return resultsfor org in results:diff --git a/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.py b/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.pyindex d7202947..e9ab8247 100644--- a/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.py+++ b/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.py@@ -83,7 +83,7 @@ class IgnorantEnricher(Enricher):"""Create Neo4j relationships for found phone accounts."""- if not self.neo4j_conn:+ if not self._graph_service:return resultsfor result in results:diff --git a/flowsint-enrichers/src/flowsint_enrichers/social/to_maigret.py b/flowsint-enrichers/src/flowsint_enrichers/social/to_maigret.pyindex 04a7a4de..a216543f 100644--- a/flowsint-enrichers/src/flowsint_enrichers/social/to_maigret.py+++ b/flowsint-enrichers/src/flowsint_enrichers/social/to_maigret.py@@ -135,7 +135,7 @@ class MaigretEnricher(Enricher):return resultsdef postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:- if not self.neo4j_conn:+ if not self._graph_service:return resultsfor profile in results:diff --git a/flowsint-enrichers/src/flowsint_enrichers/social/to_sherlock.py b/flowsint-enrichers/src/flowsint_enrichers/social/to_sherlock.pyindex d3666be1..057d0647 100644--- a/flowsint-enrichers/src/flowsint_enrichers/social/to_sherlock.py+++ b/flowsint-enrichers/src/flowsint_enrichers/social/to_sherlock.py@@ -97,7 +97,7 @@ class SherlockEnricher(Enricher):self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:"""Create Neo4j relationships for found social accounts."""- if not self.neo4j_conn:+ if not self._graph_service:return resultsfor social_account in results:diff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.pyindex 763efc6c..ab2b222a 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.py@@ -142,7 +142,7 @@ class WebsiteToCrawler(Enricher):website_url = str(input_website.url)# Create website node- if self.neo4j_conn:+ if self._graph_service:self.create_node(input_website)# Create email nodes and relationshipsdiff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_domain.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_domain.pyindex 6944ad7d..bab0d615 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_domain.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_domain.py@@ -61,7 +61,7 @@ class WebsiteToDomainEnricher(Enricher):self, results: List[OutputType], input_data: List[InputType] = None) -> List[OutputType]:# Create Neo4j relationships between websites and their corresponding domains- if input_data and self.neo4j_conn:+ if input_data and self._graph_service:for input_website, result in zip(input_data, results):website_url = str(input_website.url)domain_name = result.domaindiff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_links.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_links.pyindex 4a4822d5..585b596f 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_links.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_links.py@@ -51,7 +51,7 @@ class WebsiteToLinks(Enricher):main_domain = self.extract_domain(str(website.url))# Create main website and domain nodes upfront- if self.neo4j_conn:+ if self._graph_service:self.create_node(website)if main_domain:domain_obj = Domain(domain=main_domain)@@ -74,7 +74,7 @@ class WebsiteToLinks(Enricher):if domain:external_domains.add(domain)# Create external website node immediately- if self.neo4j_conn:+ if self._graph_service:url_obj = Website(url=url)self.create_node(url_obj)self.create_relationship(website, url_obj, "LINKS_TO")@@ -102,7 +102,7 @@ class WebsiteToLinks(Enricher):else:internal_urls.append(url)# Create internal website node immediately- if self.neo4j_conn and url != str(+ if self._graph_service and url != str(website.url): # Don't create duplicate of main websiteinternal_website = Website(url=url)@@ -180,7 +180,7 @@ class WebsiteToLinks(Enricher):# Still create main website and domain nodes even on errormain_domain = self.extract_domain(str(website.url))- if self.neo4j_conn:+ if self._graph_service:self.create_node(website)if main_domain:domain_obj_err = Domain(domain=main_domain)diff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_text.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_text.pyindex 9f8d8f7e..7e53d40c 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_text.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_text.py@@ -54,7 +54,7 @@ class WebsiteToText(Enricher):for input_website, result in zip(original_input, results):website_url = str(input_website.url)- if self.neo4j_conn:+ if self._graph_service:self.create_node(input_website)# Create relationship with the specific phrase for this websitediff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.pyindex 90920c0d..418616de 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.py@@ -4,7 +4,6 @@ from flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.website import Websitefrom flowsint_types.web_tracker import WebTrackerfrom flowsint_core.core.logger import Logger-from flowsint_core.core.graph_db import Neo4jConnectionfrom flowsint_core.core.vault import VaultProtocolfrom recontrack import TrackingCodeExtractor@@ -21,12 +20,11 @@ class WebsiteToWebtrackersEnricher(Enricher):self,sketch_id: str,scan_id: str,- neo4j_conn: Optional[Neo4jConnection] = None,params_schema: Optional[List[Dict[str, Any]]] = None,vault: Optional[VaultProtocol] = None,params: Optional[Dict[str, Any]] = None,):- super().__init__(sketch_id, scan_id, neo4j_conn, params_schema, vault, params)+ super().__init__(sketch_id, scan_id, params_schema, vault, params)self.tracker_website_mapping: List[tuple[WebTracker, Website]] = []@classmethod@@ -74,7 +72,7 @@ class WebsiteToWebtrackersEnricher(Enricher):def postprocess(self, results: List[OutputType], original_input: List[InputType]) -> List[OutputType]:# Create Neo4j relationships between websites and their corresponding trackers- if self.neo4j_conn:+ if self._graph_service:# Group trackers by website using the mapping we created during scanwebsite_trackers = {}for tracker, website in self.tracker_website_mapping: