How ziyadnz/threat-intel-ip-feeds works
This repository aggregates threat-intelligence IP feeds into firewall-ready blocklists and richer analysis formats. Its main workflow is the CLI composition root constructing feed adapters, collecting and validating their results, filtering whitelisted addresses and tracking source health, then writing output files. Separate health reporting persists status and can notify about source problems. The README documents raw IPv4/IPv6, per-source, CSV, JSON and STIX outputs plus global and Turkey-specific feeds. Some adapter and writer wiring is documented or indexed but not shown in full excerpts, so uncertain links are omitted.
Main entry points: cli.py CLI composition · collect_threat_intel.py Collect feeds · global_sources.py Global feeds · regional_sources.py Regional feeds
Components 25
Entry and orchestration
- CLI composition
threat_intel/presentation/cli.py - Collect feeds
threat_intel/application/use_cases/collect_threat_intel.py - Write outputs
threat_intel/application/use_cases/write_outputs.py - Health reporting
threat_intel/application/use_cases/report_health.py
Threat domain
- Threat entities
threat_intel/domain/entities.py - Domain ports
threat_intel/domain/ports.py - Filtering and analysis
threat_intel/domain/services.py
Feed integrations
- HTTP client
threat_intel/infrastructure/http/requests_client.py - Global feeds
threat_intel/infrastructure/sources/global_sources.py - Regional feeds
threat_intel/infrastructure/sources/regional_sources.py - API feeds
threat_intel/infrastructure/sources/api_sources.py - Feed base adapter
threat_intel/infrastructure/sources/base.py - Feed endpoints
threat_intel/infrastructure/sources/urls.py
State and reporting
- Feed cache
threat_intel/infrastructure/cache/source_cache.py - Whitelist file
threat_intel/infrastructure/whitelist/file_repository.py - Health records
threat_intel/infrastructure/health/json_repository.py - Health report file
threat_intel/infrastructure/health/markdown_report_writer.py - GitHub notifier
threat_intel/infrastructure/notification/github_notifier.py - Raw IP feeds
threat_intel/infrastructure/writers/raw_writer.py - CSV output
threat_intel/infrastructure/writers/csv_writer.py - JSON output
threat_intel/infrastructure/writers/json_writer.py - STIX bundle
threat_intel/infrastructure/writers/stix_writer.py
Other components
- Hourly runner
- Firewall and SIEM
- Threat feed services
Connections 45
- Hourly runner → CLI composition: invokes
- CLI composition → Collect feeds: runs
threat_intel/presentation/cli.py - CLI composition → Write outputs: runs
threat_intel/presentation/cli.py - CLI composition → Health reporting: configures
threat_intel/presentation/cli.py - CLI composition → HTTP client: constructs
threat_intel/presentation/cli.py - CLI composition → Global feeds: configures
threat_intel/presentation/cli.py - CLI composition → Regional feeds: configures
threat_intel/presentation/cli.py - CLI composition → API feeds: configures
threat_intel/presentation/cli.py - CLI composition → Feed cache: configures
threat_intel/presentation/cli.py - CLI composition → Whitelist file: configures
threat_intel/presentation/cli.py - CLI composition → Health records: configures
threat_intel/presentation/cli.py - CLI composition → Health report file: configures
threat_intel/presentation/cli.py - CLI composition → GitHub notifier: configures
threat_intel/presentation/cli.py - CLI composition → Raw IP feeds: configures
threat_intel/presentation/cli.py - CLI composition → CSV output: configures
threat_intel/presentation/cli.py - CLI composition → JSON output: configures
threat_intel/presentation/cli.py - CLI composition → STIX bundle: configures
threat_intel/presentation/cli.py - Collect feeds → Global feeds: fetches from
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → Regional feeds: fetches from
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → API feeds: fetches from
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → Whitelist file: loads entries
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → Feed cache: reads and saves
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → Health records: updates health
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → Filtering and analysis: filters and analyzes
threat_intel/application/use_cases/collect_threat_intel.py - Collect feeds → Threat entities: builds results
threat_intel/application/use_cases/collect_threat_intel.py - Global feeds → Feed base adapter: uses adapters
threat_intel/infrastructure/sources/global_sources.py - Regional feeds → Feed base adapter: uses adapters
threat_intel/infrastructure/sources/regional_sources.py - Global feeds → HTTP client: requests feeds
- Regional feeds → HTTP client: requests feeds
- API feeds → HTTP client: requests APIs
threat_intel/infrastructure/sources/api_sources.py - Global feeds → Feed endpoints: uses endpoints
threat_intel/infrastructure/sources/global_sources.py - Regional feeds → Feed endpoints: uses endpoints
threat_intel/infrastructure/sources/regional_sources.py - API feeds → Feed endpoints: uses endpoints
threat_intel/infrastructure/sources/api_sources.py - Write outputs → Raw IP feeds: writes via
- Write outputs → CSV output: writes via
- Write outputs → JSON output: writes via
- Write outputs → STIX bundle: writes via
- Raw IP feeds → Firewall and SIEM: publishes feeds
README.md - CSV output → Firewall and SIEM: provides analysis
README.md - STIX bundle → Firewall and SIEM: provides bundle
README.md - Threat feed services → Global feeds: supplies indicators
README.md - Threat feed services → Regional feeds: supplies indicators
README.md - Health reporting → Health records: loads health
threat_intel/application/use_cases/report_health.py - Health reporting → Health report file: writes report
threat_intel/application/use_cases/report_health.py - Health reporting → GitHub notifier: alerts on issues