Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

3.4 KB
Raw Blame
[project]
name = "flowsint-enrichers"
version = "1.2.11"
description = "Enricher modules for flowsint"
license = "Apache-2.0"
authors = [{ name = "dextmorgn", email = "[email protected]" }]
requires-python = ">=3.12,<4.0"
dependencies = [
    "flowsint-types",
    "flowsint-core",
    "sherlock-project>=0.15.0,<0.16.0",
    "requests>=2.31,<3.0",
    "python-whois>=0.9.5,<0.10.0",
    "httpx>=0.28.0,<0.29.0",
    "phonenumbers>=9.0.8,<10.0.0",
    "pydantic>=2.11.7,<3.0.0",
    "requests-random-user-agent>=2023.10.25,<2024.0.0",
    "maigret",
    "recontrack",
    "reconcrawl",
    "reconspread",
    "dnspython>=2.4,<3.0",
]

[dependency-groups]
dev = [
    "pytest>=9.0.3,<10.0.0",
    "pytest-asyncio>=0.21,<2.0",
    "ruff>=0.16,<1.0",
    "mypy>=1.17,<2.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/flowsint_enrichers"]

[tool.uv.sources]
flowsint-types = { workspace = true }
flowsint-core = { workspace = true }
maigret = { git = "https://github.com/soxoj/maigret" }
recontrack = { git = "https://github.com/reconurge/recontrack.git" }
reconcrawl = { git = "https://github.com/reconurge/reconcrawl.git" }
reconspread = { git = "https://github.com/reconurge/reconspread.git" }

[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
# See the matching disable's rationale in flowsint-core/pyproject.toml:
# none of the 4 workspace packages ship a py.typed marker, so every
# cross-package import collapses to Any — a workspace-wide gap, not a
# per-file bug.
disable_error_code = ["import-untyped"]
# Without this, mypy doesn't understand Field()'s required/optional
# semantics and flags every pydantic model construction that omits a
# field with a default as a "missing named argument" false positive.
plugins = ["pydantic.mypy"]

# Every enricher declares InputType/OutputType as plain class attributes
# (see Enricher.InputType = NotImplemented in enricher_base.py, overridden
# per-subclass) and then uses them in annotations like List[InputType] and
# reads fields off them (self.data.domain). This is the documented,
# intentional API — see flowsint-enricher-builder skill and every enricher
# in this package — not a mistake to individually silence. mypy can't
# express "this class attribute doubles as a type alias" without making
# Enricher generic (Enricher[TIn, TOut]), which would mean touching every
# enricher's class declaration and contradicts the deliberately simple
# "just set two class attributes" API. Narrowing the checks that pattern
# structurally can't satisfy, rather than ignoring per-line across ~15 files.
[[tool.mypy.overrides]]
module = "flowsint_enrichers.*"
disable_error_code = ["valid-type", "attr-defined", "name-defined"]

# See the matching override's rationale in flowsint-core/pyproject.toml:
# pytest fixture params aren't worth fully annotating for test-only code.
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false

# Tool.launch's abstract signature is deliberately loose
# (self, value: str, *args, **kwargs) -> Any — every subclass (dnsx,
# httpx, subfinder, whoxy, sirene, ...) defines its own real,
# tool-specific launch() signature instead. Same shape as the Enricher
# InputType/OutputType pattern above: intentional flexibility mypy's
# override checking can't express, not a mistake to fix per-subclass.
[[tool.mypy.overrides]]
module = "tools.*"
disable_error_code = ["override"]