3 ms·
Aiwaf: An AI-Powered Web Application Firewall for Django/Flask
AIWAF is an open source Web Application Firewall built to go beyond static regex rules and simple rate limiting, which often break down when traffic patterns change or attackers adapt. Instead of relying only on hardcoded blacklists, AIWAF adds anomaly detection for abnormal request patterns, honeypot fields with timing analysis to catch bots, dynamic keyword detection to spot suspicious payloads that don’t appear on predefined lists, and adaptive IP/keyword blocking backed by CSV or database storage.
It currently works as middleware for Django and Flask and is meant to be easy to drop into existing projects without heavy configuration. The project is still early, and I’d love feedback from the community on what would make this better, whether the next focus should be deeper ML-based detection or support for additional frameworks, and how important integrations with existing tools like fail2ban or ModSecurity would be. Project site: https://aiwaf.org/
- incomingpain 1y agoFound it on github, few months old now. Cool project. Something I couldnt exactly see, which AI does it use? It seems more like a daily retraining on the box itself? Not a like openai or ollama type ai?
- aayushgauba 1y agoYep, good eye, AIWAF doesn’t use OpenAI/Ollama by default. The core AI right now is an Isolation Forest model for anomaly detection. It retrains locally (daily/weekly depending on your setup) on your own logs so it adapts to your traffic patterns without sending data off box. The goal is privacy + lightweight, so it’s CPU friendly, keeps data in your infra, and you don’t need an external LLM
- incomingpain 1y agoInteresting, I had vaguely heard of isolation forests before but dont think i understood their use. Interesting projec, I wish you the best!
- aayushgauba 1y agoThanks a lot!