security(shared-httpd): remove cgid/lua/include/actions/dav/userdir + exec-surface build gate

One Apache serves every tenant in shared-httpd and everything it executes runs as
the shared `apache` user. mod_lua cannot be closed from the WHP vhost side
(RewriteRule [H=lua-script] binds the handler after any config pin), so the
modules are removed from the image: scripts/httpd-exec-surface-gate.sh
remove|check, run as the last package step of Dockerfile.shared-httpd. check
fails the build if a banned module is loadable/loaded, the global INCLUDES filter
or a cgi-bin ScriptAlias is configured, httpd -t fails, or a module the platform
needs (rewrite, proxy_fcgi, ssl, headers, ...) is not loaded. Test + CI wiring.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-22 21:48:51 -08:00
1 parent d4ec8b526c
commit 8fbbd6d160
4 files changed
+187

No files matched your search

+8
View File
@@ -76,6 +76,8 @@ jobs:
scripts/lsphp-abi-gate.sh \
scripts/tune-mpm.sh \
scripts/httpd-h2-md-gate.sh \
scripts/httpd-exec-surface-gate.sh \
scripts/tests/httpd-exec-surface-gate.test.sh \
scripts/tests/lsphp-info-probe.test.sh \
scripts/lsphp-repo-version.sh \
scripts/tests/lsphp-repo-version.test.sh \
@@ -94,6 +96,12 @@ jobs:
.gitea/scripts/resolve-base-image.sh \
.gitea/scripts/plan-legs.sh
# shared-httpd tenant isolation (2026-11-22): the gate that strips cgid/lua/include/
# actions/dav/userdir and the global SSI filter + cgi-bin ScriptAlias must be able to
# FAIL. Runs the gate in a throwaway stock-Alma httpd container (needs docker + dnf).
- name: shared-httpd exec-surface gate test
run: ./scripts/tests/httpd-exec-surface-gate.test.sh
- name: lsphp pin-resolve fixture test
run: ./scripts/tests/lsphp-pin-resolve.test.sh