A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
fix(ci): make isort's first-party grouping invocation-independent
dextmorgncf69a7e088db
diff --git a/flowsint-api/app/api/deps.py b/flowsint-api/app/api/deps.pyindex 6a5ff5fa..e2340433 100644--- a/flowsint-api/app/api/deps.py+++ b/flowsint-api/app/api/deps.py@@ -1,10 +1,11 @@from fastapi import Depends, HTTPException, statusfrom fastapi.security import OAuth2PasswordBearer+from jose import JWTError, jwt+from sqlalchemy.orm import Session+from flowsint_core.core.auth import ALGORITHM, AUTH_SECRETfrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_db-from jose import JWTError, jwt-from sqlalchemy.orm import Sessionoauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")diff --git a/flowsint-api/app/api/routes/analysis.py b/flowsint-api/app/api/routes/analysis.pyindex 58982c8a..4f08a20a 100644--- a/flowsint-api/app/api/routes/analysis.py+++ b/flowsint-api/app/api/routes/analysis.py@@ -2,6 +2,10 @@ from typing import Listfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, status+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.analysis import AnalysisCreate, AnalysisRead, AnalysisUpdatefrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_dbfrom flowsint_core.core.services import (@@ -9,10 +13,6 @@ from flowsint_core.core.services import (PermissionDeniedError,create_analysis_service,)-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.analysis import AnalysisCreate, AnalysisRead, AnalysisUpdaterouter = APIRouter()diff --git a/flowsint-api/app/api/routes/auth.py b/flowsint-api/app/api/routes/auth.pyindex bee6f3e5..6e58c0fa 100644--- a/flowsint-api/app/api/routes/auth.py+++ b/flowsint-api/app/api/routes/auth.py@@ -2,6 +2,11 @@ from typing import Listfrom fastapi import APIRouter, Depends, HTTPException, Queryfrom fastapi.security import OAuth2PasswordRequestForm+from sqlalchemy.exc import SQLAlchemyError+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.profile import ProfileCreate, ProfileRead, ProfileUpdatefrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_dbfrom flowsint_core.core.services import (@@ -10,11 +15,6 @@ from flowsint_core.core.services import (DatabaseError,create_auth_service,)-from sqlalchemy.exc import SQLAlchemyError-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.profile import ProfileCreate, ProfileRead, ProfileUpdaterouter = APIRouter()diff --git a/flowsint-api/app/api/routes/chat.py b/flowsint-api/app/api/routes/chat.pyindex 3f623e1d..ccf8d655 100644--- a/flowsint-api/app/api/routes/chat.py+++ b/flowsint-api/app/api/routes/chat.py@@ -3,17 +3,17 @@ from uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, statusfrom fastapi.responses import StreamingResponse+from pydantic import BaseModel+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.chat import ChatCreate, ChatReadfrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_dbfrom flowsint_core.core.services import (NotFoundError,create_chat_service,)-from pydantic import BaseModel-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.chat import ChatCreate, ChatReadrouter = APIRouter()diff --git a/flowsint-api/app/api/routes/custom_types.py b/flowsint-api/app/api/routes/custom_types.pyindex 15040ca9..8b2bfc59 100644--- a/flowsint-api/app/api/routes/custom_types.py+++ b/flowsint-api/app/api/routes/custom_types.py@@ -4,14 +4,6 @@ from typing import Listfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, status-from flowsint_core.core.models import Profile-from flowsint_core.core.postgre_db import get_db-from flowsint_core.core.services import (- ConflictError,- NotFoundError,- ValidationError,- create_custom_type_service,-)from sqlalchemy.orm import Sessionfrom app.api.deps import get_current_user@@ -27,6 +19,14 @@ from app.utils.custom_types import (validate_json_schema,validate_payload_against_schema,)+from flowsint_core.core.models import Profile+from flowsint_core.core.postgre_db import get_db+from flowsint_core.core.services import (+ ConflictError,+ NotFoundError,+ ValidationError,+ create_custom_type_service,+)router = APIRouter()diff --git a/flowsint-api/app/api/routes/enricher_templates.py b/flowsint-api/app/api/routes/enricher_templates.pyindex 142be263..2830b467 100644--- a/flowsint-api/app/api/routes/enricher_templates.py+++ b/flowsint-api/app/api/routes/enricher_templates.py@@ -4,6 +4,19 @@ from typing import Listfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, Query, status+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.enricher_template import (+ EnricherTemplateCreate,+ EnricherTemplateGenerateRequest,+ EnricherTemplateGenerateResponse,+ EnricherTemplateList,+ EnricherTemplateRead,+ EnricherTemplateTestRequest,+ EnricherTemplateTestResponse,+ EnricherTemplateUpdate,+)from flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_dbfrom flowsint_core.core.services import (@@ -18,19 +31,6 @@ from flowsint_core.core.vault import Vaultfrom flowsint_core.templates.types import Templatefrom flowsint_types.registry import get_type as get_type_from_registryfrom flowsint_types.registry import load_all_types-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.enricher_template import (- EnricherTemplateCreate,- EnricherTemplateGenerateRequest,- EnricherTemplateGenerateResponse,- EnricherTemplateList,- EnricherTemplateRead,- EnricherTemplateTestRequest,- EnricherTemplateTestResponse,- EnricherTemplateUpdate,-)router = APIRouter()diff --git a/flowsint-api/app/api/routes/enrichers.py b/flowsint-api/app/api/routes/enrichers.pyindex b2c96053..e4692761 100644--- a/flowsint-api/app/api/routes/enrichers.py+++ b/flowsint-api/app/api/routes/enrichers.py@@ -1,6 +1,10 @@from typing import List, Optionalfrom fastapi import APIRouter, Depends, HTTPException, Query+from pydantic import BaseModel+from sqlalchemy.orm import Session++from app.api.deps import get_current_userfrom flowsint_core.core.celery import celeryfrom flowsint_core.core.graph import create_graph_servicefrom flowsint_core.core.models import Profile@@ -13,10 +17,6 @@ from flowsint_core.core.services.type_registry_service import (create_type_registry_service,)from flowsint_enrichers import ENRICHER_REGISTRY, load_all_enrichers-from pydantic import BaseModel-from sqlalchemy.orm import Session--from app.api.deps import get_current_userload_all_enrichers()diff --git a/flowsint-api/app/api/routes/events.py b/flowsint-api/app/api/routes/events.pyindex 5cc367e7..61a7d1c0 100644--- a/flowsint-api/app/api/routes/events.py+++ b/flowsint-api/app/api/routes/events.py@@ -3,6 +3,10 @@ import jsonfrom datetime import datetimefrom fastapi import APIRouter, Depends, HTTPException, Request+from sqlalchemy.orm import Session+from sse_starlette.sse import EventSourceResponse++from app.api.deps import get_current_userfrom flowsint_core.core.events import event_emitterfrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_db@@ -12,10 +16,6 @@ from flowsint_core.core.services import (PermissionDeniedError,create_log_service,)-from sqlalchemy.orm import Session-from sse_starlette.sse import EventSourceResponse--from app.api.deps import get_current_userrouter = APIRouter()diff --git a/flowsint-api/app/api/routes/flows.py b/flowsint-api/app/api/routes/flows.pyindex c80a7f88..4f9b1bd7 100644--- a/flowsint-api/app/api/routes/flows.py+++ b/flowsint-api/app/api/routes/flows.py@@ -2,6 +2,11 @@ from typing import Any, Dict, List, Optionalfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, Query, status+from pydantic import BaseModel+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.flow import FlowCreate, FlowRead, FlowUpdatefrom flowsint_core.core.celery import celeryfrom flowsint_core.core.graph import create_graph_servicefrom flowsint_core.core.models import Profile@@ -36,11 +41,6 @@ from flowsint_types import (Username,Website,)-from pydantic import BaseModel-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.flow import FlowCreate, FlowRead, FlowUpdateload_all_enrichers()diff --git a/flowsint-api/app/api/routes/investigations.py b/flowsint-api/app/api/routes/investigations.pyindex 7e10ed0d..6e0078dc 100644--- a/flowsint-api/app/api/routes/investigations.py+++ b/flowsint-api/app/api/routes/investigations.py@@ -2,16 +2,6 @@ from typing import Listfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, status-from flowsint_core.core.models import Profile-from flowsint_core.core.postgre_db import get_db-from flowsint_core.core.services import (- ConflictError,- DatabaseError,- NotFoundError,- PermissionDeniedError,- create_investigation_service,-)-from flowsint_core.core.types import Rolefrom sqlalchemy.orm import Sessionfrom app.api.deps import get_current_user@@ -24,6 +14,16 @@ from app.api.schemas.investigation import (InvestigationUpdate,)from app.api.schemas.sketch import SketchRead+from flowsint_core.core.models import Profile+from flowsint_core.core.postgre_db import get_db+from flowsint_core.core.services import (+ ConflictError,+ DatabaseError,+ NotFoundError,+ PermissionDeniedError,+ create_investigation_service,+)+from flowsint_core.core.types import Rolerouter = APIRouter()diff --git a/flowsint-api/app/api/routes/keys.py b/flowsint-api/app/api/routes/keys.pyindex 6c09085c..c696f112 100644--- a/flowsint-api/app/api/routes/keys.py+++ b/flowsint-api/app/api/routes/keys.py@@ -2,6 +2,10 @@ from typing import Listfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, status+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.key import KeyCreate, KeyExists, KeyReadfrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_dbfrom flowsint_core.core.services import (@@ -9,10 +13,6 @@ from flowsint_core.core.services import (NotFoundError,create_key_service,)-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.key import KeyCreate, KeyExists, KeyReadrouter = APIRouter()diff --git a/flowsint-api/app/api/routes/scan.py b/flowsint-api/app/api/routes/scan.pyindex 7323290a..9cd02d3d 100644--- a/flowsint-api/app/api/routes/scan.py+++ b/flowsint-api/app/api/routes/scan.py@@ -2,6 +2,10 @@ from typing import Listfrom uuid import UUIDfrom fastapi import APIRouter, Depends, HTTPException, status+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.scan import ScanReadfrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_dbfrom flowsint_core.core.services import (@@ -9,10 +13,6 @@ from flowsint_core.core.services import (PermissionDeniedError,create_scan_service,)-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.scan import ScanReadrouter = APIRouter()diff --git a/flowsint-api/app/api/routes/sketches.py b/flowsint-api/app/api/routes/sketches.pyindex 0762e836..396b69f0 100644--- a/flowsint-api/app/api/routes/sketches.py+++ b/flowsint-api/app/api/routes/sketches.py@@ -11,6 +11,12 @@ from fastapi import (UploadFile,status,)+from pydantic import BaseModel, Field+from sqlalchemy.orm import Session++from app.api.deps import get_current_user+from app.api.schemas.sketch import SketchCreate, SketchRead, SketchUpdate+from app.api.sketch_utils import update_sketch_timestampfrom flowsint_core.core.graph import GraphNode, create_graph_servicefrom flowsint_core.core.models import Profilefrom flowsint_core.core.postgre_db import get_db@@ -29,12 +35,6 @@ from flowsint_core.imports import (FileParseResult,create_import_service,)-from pydantic import BaseModel, Field-from sqlalchemy.orm import Session--from app.api.deps import get_current_user-from app.api.schemas.sketch import SketchCreate, SketchRead, SketchUpdate-from app.api.sketch_utils import update_sketch_timestamprouter = APIRouter()diff --git a/flowsint-api/app/api/routes/types.py b/flowsint-api/app/api/routes/types.pyindex c42ae6ca..1da01224 100644--- a/flowsint-api/app/api/routes/types.py+++ b/flowsint-api/app/api/routes/types.py@@ -1,11 +1,11 @@from fastapi import APIRouter, Depends-from flowsint_core.core.models import Profile-from flowsint_core.core.postgre_db import get_db-from flowsint_core.core.services import create_type_registry_servicefrom pydantic import BaseModelfrom sqlalchemy.orm import Sessionfrom app.api.deps import get_current_user+from flowsint_core.core.models import Profile+from flowsint_core.core.postgre_db import get_db+from flowsint_core.core.services import create_type_registry_servicerouter = APIRouter()diff --git a/flowsint-api/app/api/sketch_utils.py b/flowsint-api/app/api/sketch_utils.pyindex 781b7f31..69bbe470 100644--- a/flowsint-api/app/api/sketch_utils.py+++ b/flowsint-api/app/api/sketch_utils.py@@ -6,9 +6,10 @@ from typing import Callablefrom uuid import UUIDfrom fastapi import BackgroundTasks-from flowsint_core.core.models import Investigation, Sketchfrom sqlalchemy.orm import Session+from flowsint_core.core.models import Investigation, Sketch+def update_sketch_last_modified(db: Session, sketch_id: str | UUID) -> None:"""diff --git a/flowsint-api/app/security/permissions.py b/flowsint-api/app/security/permissions.pyindex 16bc0334..9f148872 100644--- a/flowsint-api/app/security/permissions.py+++ b/flowsint-api/app/security/permissions.py@@ -1,6 +1,7 @@from uuid import UUIDfrom fastapi import HTTPException+from flowsint_core.core.models import InvestigationUserRolefrom flowsint_core.core.types import Rolediff --git a/flowsint-api/pyproject.toml b/flowsint-api/pyproject.tomlindex 4636aac1..b00bd8e9 100644--- a/flowsint-api/pyproject.toml+++ b/flowsint-api/pyproject.toml@@ -60,6 +60,11 @@ target-version = ['py311'][tool.isort]profile = "black"multi_line_output = 3+# Explicit, not auto-detected: isort's first-party detection depends on which+# files it's invoked with, so "flowsint_enrichers" gets grouped differently+# when sorted alone vs alongside the other packages (as CI/make lint does).+# Same list must be kept in sync across all 4 packages' pyproject.toml.+known_first_party = ["flowsint_core", "flowsint_types", "flowsint_enrichers", "flowsint_api"][tool.mypy]python_version = "3.11"diff --git a/flowsint-api/tests/conftest.py b/flowsint-api/tests/conftest.pyindex b5980f7b..7abb68fd 100644--- a/flowsint-api/tests/conftest.py+++ b/flowsint-api/tests/conftest.py@@ -11,12 +11,12 @@ os.environ.setdefault(import pytest # noqa: E402from fastapi.testclient import TestClient # noqa: E402-from flowsint_core.core.models import Base # noqa: E402-from flowsint_core.core.postgre_db import get_db # noqa: E402from sqlalchemy import create_engine # noqa: E402from sqlalchemy.orm import sessionmaker # noqa: E402from app.main import app # noqa: E402+from flowsint_core.core.models import Base # noqa: E402+from flowsint_core.core.postgre_db import get_db # noqa: E402@pytest.fixturediff --git a/flowsint-core/pyproject.toml b/flowsint-core/pyproject.tomlindex 8d32c5d0..27e0cd59 100644--- a/flowsint-core/pyproject.toml+++ b/flowsint-core/pyproject.toml@@ -59,6 +59,11 @@ target-version = ['py311'][tool.isort]profile = "black"multi_line_output = 3+# Explicit, not auto-detected: isort's first-party detection depends on which+# files it's invoked with, so "flowsint_enrichers" gets grouped differently+# when sorted alone vs alongside the other packages (as CI/make lint does).+# Same list must be kept in sync across all 4 packages' pyproject.toml.+known_first_party = ["flowsint_core", "flowsint_types", "flowsint_enrichers", "flowsint_api"][tool.mypy]python_version = "3.11"diff --git a/flowsint-core/src/flowsint_core/core/graph/serializer.py b/flowsint-core/src/flowsint_core/core/graph/serializer.pyindex 8070f46a..10e1fe28 100644--- a/flowsint-core/src/flowsint_core/core/graph/serializer.py+++ b/flowsint-core/src/flowsint_core/core/graph/serializer.py@@ -7,9 +7,10 @@ into Neo4j-compatible primitive types, following the Single Responsibility Princfrom typing import Any, Callable, Dict, List, Optional, Type+from pydantic import BaseModel, ValidationError+from flowsint_core.utils import flatten, unflattenfrom flowsint_types import FlowsintType-from pydantic import BaseModel, ValidationErrorfrom .types import GraphEdge, GraphNode, NodeMetadatadiff --git a/flowsint-core/src/flowsint_core/core/graph/service.py b/flowsint-core/src/flowsint_core/core/graph/service.pyindex 1054b403..450cf52a 100644--- a/flowsint-core/src/flowsint_core/core/graph/service.py+++ b/flowsint-core/src/flowsint_core/core/graph/service.py@@ -7,9 +7,10 @@ integrating repository and logging functionality.from typing import Any, Dict, List, Optional, Protocol-from flowsint_types import FlowsintTypefrom pydantic import BaseModel+from flowsint_types import FlowsintType+from .repository import Neo4jGraphRepositoryfrom .repository_protocol import GraphRepositoryProtocolfrom .serializer import GraphSerializer, TypeResolverdiff --git a/flowsint-core/src/flowsint_core/core/models.py b/flowsint-core/src/flowsint_core/core/models.pyindex 86ec51d5..c3689b01 100644--- a/flowsint-core/src/flowsint_core/core/models.py+++ b/flowsint-core/src/flowsint_core/core/models.py@@ -2,8 +2,6 @@ import jsonimport uuidfrom datetime import datetime, timezone-from flowsint_core.core.enums import EventLevel-from flowsint_core.core.types import Rolefrom sqlalchemy import (JSON,Boolean,@@ -25,6 +23,9 @@ from sqlalchemy import (from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationshipfrom sqlalchemy.types import TypeDecorator+from flowsint_core.core.enums import EventLevel+from flowsint_core.core.types import Role+class RoleListType(TypeDecorator):"""Stores a list of Role enums as a JSON string. Portable across dialects."""diff --git a/flowsint-core/src/flowsint_core/core/orchestrator.py b/flowsint-core/src/flowsint_core/core/orchestrator.pyindex d3c171e9..b0600a60 100644--- a/flowsint-core/src/flowsint_core/core/orchestrator.py+++ b/flowsint-core/src/flowsint_core/core/orchestrator.py@@ -5,9 +5,10 @@ import timefrom datetime import datetimefrom typing import Any, Dict, List-from flowsint_enrichers import ENRICHER_REGISTRYfrom pydantic import ValidationError+from flowsint_enrichers import ENRICHER_REGISTRY+from ..utils import to_json_serializablefrom .enricher_base import Enricherfrom .logger import Loggerdiff --git a/flowsint-core/src/flowsint_core/core/services/template_generator_service.py b/flowsint-core/src/flowsint_core/core/services/template_generator_service.pyindex cbac1c85..75be7a88 100644--- a/flowsint-core/src/flowsint_core/core/services/template_generator_service.py+++ b/flowsint-core/src/flowsint_core/core/services/template_generator_service.py@@ -11,9 +11,10 @@ from typing import Any, Dict, Optionalfrom uuid import UUIDimport yaml-from flowsint_core.templates.types import Templatefrom sqlalchemy.orm import Session+from flowsint_core.templates.types import Template+from ..llm import ChatMessage, MessageRole, create_llm_providerfrom .base import BaseServicefrom .exceptions import ValidationErrordiff --git a/flowsint-core/src/flowsint_core/core/services/type_registry_service.py b/flowsint-core/src/flowsint_core/core/services/type_registry_service.pyindex a64b32a9..46912407 100644--- a/flowsint-core/src/flowsint_core/core/services/type_registry_service.py+++ b/flowsint-core/src/flowsint_core/core/services/type_registry_service.py@@ -5,10 +5,11 @@ Type registry service for managing flowsint types.from typing import Any, Dict, List, Optional, Typefrom uuid import UUID, uuid4-from flowsint_types import FlowsintTypefrom pydantic import BaseModel, TypeAdapter, create_modelfrom sqlalchemy.orm import Session+from flowsint_types import FlowsintType+from ..graph.serializer import TypeResolverfrom ..repositories import CustomTypeRepositoryfrom .base import BaseServicediff --git a/flowsint-core/src/flowsint_core/core/template_enricher.py b/flowsint-core/src/flowsint_core/core/template_enricher.pyindex 0f9207e0..10b7e514 100644--- a/flowsint-core/src/flowsint_core/core/template_enricher.py+++ b/flowsint-core/src/flowsint_core/core/template_enricher.py@@ -48,6 +48,7 @@ import xml.etree.ElementTree as ETfrom typing import Any, Dict, List, Optionalimport httpx+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_core.templates.loader.yaml_loader import (diff --git a/flowsint-core/src/flowsint_core/imports/import_service.py b/flowsint-core/src/flowsint_core/imports/import_service.pyindex a52c3ad9..0b597e5d 100644--- a/flowsint-core/src/flowsint_core/imports/import_service.py+++ b/flowsint-core/src/flowsint_core/imports/import_service.py@@ -8,10 +8,9 @@ handling file parsing, entity conversion, and batch creation.from dataclasses import dataclassfrom typing import Any, Dict, List, Optional-from flowsint_types import FlowsintType-from flowsint_core.core.graph import GraphSerializer, GraphServicefrom flowsint_core.core.graph.serializer import TypeResolver+from flowsint_types import FlowsintType@dataclassdiff --git a/flowsint-core/src/flowsint_core/tasks/enricher.py b/flowsint-core/src/flowsint_core/tasks/enricher.pyindex 4e9d79e9..512c6dd8 100644--- a/flowsint-core/src/flowsint_core/tasks/enricher.py+++ b/flowsint-core/src/flowsint_core/tasks/enricher.py@@ -3,9 +3,10 @@ import uuidfrom typing import List, Optionalfrom celery import states+from sqlalchemy.orm import Session+from flowsint_core.utils import to_json_serializablefrom flowsint_enrichers import ENRICHER_REGISTRY, load_all_enrichers-from sqlalchemy.orm import Sessionfrom ..core.celery import celeryfrom ..core.enums import EventLeveldiff --git a/flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py b/flowsint-core/src/flowsint_core/templates/loader/yaml_loader.pyindex d206fa22..bfd47404 100644--- a/flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py+++ b/flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py@@ -4,6 +4,7 @@ from typing import Any, Optional, Setfrom urllib.parse import urlparseimport yaml+from flowsint_core.core.graph.serializer import TypeResolverfrom flowsint_core.templates.types import Templatediff --git a/flowsint-core/tests/conftest.py b/flowsint-core/tests/conftest.pyindex 66cb555e..f3a24847 100644--- a/flowsint-core/tests/conftest.py+++ b/flowsint-core/tests/conftest.py@@ -3,10 +3,11 @@from unittest.mock import MagicMockimport pytest-from flowsint_core.core.models import Basefrom sqlalchemy import create_engine, eventfrom sqlalchemy.orm import sessionmaker+from flowsint_core.core.models import Base+@pytest.fixture(autouse=True)def setup_test_environment(monkeypatch):diff --git a/flowsint-core/tests/core/graph/test_graph_repository.py b/flowsint-core/tests/core/graph/test_graph_repository.pyindex 04516946..c6726d06 100644--- a/flowsint-core/tests/core/graph/test_graph_repository.py+++ b/flowsint-core/tests/core/graph/test_graph_repository.py@@ -3,6 +3,7 @@from unittest.mock import MagicMock, patchimport pytest+from flowsint_core.core.graph import Neo4jGraphRepositorydiff --git a/flowsint-core/tests/core/graph/test_graph_serializer.py b/flowsint-core/tests/core/graph/test_graph_serializer.pyindex 4fee12a6..292f3500 100644--- a/flowsint-core/tests/core/graph/test_graph_serializer.py+++ b/flowsint-core/tests/core/graph/test_graph_serializer.py@@ -1,7 +1,6 @@from datetime import datetimeimport pytest-from flowsint_types import Domain, Ipfrom flowsint_core.core.graph import (GraphEdge,@@ -9,6 +8,7 @@ from flowsint_core.core.graph import (GraphSerializer,NodeMetadata,)+from flowsint_types import Domain, Ipdef test_serializer():diff --git a/flowsint-core/tests/core/graph/test_graph_service.py b/flowsint-core/tests/core/graph/test_graph_service.pyindex cbff32e7..82081034 100644--- a/flowsint-core/tests/core/graph/test_graph_service.py+++ b/flowsint-core/tests/core/graph/test_graph_service.py@@ -3,6 +3,7 @@from unittest.mock import MagicMock, patchimport pytest+from flowsint_core.core.graph import (GraphData,GraphNode,diff --git a/flowsint-core/tests/core/test_logger_singleton.py b/flowsint-core/tests/core/test_logger_singleton.pyindex 96119481..c22481d6 100644--- a/flowsint-core/tests/core/test_logger_singleton.py+++ b/flowsint-core/tests/core/test_logger_singleton.py@@ -16,6 +16,7 @@ from unittest.mock import Mock, patchfrom uuid import uuid4import pytest+from flowsint_core.core.enums import EventLevelfrom flowsint_core.core.logger import LoggerSingletondiff --git a/flowsint-core/tests/factories.py b/flowsint-core/tests/factories.pyindex d6b5e076..e14df0f5 100644--- a/flowsint-core/tests/factories.py+++ b/flowsint-core/tests/factories.py@@ -5,6 +5,7 @@ from uuid import uuid4import factoryfrom factory.alchemy import SQLAlchemyModelFactory+from flowsint_core.core.enums import EventLevelfrom flowsint_core.core.models import (Analysis,diff --git a/flowsint-core/tests/import/txt/test_txt_import.py b/flowsint-core/tests/import/txt/test_txt_import.pyindex 140a1c8c..399cbb43 100644--- a/flowsint-core/tests/import/txt/test_txt_import.py+++ b/flowsint-core/tests/import/txt/test_txt_import.py@@ -4,6 +4,7 @@ Tests automatic entity detection and parsing of plain text files."""import pytest+from flowsint_core.imports import parse_import_filefrom flowsint_core.imports.txt.parse_txt import parse_txtfrom flowsint_types import Domain, Email, Ipdiff --git a/flowsint-core/tests/repositories/test_analysis_repository.py b/flowsint-core/tests/repositories/test_analysis_repository.pyindex 18d7880d..ddd7230c 100644--- a/flowsint-core/tests/repositories/test_analysis_repository.py+++ b/flowsint-core/tests/repositories/test_analysis_repository.py@@ -2,7 +2,6 @@from flowsint_core.core.repositories import AnalysisRepositoryfrom flowsint_core.core.types import Role-from tests.factories import (AnalysisFactory,InvestigationFactory,diff --git a/flowsint-core/tests/repositories/test_chat_repository.py b/flowsint-core/tests/repositories/test_chat_repository.pyindex 4d06f628..caf96883 100644--- a/flowsint-core/tests/repositories/test_chat_repository.py+++ b/flowsint-core/tests/repositories/test_chat_repository.py@@ -5,7 +5,6 @@ from uuid import uuid4from flowsint_core.core.models import ChatMessagefrom flowsint_core.core.repositories import ChatRepository-from tests.factories import (ChatFactory,ChatMessageFactory,diff --git a/flowsint-core/tests/repositories/test_custom_type_repository.py b/flowsint-core/tests/repositories/test_custom_type_repository.pyindex c3780cab..e0e1030d 100644--- a/flowsint-core/tests/repositories/test_custom_type_repository.py+++ b/flowsint-core/tests/repositories/test_custom_type_repository.py@@ -1,7 +1,6 @@"""Tests for CustomTypeRepository."""from flowsint_core.core.repositories import CustomTypeRepository-from tests.factories import CustomTypeFactory, ProfileFactorydiff --git a/flowsint-core/tests/repositories/test_flow_repository.py b/flowsint-core/tests/repositories/test_flow_repository.pyindex af5a7064..f765af4d 100644--- a/flowsint-core/tests/repositories/test_flow_repository.py+++ b/flowsint-core/tests/repositories/test_flow_repository.py@@ -1,7 +1,6 @@"""Tests for FlowRepository."""from flowsint_core.core.repositories import FlowRepository-from tests.factories import FlowFactorydiff --git a/flowsint-core/tests/repositories/test_investigation_repository.py b/flowsint-core/tests/repositories/test_investigation_repository.pyindex cf274e45..8980474f 100644--- a/flowsint-core/tests/repositories/test_investigation_repository.py+++ b/flowsint-core/tests/repositories/test_investigation_repository.py@@ -5,7 +5,6 @@ from uuid import uuid4from flowsint_core.core.models import InvestigationUserRolefrom flowsint_core.core.repositories import InvestigationRepositoryfrom flowsint_core.core.types import Role-from tests.factories import (InvestigationFactory,InvestigationUserRoleFactory,diff --git a/flowsint-core/tests/repositories/test_key_repository.py b/flowsint-core/tests/repositories/test_key_repository.pyindex be534dab..4c569d70 100644--- a/flowsint-core/tests/repositories/test_key_repository.py+++ b/flowsint-core/tests/repositories/test_key_repository.py@@ -1,7 +1,6 @@"""Tests for KeyRepository."""from flowsint_core.core.repositories import KeyRepository-from tests.factories import KeyFactory, ProfileFactorydiff --git a/flowsint-core/tests/repositories/test_log_repository.py b/flowsint-core/tests/repositories/test_log_repository.pyindex b3877521..1ccb7f76 100644--- a/flowsint-core/tests/repositories/test_log_repository.py+++ b/flowsint-core/tests/repositories/test_log_repository.py@@ -4,7 +4,6 @@ from datetime import datetimefrom uuid import uuid4from flowsint_core.core.repositories import LogRepository-from tests.factories import (InvestigationFactory,LogFactory,diff --git a/flowsint-core/tests/repositories/test_profile_repository.py b/flowsint-core/tests/repositories/test_profile_repository.pyindex 75f1dc68..e4b9a574 100644--- a/flowsint-core/tests/repositories/test_profile_repository.py+++ b/flowsint-core/tests/repositories/test_profile_repository.py@@ -3,7 +3,6 @@from uuid import uuid4from flowsint_core.core.repositories import ProfileRepository-from tests.factories import ProfileFactorydiff --git a/flowsint-core/tests/repositories/test_scan_repository.py b/flowsint-core/tests/repositories/test_scan_repository.pyindex 0d0f865d..2e429988 100644--- a/flowsint-core/tests/repositories/test_scan_repository.py+++ b/flowsint-core/tests/repositories/test_scan_repository.py@@ -2,7 +2,6 @@from flowsint_core.core.repositories import ScanRepositoryfrom flowsint_core.core.types import Role-from tests.factories import (InvestigationFactory,InvestigationUserRoleFactory,diff --git a/flowsint-core/tests/repositories/test_sketch_repository.py b/flowsint-core/tests/repositories/test_sketch_repository.pyindex bb31af7a..afb0a11f 100644--- a/flowsint-core/tests/repositories/test_sketch_repository.py+++ b/flowsint-core/tests/repositories/test_sketch_repository.py@@ -1,7 +1,6 @@"""Tests for SketchRepository."""from flowsint_core.core.repositories import SketchRepository-from tests.factories import InvestigationFactory, ProfileFactory, SketchFactorydiff --git a/flowsint-core/tests/services/test_enricher_template_service.py b/flowsint-core/tests/services/test_enricher_template_service.pyindex e7cf2060..d213c6db 100644--- a/flowsint-core/tests/services/test_enricher_template_service.py+++ b/flowsint-core/tests/services/test_enricher_template_service.py@@ -1,12 +1,12 @@"""Tests for EnricherTemplateService."""import pytest+from flowsint_core.core.repositories import EnricherTemplateRepositoryfrom flowsint_core.core.services.enricher_template_service import (EnricherTemplateService,)from flowsint_core.core.services.exceptions import ConflictError, NotFoundError-from tests.factories import EnricherTemplateFactory, ProfileFactorydiff --git a/flowsint-core/tests/services/test_template_generator_service.py b/flowsint-core/tests/services/test_template_generator_service.pyindex e0b7fad0..33d02411 100644--- a/flowsint-core/tests/services/test_template_generator_service.py+++ b/flowsint-core/tests/services/test_template_generator_service.py@@ -4,6 +4,7 @@ from unittest.mock import AsyncMock, MagicMock, patchfrom uuid import uuid4import pytest+from flowsint_core.core.services.exceptions import ValidationErrorfrom flowsint_core.core.services.template_generator_service import (TemplateGeneratorService,diff --git a/flowsint-core/tests/templates/test_loader.py b/flowsint-core/tests/templates/test_loader.pyindex 1b928942..87ce339c 100644--- a/flowsint-core/tests/templates/test_loader.py+++ b/flowsint-core/tests/templates/test_loader.py@@ -3,6 +3,7 @@from pathlib import Pathimport pytest+from flowsint_core.templates.loader.yaml_loader import (SSRFError,TemplateRenderError,diff --git a/flowsint-core/tests/templates/test_template_enricher.py b/flowsint-core/tests/templates/test_template_enricher.pyindex 69bd6159..e7da0c7c 100644--- a/flowsint-core/tests/templates/test_template_enricher.py+++ b/flowsint-core/tests/templates/test_template_enricher.py@@ -5,6 +5,7 @@ from typing import Optionalimport httpximport pytest+from flowsint_core.core.template_enricher import (TemplateEnricher,)diff --git a/flowsint-core/tests/vault/test_enricher_vault_integration.py b/flowsint-core/tests/vault/test_enricher_vault_integration.pyindex 7099039e..69771817 100644--- a/flowsint-core/tests/vault/test_enricher_vault_integration.py+++ b/flowsint-core/tests/vault/test_enricher_vault_integration.py@@ -5,6 +5,7 @@ from typing import Any, Dict, Listfrom unittest.mock import Mockimport pytest+from flowsint_core.core.enricher_base import Enricherdiff --git a/flowsint-core/tests/vault/test_vault.py b/flowsint-core/tests/vault/test_vault.pyindex 4c3c3ff4..3c099fc6 100644--- a/flowsint-core/tests/vault/test_vault.py+++ b/flowsint-core/tests/vault/test_vault.py@@ -4,6 +4,7 @@ import uuidfrom unittest.mock import MagicMock, Mockimport pytest+from flowsint_core.core.models import Keyfrom flowsint_core.core.vault import Vaultdiff --git a/flowsint-enrichers/pyproject.toml b/flowsint-enrichers/pyproject.tomlindex 5aedfc04..a56ae7b2 100644--- a/flowsint-enrichers/pyproject.toml+++ b/flowsint-enrichers/pyproject.toml@@ -58,6 +58,11 @@ target-version = ['py311'][tool.isort]profile = "black"multi_line_output = 3+# Explicit, not auto-detected: isort's first-party detection depends on which+# files it's invoked with, so "flowsint_enrichers" gets grouped differently+# when sorted alone vs alongside the other packages (as CI/make lint does).+# Same list must be kept in sync across all 4 packages' pyproject.toml.+known_first_party = ["flowsint_core", "flowsint_types", "flowsint_enrichers", "flowsint_api"][tool.mypy]python_version = "3.11"diff --git a/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.py b/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.pyindex 0d922f32..960f27c3 100644--- a/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.py+++ b/flowsint-enrichers/src/flowsint_enrichers/asn/to_cidrs.py@@ -1,12 +1,13 @@import osfrom typing import Any, Dict, List, Optional+from tools.network.asnmap import AsnmapTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.asn import ASNfrom flowsint_types.cidr import CIDR-from tools.network.asnmap import AsnmapTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.py b/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.pyindex 4a6f1146..296a4d7e 100644--- a/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.py+++ b/flowsint-enrichers/src/flowsint_enrichers/cidr/to_ips.py@@ -1,12 +1,13 @@import osfrom typing import Any, Dict, List, Optional+from tools.network.mapcidr import MapcidrTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.cidr import CIDRfrom flowsint_types.ip import Ip-from tools.network.mapcidr import MapcidrTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.py b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.pyindex 9dc24fb8..48f3843a 100644--- a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.py+++ b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_nfts.py@@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optionalimport requestsfrom dotenv import load_dotenv+from flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.wallet import CryptoNFT, CryptoWalletdiff --git a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.py b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.pyindex 7ca276ad..e81800f7 100644--- a/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.py+++ b/flowsint-enrichers/src/flowsint_enrichers/crypto/to_transactions.py@@ -5,6 +5,7 @@ from typing import Any, Dict, List, Optionalimport requestsimport requests.exceptionsfrom dotenv import load_dotenv+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.pyindex 22a4a33f..b17095f0 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_asn.py@@ -1,12 +1,13 @@import osfrom typing import Any, Dict, List, Optional+from tools.network.asnmap import AsnmapTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.asn import ASNfrom flowsint_types.domain import Domain-from tools.network.asnmap import AsnmapTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_dehashed.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_dehashed.pyindex f4e52d21..194f0f30 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_dehashed.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_dehashed.py@@ -3,6 +3,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_dns.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_dns.pyindex e146e3da..1d4e049d 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_dns.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_dns.py@@ -1,11 +1,12 @@from typing import Any, Dict, List, Optional+from tools.network.dnsx import DnsxTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.domain import Domainfrom flowsint_types.ip import Ip-from tools.network.dnsx import DnsxTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.pyindex c482d791..baecec6f 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_history.py@@ -4,6 +4,8 @@ import timefrom typing import Any, Dict, List, Optional, Setfrom dotenv import load_dotenv+from tools.network.whoxy import WhoxyTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricher@@ -13,7 +15,6 @@ from flowsint_types.email import Emailfrom flowsint_types.individual import Individualfrom flowsint_types.organization import Organizationfrom flowsint_types.phone import Phone-from tools.network.whoxy import WhoxyToolload_dotenv()diff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.pyindex 9980e995..c2824cbe 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.py@@ -1,11 +1,12 @@from typing import List+from tools.network.httpx import HttpxTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.domain import Domainfrom flowsint_types.website import Website-from tools.network.httpx import HttpxTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.pyindex 249afd34..72eed3f1 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_subdomains.py@@ -1,12 +1,13 @@from typing import Listimport requests+from tools.network.subfinder import SubfinderTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_core.utils import is_valid_domainfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.domain import Domain-from tools.network.subfinder import SubfinderTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.pyindex edfc3a00..201c298a 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py@@ -2,6 +2,7 @@ from typing import Dict, Listimport requestsfrom bs4 import BeautifulSoup+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.pyindex ece2a057..f56c71b4 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois.py@@ -1,6 +1,7 @@from typing import Listimport whois+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois_history.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois_history.pyindex c9bf77b6..836164c2 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois_history.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_whois_history.py@@ -3,6 +3,8 @@ import refrom typing import Any, Dict, List, Optional, Setfrom dotenv import load_dotenv+from tools.network.whoisxml import WhoisXmlTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricher@@ -12,7 +14,6 @@ from flowsint_types.email import Emailfrom flowsint_types.individual import Individualfrom flowsint_types.organization import Organizationfrom flowsint_types.whois import Whois-from tools.network.whoisxml import WhoisXmlToolload_dotenv()diff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_dehashed.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_dehashed.pyindex 0a9ca678..0cb926b3 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_dehashed.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_dehashed.py@@ -3,6 +3,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.pyindex a67bfc1e..59b59d6f 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_domains.py@@ -3,6 +3,8 @@ import refrom typing import Any, Dict, List, Optional, Setfrom dotenv import load_dotenv+from tools.network.whoxy import WhoxyTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricher@@ -11,7 +13,6 @@ from flowsint_types.domain import Domainfrom flowsint_types.email import Emailfrom flowsint_types.individual import Individualfrom flowsint_types.phone import Phone-from tools.network.whoxy import WhoxyToolload_dotenv()diff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.pyindex 0b75405b..1f130860 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_gravatar.py@@ -2,6 +2,7 @@ import hashlibfrom typing import Listimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_hudsonrock.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_hudsonrock.pyindex d7d74fc7..d6bc9fdf 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_hudsonrock.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_hudsonrock.py@@ -1,6 +1,7 @@from typing import Listimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.py b/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.pyindex 7b5bc510..af074a46 100644--- a/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.py+++ b/flowsint-enrichers/src/flowsint_enrichers/email/to_leaks.py@@ -4,6 +4,7 @@ from urllib.parse import urljoinimport requestsfrom dotenv import load_dotenv+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.py b/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.pyindex 3e0431c5..920f6058 100644--- a/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/individual/to_domains.py@@ -3,11 +3,12 @@ import refrom typing import Any, Dict, List, Optional, Set, Unionfrom dotenv import load_dotenv+from tools.network.whoxy import WhoxyTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types import Domain, Email, Individual, Location, Phone-from tools.network.whoxy import WhoxyToolload_dotenv()diff --git a/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.py b/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.pyindex 8b667331..b375e1b6 100644--- a/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.py+++ b/flowsint-enrichers/src/flowsint_enrichers/individual/to_org.py@@ -1,11 +1,12 @@from typing import Dict, List, Set, Union+from tools.organizations.sirene import SireneTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.individual import Individualfrom flowsint_types.organization import Organization-from tools.organizations.sirene import SireneTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.pyindex b6568e10..05a28e0c 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_asn.py@@ -1,12 +1,13 @@import osfrom typing import Any, Dict, List, Optional+from tools.network.asnmap import AsnmapTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.asn import ASNfrom flowsint_types.ip import Ip-from tools.network.asnmap import AsnmapTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_dehashed.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_dehashed.pyindex 69175c7e..f90ea441 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_dehashed.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_dehashed.py@@ -3,6 +3,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_domain.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_domain.pyindex 1cb0ee81..53fc526f 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_domain.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_domain.py@@ -2,6 +2,7 @@ import socketfrom typing import Listimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_fraudscore.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_fraudscore.pyindex fa79884d..98c84934 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_fraudscore.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_fraudscore.py@@ -3,6 +3,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.pyindex 3f894cf8..0d3332f7 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_infos.py@@ -1,6 +1,7 @@from typing import Any, Dict, Listimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.ip import Ipdiff --git a/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.py b/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.pyindex 2cc5364f..9b7b1264 100644--- a/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.py+++ b/flowsint-enrichers/src/flowsint_enrichers/ip/to_ports.py@@ -1,11 +1,12 @@from typing import Any, Dict, List, Optional+from tools.network.naabu import NaabuTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.ip import Ipfrom flowsint_types.port import Port-from tools.network.naabu import NaabuTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.py b/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.pyindex 54378f40..3963208d 100644--- a/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.py+++ b/flowsint-enrichers/src/flowsint_enrichers/n8n/connector.py@@ -2,6 +2,7 @@ import jsonfrom typing import Any, Dict, List, Optionalimport aiohttp+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.py b/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.pyindex 245a1b97..819fafc9 100644--- a/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.py+++ b/flowsint-enrichers/src/flowsint_enrichers/organization/to_asn.py@@ -1,12 +1,13 @@import osfrom typing import Any, Dict, List, Optional+from tools.network.asnmap import AsnmapTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.asn import ASNfrom flowsint_types.organization import Organization-from tools.network.asnmap import AsnmapTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.py b/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.pyindex b5b4ccaf..0a5033a1 100644--- a/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.py+++ b/flowsint-enrichers/src/flowsint_enrichers/organization/to_domains.py@@ -3,6 +3,8 @@ import refrom typing import Any, Dict, List, Optional, Setfrom dotenv import load_dotenv+from tools.network.whoxy import WhoxyTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricher@@ -11,7 +13,6 @@ from flowsint_types.address import Locationfrom flowsint_types.domain import Domainfrom flowsint_types.individual import Individualfrom flowsint_types.organization import Organization-from tools.network.whoxy import WhoxyToolload_dotenv()diff --git a/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.py b/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.pyindex ef205b2f..c519d9f6 100644--- a/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.py+++ b/flowsint-enrichers/src/flowsint_enrichers/organization/to_infos.py@@ -1,12 +1,13 @@from typing import Dict, List+from tools.organizations.sirene import SireneTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.address import Locationfrom flowsint_types.individual import Individualfrom flowsint_types.organization import Organization-from tools.organizations.sirene import SireneTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/phone/to_carrier.py b/flowsint-enrichers/src/flowsint_enrichers/phone/to_carrier.pyindex 4a1f837e..7a44775c 100644--- a/flowsint-enrichers/src/flowsint_enrichers/phone/to_carrier.py+++ b/flowsint-enrichers/src/flowsint_enrichers/phone/to_carrier.py@@ -2,6 +2,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/phone/to_hudsonrock.py b/flowsint-enrichers/src/flowsint_enrichers/phone/to_hudsonrock.pyindex 2c9e35a3..4dba3c8c 100644--- a/flowsint-enrichers/src/flowsint_enrichers/phone/to_hudsonrock.py+++ b/flowsint-enrichers/src/flowsint_enrichers/phone/to_hudsonrock.py@@ -1,6 +1,7 @@from typing import Listimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.py b/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.pyindex 73b41d04..6c71ea6d 100644--- a/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.py+++ b/flowsint-enrichers/src/flowsint_enrichers/phone/to_infos.py@@ -2,6 +2,7 @@ import asynciofrom typing import Any, Dict, Listimport httpx+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_core.utils import is_valid_numberdiff --git a/flowsint-enrichers/src/flowsint_enrichers/social/to_dehashed.py b/flowsint-enrichers/src/flowsint_enrichers/social/to_dehashed.pyindex 22860e48..caeb674f 100644--- a/flowsint-enrichers/src/flowsint_enrichers/social/to_dehashed.py+++ b/flowsint-enrichers/src/flowsint_enrichers/social/to_dehashed.py@@ -3,6 +3,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/social/to_hudsonrock.py b/flowsint-enrichers/src/flowsint_enrichers/social/to_hudsonrock.pyindex 5dea67d0..ad134250 100644--- a/flowsint-enrichers/src/flowsint_enrichers/social/to_hudsonrock.py+++ b/flowsint-enrichers/src/flowsint_enrichers/social/to_hudsonrock.py@@ -1,6 +1,7 @@from typing import Listimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.pyindex f8805b4b..f9429c65 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_crawler.py@@ -1,14 +1,15 @@from typing import List, Optionalfrom urllib.parse import urlparse+from pydantic import BaseModel+from tools.network.reconcrawl import ReconCrawlTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.email import Emailfrom flowsint_types.phone import Phonefrom flowsint_types.website import Website-from pydantic import BaseModel-from tools.network.reconcrawl import ReconCrawlToolclass ReturnType(BaseModel):diff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_links.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_links.pyindex 9f74f310..dd52bdde 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_links.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_links.py@@ -1,12 +1,13 @@from typing import Listfrom urllib.parse import urlparse+from reconspread import Crawler+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.domain import Domainfrom flowsint_types.website import Website-from reconspread import Crawler@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_subdomain.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_subdomain.pyindex d88881fd..de2b4d88 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_subdomain.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_subdomain.py@@ -2,6 +2,7 @@ import osfrom typing import Any, Dict, List, Optionalimport requests+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_technologies.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_technologies.pyindex 1e96c1aa..f2312465 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_technologies.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_technologies.py@@ -1,11 +1,12 @@from typing import Any, Dict, List, Optional+from tools.network.httpx import HttpxTool+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.technology import Technologyfrom flowsint_types.website import Website-from tools.network.httpx import HttpxTool@flowsint_enricherdiff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_text.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_text.pyindex 8656cbc1..ec781ecc 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_text.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_text.py@@ -2,6 +2,7 @@ from typing import Listimport requestsfrom bs4 import BeautifulSoup+from flowsint_core.core.enricher_base import Enricherfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.phrase import Phrasediff --git a/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.py b/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.pyindex 671ff1c9..03ada26b 100644--- a/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.py+++ b/flowsint-enrichers/src/flowsint_enrichers/website/to_webtrackers.py@@ -1,12 +1,13 @@from typing import Any, Dict, List, Optional+from recontrack import TrackingCodeExtractor+from flowsint_core.core.enricher_base import Enricherfrom flowsint_core.core.logger import Loggerfrom flowsint_core.core.vault import VaultProtocolfrom flowsint_enrichers.registry import flowsint_enricherfrom flowsint_types.web_tracker import WebTrackerfrom flowsint_types.website import Website-from recontrack import TrackingCodeExtractor@flowsint_enricherdiff --git a/flowsint-enrichers/tests/enrichers/test_domain_to_dns.py b/flowsint-enrichers/tests/enrichers/test_domain_to_dns.pyindex a8ce0d79..a210ec2e 100644--- a/flowsint-enrichers/tests/enrichers/test_domain_to_dns.py+++ b/flowsint-enrichers/tests/enrichers/test_domain_to_dns.py@@ -1,8 +1,9 @@import pytest+from tools.network.dnsx import DnsxTool+from flowsint_enrichers import ENRICHER_REGISTRYfrom flowsint_enrichers.domain.to_dns import DomainToDnsEnricherfrom flowsint_types.ip import Ip-from tools.network.dnsx import DnsxTool# ---------------------------------------------------------------------------diff --git a/flowsint-enrichers/tests/enrichers/test_registry.py b/flowsint-enrichers/tests/enrichers/test_registry.pyindex 23ce366f..6f2222e0 100644--- a/flowsint-enrichers/tests/enrichers/test_registry.py+++ b/flowsint-enrichers/tests/enrichers/test_registry.py@@ -1,4 +1,5 @@import pytest+from flowsint_enrichers import ENRICHER_REGISTRYdiff --git a/flowsint-enrichers/tests/enrichers/test_tech_detect.py b/flowsint-enrichers/tests/enrichers/test_tech_detect.pyindex 0fca0d49..6541d671 100644--- a/flowsint-enrichers/tests/enrichers/test_tech_detect.py+++ b/flowsint-enrichers/tests/enrichers/test_tech_detect.py@@ -1,4 +1,5 @@import pytest+from flowsint_enrichers import ENRICHER_REGISTRYfrom flowsint_enrichers.website.to_technologies import TechDetectEnricherfrom flowsint_types.technology import Technologydiff --git a/flowsint-enrichers/tests/test_vault_integration.py b/flowsint-enrichers/tests/test_vault_integration.pyindex 11c3ad65..2335ae88 100644--- a/flowsint-enrichers/tests/test_vault_integration.py+++ b/flowsint-enrichers/tests/test_vault_integration.py@@ -4,6 +4,7 @@ import uuidfrom unittest.mock import Mockimport pytest+from flowsint_enrichers.crypto.to_nfts import CryptoWalletAddressToNFTsfrom flowsint_enrichers.crypto.to_transactions import CryptoWalletAddressToTransactionsfrom flowsint_enrichers.domain.to_history import DomainToHistoryEnricherdiff --git a/flowsint-types/pyproject.toml b/flowsint-types/pyproject.tomlindex 131c4247..e40311bb 100644--- a/flowsint-types/pyproject.toml+++ b/flowsint-types/pyproject.toml@@ -34,6 +34,11 @@ target-version = ['py311'][tool.isort]profile = "black"multi_line_output = 3+# Explicit, not auto-detected: isort's first-party detection depends on which+# files it's invoked with, so "flowsint_enrichers" gets grouped differently+# when sorted alone vs alongside the other packages (as CI/make lint does).+# Same list must be kept in sync across all 4 packages' pyproject.toml.+known_first_party = ["flowsint_core", "flowsint_types", "flowsint_enrichers", "flowsint_api"][tool.mypy]python_version = "3.11"diff --git a/flowsint-types/tests/test_domain.py b/flowsint-types/tests/test_domain.pyindex da640eed..ecbaf8de 100644--- a/flowsint-types/tests/test_domain.py+++ b/flowsint-types/tests/test_domain.py@@ -1,4 +1,5 @@import pytest+from flowsint_types.domain import Domaindiff --git a/flowsint-types/tests/test_ip.py b/flowsint-types/tests/test_ip.pyindex 50dbc13f..aa6fb6d6 100644--- a/flowsint-types/tests/test_ip.py+++ b/flowsint-types/tests/test_ip.py@@ -1,4 +1,5 @@import pytest+from flowsint_types.ip import Ipdiff --git a/flowsint-types/tests/test_status_code.py b/flowsint-types/tests/test_status_code.pyindex 20318627..f1f82fce 100644--- a/flowsint-types/tests/test_status_code.py+++ b/flowsint-types/tests/test_status_code.py@@ -1,4 +1,5 @@import pytest+from flowsint_types.website import Website