Skip to content

modsecurity_standalone: 2.9.12 -> 2.9.15, use Lua 5.5 - #571363

Merged
GaetanLepage merged 2 commits into
NixOS:masterfrom
khaneliman:modsecurity-standalone-lua55
Oct 7, 2026
Merged

GaetanLepage merged 2 commits into
NixOS:masterfrom
khaneliman:modsecurity-standalone-lua55

Conversation

@khaneliman

@khaneliman khaneliman commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Update ModSecurity v2 and move its optional Lua support from the 5.2 compatibility input to Lua 5.5, which 2.9.13 supports (#3527).

2.9.15 fixes GHSA-cxqf-vgrr-xxrv, GHSA-2vqc-36qp-ccmw, GHSA-jx3r-phvx-2jmj, GHSA-qrch-pjfr-9g47, GHSA-4j47-8qcr-jf59 and GHSA-5pww-8rfg-9crf, so the version bump commit is worth backporting on its own. Other changes worth knowing about:

  • 2.9.13 removed the NGINX connector, so the nginx output (a copy of the source tree for building it) is dropped. Nothing in Nixpkgs uses it; nginxModules.modsecurity uses libmodsecurity 3.x.
  • 2.9.14 removed the deprecated REQBODY_PROCESSOR_ERROR and REQBODY_PROCESSOR_ERROR_MSG variables.
  • libinjection is now a submodule.

Lua stays off by default, so the default package doesn't change from the Lua switch.

Changelogs: 2.9.13, 2.9.14, 2.9.15.

Related to #570322.

Built on x86_64-linux with Lua off and on, at both commits; the upstream check and mlogc version check passed. With luaSupport = true, Apache httpd 2.4.69 loaded mod_security2.so with a SecRuleScript rule using m.getvar: a matching request got 403 and logged "ModSecurity rule executed with Lua 5.5", a non-matching one got 200.

Things done

PR description assisted by Claude Code (Claude Opus 5.5).

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs labels Oct 7, 2026
@khaneliman

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 571363
Commit: 04c2b3c7da60dc493a5a61933a15767bff848cef


x86_64-linux

✅ 1 package built:
  • modsecurity_standalone

aarch64-linux

✅ 1 package built:
  • modsecurity_standalone

aarch64-darwin

✅ 1 package built:
  • modsecurity_standalone

@khaneliman
khaneliman marked this pull request as ready for review October 7, 2026 16:02
@nixpkgs-ci nixpkgs-ci Bot added 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! labels Oct 7, 2026
@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Oct 7, 2026
Comment thread pkgs/by-name/mo/modsecurity_standalone/package.nix Outdated
https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.13
https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.14
https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.15

2.9.15 fixes GHSA-cxqf-vgrr-xxrv, GHSA-2vqc-36qp-ccmw,
GHSA-jx3r-phvx-2jmj, GHSA-qrch-pjfr-9g47, GHSA-4j47-8qcr-jf59 and
GHSA-5pww-8rfg-9crf. 2.9.14 removes the deprecated
REQBODY_PROCESSOR_ERROR and REQBODY_PROCESSOR_ERROR_MSG variables.

Upstream now vendors libinjection as a git submodule, so fetch
submodules. Makefile.am.patch still applies.

2.9.13 also removes the NGINX connector from v2. Drop the nginx output,
which held a copy of the source tree for building that connector;
nothing in Nixpkgs uses it, and nginxModules.modsecurity builds on
libmodsecurity 3.x instead.

Built on x86_64-linux with Lua disabled (the default) and with
luaSupport on the existing Lua 5.2 input; the upstream check and the
mlogc version check passed for both.

Assisted-by: Claude Code (Claude Opus 5.5)
Select Lua 5.5 instead of the generic Lua 5.2 compatibility input for
the optional Lua support. ModSecurity 2.9.13 added Lua 5.5 handling to
its state creation and detection. Lua support stays disabled by default,
so the default package does not change.

owasp-modsecurity/ModSecurity#3527
https://github.com/owasp-modsecurity/ModSecurity/blob/v2.9.15/build/find_lua.m4

Users who enable luaSupport now run their SecRuleScript and exec scripts
with Lua 5.5 instead of the 5.2 compatibility build, so scripts relying
on removed Lua 5.1 functions such as unpack or loadstring need updating.

Built on x86_64-linux with luaSupport enabled; mod_security2.so links
liblua.so.5.5. Apache httpd 2.4.69 loaded the module with a SecRuleScript
rule that reads ARGS through m.getvar: a matching request returned 403
and logged "ModSecurity rule executed with Lua 5.5", and a non-matching
request returned 200. The default build has no Lua in its closure.

Related to NixOS#570322.

Assisted-by: Claude Code (Claude Opus 5.5)
@khaneliman
khaneliman force-pushed the modsecurity-standalone-lua55 branch from 04c2b3c to da036d9 Compare October 7, 2026 18:02
@GaetanLepage

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 571363
Commit: da036d986d2c4ffa866c615a65eb0ea1a9453772


x86_64-linux

✅ 1 package built:
  • modsecurity_standalone

aarch64-linux

✅ 1 package built:
  • modsecurity_standalone

aarch64-darwin

✅ 1 package built:
  • modsecurity_standalone

@GaetanLepage
GaetanLepage added this pull request to the merge queue Oct 7, 2026
Merged via the queue into NixOS:master with commit 88931c7 Oct 7, 2026
28 checks passed
@khaneliman
khaneliman deleted the modsecurity-standalone-lua55 branch October 7, 2026 23:38
insipx pushed a commit to insipx/nixpkgs that referenced this pull request Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants