How shagunchaudhary794/scanner works
Scanner MVP is a Flask control plane for tenant-scoped asset inventory, scan scheduling, vulnerability assessment, and report delivery. Users manage assets and schedules through the web app; asynchronous workers execute scans, record findings, and support reporting. The worker’s assessment branches include network/service discovery, default-credential checks, CVSS scoring, and unsupported-OS detection. PostgreSQL stores application records, while Redis supports Celery and distributed locks. The README documents the OpenVAS agent/scanner role and reporting formats; unsampled route and task implementations limit some detailed flow links.
Main entry points: tasks.py Async Scan Worker · routes.py Web Workflows · models.py Tenant and Scan Models · app.py Flask Web App
Components 21
Control Plane
- Flask Web App
app.py - Web Workflows
routes.py - Asset Inventory
routes.py - Scan Scheduling
routes.py - Report Workflows
routes.py
Assessment
- Scope Discovery
discovery.py - Network Scanners
tasks.py - Default Credentials
default_creds.py - CVSS Scoring
cvss_engine.py - OS Support Checks
eol_os.py
State and Storage
- Tenant and Scan Models
models.py - Report File Storage
report_storage.py
Worker Runtime
- Async Scan Worker
tasks.py - Runtime Configuration
config.py - Asset Scan Locks
lock_manager.py
Other components
- Scanner User
- PostgreSQL
- Redis and Celery
- OpenVAS Scanner
- NVD CVE Service
- Presence Agent
Connections 25
- Scanner User → Flask Web App: uses
README.md - Flask Web App → Web Workflows: registers
app.py - Flask Web App → Tenant and Scan Models: loads models
app.py - Flask Web App → Runtime Configuration: loads settings
app.py - Web Workflows → Tenant and Scan Models: reads and writes
routes.py - Web Workflows → Asset Inventory: handles inventory
routes.py - Web Workflows → Scan Scheduling: creates schedules
routes.py - Web Workflows → Async Scan Worker: queues scans
README.md - Async Scan Worker → Tenant and Scan Models: records scan data
tasks.py - Async Scan Worker → Scope Discovery: uses discovery
tasks.py - Async Scan Worker → Network Scanners: runs scans
tasks.py - Async Scan Worker → Default Credentials: checks credentials
tasks.py - Async Scan Worker → CVSS Scoring: scores findings
tasks.py - Async Scan Worker → OS Support Checks: checks OS support
tasks.py - Async Scan Worker → Asset Scan Locks: acquires locks
tasks.py - Asset Scan Locks → Redis and Celery: stores locks
lock_manager.py - Async Scan Worker → Redis and Celery: uses Celery
README.md - Tenant and Scan Models → PostgreSQL: persists records
README.md - CVSS Scoring → NVD CVE Service: looks up CVEs
cvss_engine.py - Report Workflows → Report File Storage: saves and loads
routes.py - Web Workflows → Report Workflows: serves exports
README.md - Report Workflows → Tenant and Scan Models: uses report metadata
README.md - Presence Agent → Web Workflows: sends heartbeat
routes.py - Async Scan Worker → OpenVAS Scanner: runs internal scans
README.md - Async Scan Worker → Presence Agent: dispatches internal scans