How priyansh019/network-scanner works
SentinelPy is a web-based network security scanner. A user authenticates and requests a target scan in the React dashboard; the FastAPI backend records it, a scanner poller picks it up, scans ports and assesses services for vulnerabilities and risk, then submits results for the dashboard to display. The graph separates UI, API and persistence, and scanner processing stages. README documents the cross-process workflow; sampled source and the SOURCE INDEX support the cited internal calls. Some scanner/backend integration details are unsampled, so those links rely on documented behavior.
Main entry points: scan.py Scan routes · api.js API client · integration.py Port and banner scan · auth.py Auth routes
Components 22
Web dashboard
- Login and register
frontend/src/pages/Login.jsx - Start scan
frontend/src/pages/StartScan.jsx - Scan history
frontend/src/pages/ScanHistory.jsx - Scan results
frontend/src/pages/ScanResult.jsx - API client
frontend/src/api.js
Backend API
- Auth routes
backend/app/api/routes/auth.py - Scan routes
backend/app/api/routes/scan.py - Mock scanner routes
backend/app/api/routes/mock_scanner.py - FastAPI app
backend/app/main.py - JWT and passwords
backend/app/core/security.py - Scan records
backend/app/model/db_model.py - User records
backend/app/model/db_user.py - Database session
backend/app/database.py
Scanner engine
- Scan poller
scanner/poller.py - Scan orchestration
scanner/integration.py - Port and banner scan
scanner/integration.py
Scan assessment
- Version detection
scanner/modules/version_detector.py - CVE matching
scanner/modules/cve_matcher.py - Risk classification
scanner/modules/risk_classifier.py - Vulnerability data
scanner/databases/vulnerabilities.json
Other components
- User
- Network target
Connections 29
- User → Login and register: authenticates
README.md - User → Start scan: requests scan
README.md - User → Scan history: views history
README.md - User → Scan results: views results
README.md - Login and register → API client: calls auth
frontend/src/pages/Login.jsx - Start scan → API client: starts scan
frontend/src/pages/StartScan.jsx - Scan history → API client: fetches history
frontend/src/pages/ScanHistory.jsx - Scan results → API client: fetches result
frontend/src/pages/ScanResult.jsx - API client → Auth routes: REST auth
README.md - API client → Scan routes: REST scans
README.md - FastAPI app → Auth routes: registers routes
backend/app/main.py - FastAPI app → Scan routes: registers routes
backend/app/main.py - FastAPI app → Mock scanner routes: registers routes
backend/app/main.py - Auth routes → JWT and passwords: uses credentials
backend/app/api/routes/auth.py - Auth routes → User records: reads and writes
backend/app/api/routes/auth.py - Scan routes → Scan records: reads and writes
backend/app/api/routes/scan.py - Auth routes → Database session: gets session
backend/app/api/routes/auth.py - Scan routes → Database session: gets session
backend/app/api/routes/scan.py - FastAPI app → Database session: creates tables
backend/app/main.py - Scan routes → Scan poller: offers pending scans
README.md - Scan poller → Scan orchestration: runs scan
- Scan orchestration → Port and banner scan: scans ports
scanner/integration.py - Port and banner scan → Network target: connects to
- Port and banner scan → Version detection: extracts version
scanner/integration.py - Port and banner scan → CVE matching: matches vulnerability
- Port and banner scan → Risk classification: classifies severity
scanner/integration.py - Scan orchestration → Vulnerability data: loads database
README.md - Scan orchestration → Scan routes: posts results
README.md - Scan results → Risk classification: displays risk