Status: v2.0 (Migration to Distributed ML Architecture) Stack: Python 3.10, React + Vite, Neo4j, Redis Streams, MinIO, Docker Compose
NETRA is an Applied ML Systems research platform designed to demonstrate advanced concepts in distributed cybersecurity. It continuously discovers assets, maps them in a Knowledge Graph, and uses machine learning to predict risks.
Netra v2 departs from the monolithic scanner model to a distributed, event-driven architecture optimized for High-Throughput I/O and CPU-bound Inference.
graph TD
User([User]) -->|HTTP| UI[React UI]
User -->|HTTP| API[FastAPI Gateway]
API -->|Push Event| Redis{Redis Stream: netra:events}
subgraph "Workload Isolation"
WorkerIO["Worker Ingest (I/O Bound)"]
WorkerML["Worker ML (CPU Bound)"]
end
Redis -->|Consume| WorkerIO
WorkerIO -->|Raw Data| RedisRaw{Redis Stream: netra:raw}
RedisRaw -->|Consume| WorkerML
WorkerIO -->|Legacy Scans| Ruby[Ruby Bridge]
WorkerML -->|Update| Graph[(Neo4j Graph)]
WorkerML -->|Store Artifacts| S3[(MinIO Object Store)]
- Frontend: React + Vite + TailwindCSS (Served via Nginx).
- Backend API: FastAPI (AsyncIO).
- The "Bus": Redis Streams for strictly ordered event processing.
- Ingestion Worker: Lightweight, I/O-bound process for DNS resolution and Port Scanning. Includes a Ruby Bridge to execute legacy scripts.
- ML Worker: Resource-intensive process for False Positive reduction and future model inference.
- Knowledge Graph: Neo4j stores the "World State" (e.g.,
Domain -> RESOLVES_TO -> IP).
Netra v2 is designed to run locally with a single command.
- Docker & Docker Compose
-
Clone & Start:
git clone https://github.com/PoojasPatel013/Netra.git cd Netra docker compose up --build -d -
Access the Platform:
Service URL Netra UI http://localhost:3000 API Docs http://localhost:8000/docs Redis Commander http://localhost:8081 Neo4j http://localhost:7474 MinIO http://localhost:9001
Use the API (or UI) to push a target into the Ingestion Stream.
curl -X POST http://localhost:8000/api/scan \
-H "Content-Type: application/json" \
-d '{"target": "example.com"}'Open Redis Commander (http://localhost:8081).
- See event appear in
netra:events:ingest. - Watch
netra-ingestworker consume it. - See result appear in
netra:data:raw. - Watch
netra-mlworker process it.
Open Neo4j (http://localhost:7474) and run:
MATCH (n) RETURN nYou should see nodes for the Domain and its resolved IPs.
Vortex/
├── deploy/ # Infrastructure scripts
├── netra/
│ ├── api/ # FastAPI Application
│ ├── core/ # Worker Logic
│ │ ├── discovery/ # DNS, Port Scanners
│ │ ├── analysis/ # Ruby Bridge, ML Models
│ │ └── orchestration/ # Redis Messaging
│ ├── ui/ # React Frontend
│ └── workers/ # Worker Entrypoints (ingest.py, ml_analysis.py)
├── docker-compose.yml # Main Orchestration File
└── README.md
We want to build a robust security platform, and we welcome your input!
- Discussions: Have a question or idea? Join the GitHub Discussions.
- Wiki: Check out our Wiki for detailed architectural docs and guides.
- Issues: Found a bug? Open an Issue!
Netra is Open Source!
We follow an Open Core model:
- Netra Core (This Repo): Apache 2.0 License. Free for everyone forever.
- Netra Boundaries: Proprietary modules (Advanced ML, SSO, Reporting) will be closed-source extensions.
We actively encourage contributions to the Core engine!
- Bug Reports: Found a vulnerability in the scanner? Fix it!
- New Scanners: Add Python/Ruby modules for new CVEs.
- Docs: Improve the Wiki.
Please read our CONTRIBUTING.md for our Code of Conduct.
Open Source (Apache 2.0)
The Core Engine is free to use and modify under the Apache 2.0 License. See LICENSE.md.
Proprietary Boundaries will be licensed separately.
Copyright © 2025 Netra.