How bornbe/dacn works
DACN is an authorized-scope web vulnerability scanner with a Flask API/dashboard and CLI. The main workflow is to authenticate, register and verify a target, create a scan, run crawling and supported checks, persist findings and progress, then inspect, compare, and export results. Separate branches cover user administration and audit logs. The graph uses README capabilities and source-index references; where implementation excerpts were unavailable, it avoids asserting uncertain call relationships.
Main entry points: scan_engine.py Scan orchestrator · scan_controller.py Scan API · app.py Flask application · scan_service.py Scan lifecycle
Components 29
User interfaces
- Web dashboard
static/js/app.js - CLI scanner
scanner.py - Flask application
app.py
Access and targets
- Authentication routes
controllers/auth_controller.py - JWT and RBAC
middleware/auth_middleware.py - Authentication service
services/auth_service.py - Target routes
controllers/target_controller.py - Target verification
services/target_service.py - Scan API
controllers/scan_controller.py - Admin management
controllers/admin_controller.py
Scan execution
- Scan lifecycle
services/scan_service.py - Scan worker tasks
tasks/scan_tasks.py - Scan orchestrator
core/engine/scan_engine.py - BFS crawler
core/crawler/bfs_crawler.py - URL parsing
core/crawler/url_parser.py - Form endpoints
core/crawler/form_parser.py - Vulnerability scanners
core/scanners/__init__.py - Finding deduplication
core/engine/result_manager.py
Safety controls
- Target validation
core/security/target_validator.py - Scope policy
core/security/scope_policy.py - Safe HTTP client
core/utils/safe_http_client.py
Results and operations
- SQLAlchemy database
models/base.py - Targets and scan jobs
models/scan_job.py - Vulnerability findings
models/vulnerability.py - Report API
controllers/report_controller.py - Report export
services/report_service.py - Audit logging
services/audit_service.py
Other components
- Tester or admin
- Authorized target
Connections 43
- Tester or admin → Web dashboard: uses
- Tester or admin → CLI scanner: runs
- Tester or admin → Flask application: calls
- Web dashboard → Flask application: calls API
- Flask application → Authentication routes: routes
app.py - Flask application → Scan API: routes
app.py - Flask application → Target routes: routes
app.py - Flask application → Report API: routes
app.py - Authentication routes → Authentication service: authenticates
controllers/auth_controller.py - Authentication routes → JWT and RBAC: protects routes
controllers/auth_controller.py - Scan API → JWT and RBAC: protects routes
controllers/scan_controller.py - Target routes → JWT and RBAC: protects routes
controllers/target_controller.py - Scan API → Target verification: checks authorization
controllers/scan_controller.py - Scan API → Scan lifecycle: creates scans
controllers/scan_controller.py - Scan API → Scan worker tasks: dispatches work
controllers/scan_controller.py - Target verification → Target validation: validates target
services/target_service.py - Target verification → Scope policy: checks scope
services/target_service.py - Target verification → Safe HTTP client: verifies ownership
services/target_service.py - Scan lifecycle → Scan orchestrator: runs scan
services/scan_service.py - Scan worker tasks → Scan lifecycle: executes scan
tasks/scan_tasks.py - Scan orchestrator → BFS crawler: crawls target
core/engine/scan_engine.py - Scan orchestrator → Form endpoints: parses endpoints
core/engine/scan_engine.py - Scan orchestrator → Target validation: validates target
core/engine/scan_engine.py - Scan orchestrator → Vulnerability scanners: dispatches checks
core/engine/scan_engine.py - Scan orchestrator → Finding deduplication: deduplicates findings
core/engine/scan_engine.py - Form endpoints → URL parsing: normalizes URLs
core/crawler/form_parser.py - BFS crawler → Authorized target: fetches pages
- Vulnerability scanners → Authorized target: tests endpoints
- Target validation → Scope policy: enforces policy
core/security/scope_policy.py - Safe HTTP client → Target validation: validates requests
core/utils/safe_http_client.py - Finding deduplication → Vulnerability findings: stores findings
core/engine/result_manager.py - Scan orchestrator → Targets and scan jobs: updates scan
core/engine/scan_engine.py - Scan lifecycle → Targets and scan jobs: manages lifecycle
services/scan_service.py - Report API → Report export: exports report
controllers/report_controller.py - Report API → Scan lifecycle: loads scan
controllers/report_controller.py - Tester or admin → Report API: requests export
- Tester or admin → Scan API: compares scans
- Authentication routes → Audit logging: records events
controllers/auth_controller.py - Scan API → Audit logging: records events
controllers/scan_controller.py - Target routes → Audit logging: records events
controllers/target_controller.py - Admin management → JWT and RBAC: checks roles
controllers/admin_controller.py - Admin management → Audit logging: queries logs
controllers/admin_controller.py - Admin management → Tester or admin: manages users