How khushisharma20101-design/sentinel-waf works
SentinelWAF is a Flask web-application firewall prototype with two partly distinct inspection paths: the documented request-checker API uses signature matching and invokes feature extraction plus a classifier for obfuscated input; app.py also contains a separate inspection/logging and dashboard API. Users submit payloads through the checker UI and receive a verdict; detected attacks are logged and shown in the dashboard. README-described network controls and log inspection are retained as capabilities, but their implementation details are not established by the sampled source. The graph reflects these evidence limits rather than treating the two inspection paths as one pipeline.
Main entry points: proxy.py Checker API · main.py Page Routes · waf_logs.db SQLite Threat Log · app.py Flask App and WAF
Components 18
Request Checker
- Request Checker UI
static/home.js
Inspection Engine
- Checker API
src/hybrid_waf/routes/proxy.py - Signature Matcher
src/hybrid_waf/utils/signature_checker.py - Feature Extraction
src/hybrid_waf/utils/preprocessor.py - ML Prediction
src/hybrid_waf/utils/ml_checker.py - Trained Classifier
src/hybrid_waf/models/ml_model.pkl - Flask App and WAF
app.py
Threat Records
- Dashboard API
app.py - Database Setup
database.py - SQLite Threat Log
waf_logs.db - Detection Text Log
logs
Web Views
- Page Routes
src/hybrid_waf/routes/main.py - Landing Page
templates/index.html - Threat Dashboard
templates/dashboard.html - Dashboard Assets
static/script.js
Security Operations
- Network Matrix
templates - Log Inspector
templates
Other components
- User
Connections 20
- User → Request Checker UI: submits payload
README.md - Request Checker UI → Checker API: posts request
README.md - Checker API → Signature Matcher: checks signature
src/hybrid_waf/routes/proxy.py - Checker API → Feature Extraction: extracts features
src/hybrid_waf/routes/proxy.py - Checker API → ML Prediction: requests prediction
src/hybrid_waf/routes/proxy.py - ML Prediction → Trained Classifier: predicts with
src/hybrid_waf/utils/ml_checker.py - Checker API → Page Routes: logs detections via
src/hybrid_waf/routes/proxy.py - Page Routes → SQLite Threat Log: writes blocked events
src/hybrid_waf/routes/main.py - Flask App and WAF → Page Routes: registers blueprint
app.py - Flask App and WAF → Checker API: registers blueprint
app.py - Flask App and WAF → SQLite Threat Log: writes and reads events
app.py - Checker API → Detection Text Log: writes detections
src/hybrid_waf/routes/proxy.py - Database Setup → SQLite Threat Log: initializes schema
database.py - Page Routes → Landing Page: renders page
src/hybrid_waf/routes/main.py - User → Threat Dashboard: views dashboard
README.md - Dashboard API → Threat Dashboard: serves dashboard
app.py - Threat Dashboard → Dashboard Assets: uses client logic
- User → Network Matrix: manages IPs and profiles
README.md - User → Log Inspector: reviews events
README.md - Dashboard API → SQLite Threat Log: reads threat records
app.py