tuijncode/laravel-waf
Laravel WAF middleware that helps protect your application from common web attacks by filtering and blocking suspicious requests before they reach your routes.
waf:doctor command directly addresses the failure mode that kills self-hosted WAFs in practice: silent misconfiguration that looks identical to "no attacks." That materially de-risks the buy decision for teams without dedicated security operations.waf:doctor exits non-zero only on real failures and prints the exact fix, it can be wired into CI or a deploy step. This turns WAF health into a binary, automatable pre-production decision rather than a manual audit—useful for roadmap milestones like "production hardening," "SOC2 evidence," or "first enterprise customer."file=passwd%00.jpg). The deliberate exemption for request bodies is a thoughtful product trade-off—binary bodies legitimately contain NULs—and is the kind of detail that reduces false positives during rollout.waf:export --format=fail2ban lets the team push application-layer findings into existing network defenses. This is a "connect, don't rebuild" decision: you get defense-in-depth from the app WAF plus the host/edge firewall you already run, with no new vendor.match_label of 942 silenced every SQL injection signature and SQL silenced every rule mentioning SQL—effectively an unbounded off-switch for the exact detections the team relies on. Exact matching constrains the blast radius of every future exclusion decision.Adopt when:
php artisan commands—waf:doctor is only as valuable as the gate you put it behind.Look elsewhere when:
To executives: This release makes our application firewall provable rather than merely present. The new waf:doctor command catches the failure modes where a WAF appears healthy but is silently logging nothing—missing schema columns, stale pattern packs, unwired middleware—and exits non-zero so it can block a deploy. That converts a security control from "we think it's on" into "we can demonstrate it's on," which is the difference between a checkbox and audit evidence. We also close a known file-upload bypass (null-byte injection) and tighten exclusion rules so a single mis-scoped exclusion can no longer disable an entire detection category. No new infrastructure or vendor spend is required.
To engineering: v1.3.0 adds three things worth adopting immediately. First, waf:doctor validates the full silent-failure surface—environment enablement, waf_logs column completeness, exclusion table existence, middleware wiring, published pattern/config drift, and cache-driver capability—and prints the exact remediation command for each finding. Put it in CI or the deploy step. Second, waf:export --format=fail2ban emits shell-safe fail2ban-client set <jail> banip <ip> lines with a configurable jail name, so findings can feed host-level bans. Third, schema drift now explains itself: when a finding can't be written (typically a missed upgrade migration), the WAF logs a once-hourly message naming the cause and the vendor:publish + migrate fix, instead of a raw SQL error per request with a quietly empty log.
One migration note to flag in the upgrade ticket: exclusion rules now match the finding label exactly rather than by substring. The old behavior meant an exclusion of 942 silenced every SQLi signature. Rows created through the dashboard/log flow (acceptFromLog) already store exact rule IDs and are unaffected; only hand-inserted rows relying on partial matching change, and they change by re-enabling detection. Audit those rows before deploying. The three-character minimum-length guard is removed, since exact matching makes it unnecessary.
How can I help you explore Laravel packages today?