# loveshell/ngx_lua_waf

ngx_lua_waf是一个基于lua-nginx-module(openresty)的web应用防火墙

Repository: https://github.com/loveshell/ngx_lua_waf
Canonical: https://ross.abutalabs.com/products/ngx_lua_waf
Language: Lua
License Family: other
Last push: 2024-03-17T12:14:30+00:00

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

## Adoption (not part of the score)
Stars 4024, forks 1453 (observed 2026-08-28T04:08:32.579106+00:00)

## What it is
A lightweight, high-performance web application firewall (WAF) built on lua-nginx-module (OpenResty) for Nginx. It filters requests using regex rules to block SQL injection, XSS, SSRF, webshell uploads, scanners, and CC attacks.

## Use cases
- block sql injection and xss attacks on nginx
- prevent webshell uploads
- rate limit cc attacks per ip
- block scanner user agents
- prevent backup and svn file leaks
- add a waf to openresty

## When to choose
- you run nginx/openresty and want a simple, lightweight WAF with regex rules
- you need basic protection against common web attacks without a heavy appliance
- you want per-IP CC rate limiting built into nginx

## When to avoid
- you need dynamically managed rules via shared memory or redis
- you need advanced WAF features like a commercial ruleset or machine-learning detection
- you don't control nginx configuration or can't install lua modules

## Facets
- artifact type: library
- maturity: maintenance
- function: security, rate-limiting, middleware, logging
- domain: security, web-development, backend
- platform: self-hosted
- tags: waf, web-application-firewall, lua-nginx-module, openresty, sql-injection, xss, cc-attack-protection, webshell-prevention, nginx, linux

## Member repositories
- loveshell/ngx_lua_waf (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:32.579106+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-29T18:23:54.752512+00:00, confidence not recorded.
  - readme: https://github.com/loveshell/ngx_lua_waf (fetched 2026-08-28T04:08:32.579106+00:00, sha 4466d7728834)
- Data as of 2026-08-30T08:39:29.467469+00:00.
