# p0pr0ck5/lua-resty-waf

High-performance WAF built on the OpenResty stack

Repository: https://github.com/p0pr0ck5/lua-resty-waf
Canonical: https://ross.abutalabs.com/products/lua-resty-waf
Language: Perl
License: GPL-3.0
License Family: copyleft
Topics: lua-resty-waf, lua, nginx-lua, modsecurity, waf, openresty
Last push: 2024-01-31T14:54:02+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4320, "days_push": 945, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1324, forks 305 (observed 2026-08-28T04:04:22.436014+00:00)

## What it is
lua-resty-waf is a high-performance web application firewall (WAF) library built on the OpenResty/ngx_lua stack. It inspects HTTP requests using configurable rule definitions and supports custom rulesets, multiple storage backends, and detailed event logging.

## Use cases
- protect a web application from common attacks like SQL injection and XSS
- replace ModSecurity with a lightweight nginx-based WAF
- add request filtering rules to an OpenResty server
- log and monitor suspicious HTTP requests
- run a WAF in simulation mode to test rules before blocking

## When to choose
- you run OpenResty or nginx with ngx_lua and want an in-process WAF without a separate proxy
- you need high-performance request inspection with customizable Lua rule definitions
- you want flexible event logging to external systems like Redis or sockets

## When to avoid
- you need a managed WAF with a GUI dashboard and commercial support
- your stack is not nginx/OpenResty based
- you need OWASP CRS parity with ModSecurity's full feature set

## Facets
- artifact type: library
- maturity: maintenance
- function: security, middleware, http-server
- domain: security, web-development, backend
- platform: lua
- tags: waf, openresty, nginx-lua, modsecurity-alternative, web-application-firewall, rate-limiting, rule-engine, nginx, linux

## Member repositories
- p0pr0ck5/lua-resty-waf (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.436014+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:47:01.510648+00:00, confidence not recorded.
  - readme: https://github.com/p0pr0ck5/lua-resty-waf (fetched 2026-08-28T04:04:22.436014+00:00, sha 623cf0153a34)
- Data as of 2026-08-30T08:39:29.467469+00:00.
