Why another WAF?
The idea for BlackLab came after I found myself inside a fintech system that was worth millions. I wasn’t supposed to be a user — but I could create an account anyway. Once I was in, their WAF at the CDN layer blocked some probes, but I was still there: a valid user, trusted by their system. And that’s the problem: a WAF outside your app has no context. It doesn’t know your user model, your sessions, your rules. It can’t block my account, trigger an alert, or log me out. It just sits there, filtering traffic with generic rules. So I built BlackLab to fill that gap: a WAF that Rails developers can actually control.What’s in BlackLab 0.1.0?
BlackLab 0.1.0 is the first public release. Here’s what it ships with:- Rack Middleware — drop it into your stack with use BlackLab::Middleware.
- Configurable Callbacks — block users, send alerts, log incidents, trigger Slack messages… directly from your app.
- Extensible Plugins — SQL injection, XSS, path traversal, local file inclusion (LFI), and remote file inclusion (RFI). Add or write your own.
- Smart Blocking — block by IP, session, or user ID, with configurable duration and thresholds.
- Rails-friendly Defaults — integrates with Rails.cache out of the box for tracking incidents.
Why inside the app?
Running a WAF inside your app gives you context and control:- You can tie suspicious requests directly to your User model.
- You can log them out or flag their account.
- You can trigger your own incident response workflow — whether that’s Slack, PagerDuty, or custom dashboards.
What’s next?
This is just 0.1.0 — a foundation to build on. Next releases will focus on:- More plugins (e.g., CSRF bypass detection, header validation).
- Better developer ergonomics (Rails generators for setup, logging helpers).
- Documentation on creating new plugins
- Improve detection by using CRS from ModSecurity