How bagpotato/secnet-auditor works
SecNet-Auditor is a local Flask dashboard for read-only Ubuntu/Debian security audits, defensive log monitoring and—when enabled—admin-approved guided fixes. The main workflow is browser → dashboard/API → network, service and hardening checks, with SSH brute-force analysis also reported; users can separately search allow-listed logs or preview, apply and undo supported fixes. Fixes are backed up and audited. The excerpts establish the API/authentication and several module relationships; some audit routes and fix internals are unsampled, so those connections rely on the README or SOURCE INDEX rather than claims of direct calls.
Main entry points: app.py Flask API · log_viewer.py Log parsing & filtering · network_check.py Network checks · services.py Service checks
Components 14
Dashboard & access
- Dashboard UI
templates/index.html - Flask API
app.py - Login & CSRF
modules/auth.py - Audit settings
config.json
Security audits
- Network checks
modules/network_check.py - Service checks
modules/services.py - Hardening checks
modules/hardening.py
Guided fixes
- Fix catalogue & execution
modules/fixes.py - Backups & fix records
modules/fix_history.py
Log monitoring
- SSH attempt analysis
modules/log_monitor.py - Log parsing & filtering
modules/log_viewer.py
Other components
- Administrator / user
- Ubuntu/Debian host
- System log sources
Connections 20
- Administrator / user → Dashboard UI: uses
README.md - Dashboard UI → Flask API: requests
README.md - Flask API → Login & CSRF: checks access
app.py - Flask API → Network checks: runs audit
app.py - Flask API → Service checks: audits services
README.md - Flask API → Hardening checks: audits hardening
README.md - Flask API → SSH attempt analysis: runs analysis
README.md - Flask API → Log parsing & filtering: queries logs
app.py - Flask API → Fix catalogue & execution: plans and runs
app.py - Flask API → Audit settings: loads settings
app.py - Fix catalogue & execution → Backups & fix records: backs up and records
modules/fixes.py - Service checks → Network checks: uses command runner
modules/services.py - Log parsing & filtering → Network checks: runs journal queries
modules/log_viewer.py - Network checks → Ubuntu/Debian host: checks network state
modules/network_check.py - Service checks → Ubuntu/Debian host: checks services
modules/services.py - Hardening checks → Ubuntu/Debian host: checks host security
modules/hardening.py - SSH attempt analysis → System log sources: reads auth log
modules/log_monitor.py - Log parsing & filtering → System log sources: reads selected sources
README.md - Fix catalogue & execution → Ubuntu/Debian host: applies or restores changes
README.md - Log parsing & filtering → Backups & fix records: parses fix audit entries