Web server image for the Ingrest panel: nginx mainline with the Lua module stack, HTTP/3, brotli, zstd, GeoIP2 and ModSecurity on distroless Debian 13, plus the directive table the panel validates configs against.
- Runtime on
gcr.io/distroless/cc-debian13: no shell or package manager; binaries built with stack protector, FORTIFY, full RELRO, PIE and control-flow protection flags. - nginx from nginx.org, verified against the signing keys in
keys/nginx.gpg. - Static modules:
lua-nginx-module,stream-lua-nginx-module,ngx_devel_kit; LuaJIT 2.1. - Dynamic modules: brotli, zstd (
GetPageSpeed/zstd-nginx-module), GeoIP2 (HTTP), ModSecurity. - libmodsecurity built from its release with JSON (yajl) and PCRE2 only: no XML body processor, remote rules, Lua scripts, GeoIP, LMDB or ssdeep.
- Lua libraries:
resty.core,resty.lrucache,resty.string(sha256,random),cjson. - Every source is pinned in the
Dockerfileby version or commit and checked at build time.
/usr/local/nginx/sbin/nginx, modules in/usr/local/nginx/modules, Lua libraries in/usr/local/nginx/lualib./usr/local/nginx/directives.json: every directive form of the build.- Temp files, pid and lock default to
/tmp, so the image runs with a read-only root and a tmpfs on/tmp. - Licenses of nginx and every module in
/usr/local/nginx/licenses.
VERSION is <nginx version>.<build>; the image reports the build in nginx -v as ingrest-<build>. Every published image needs its own version: a module or package change bumps the build, and publish refuses a version already published with another image.
watchchecks the nginx mainline hourly, but GitHub drops most scheduled runs: the Cloudflare Worker intools/triggerchecks nginx.org every 5 minutes and dispatcheswatchwhen a newer signed mainline has nonginx-<version>branch yet. Deploy it withCLOUDFLARE_API_TOKEN(Workers Scripts: Edit),CLOUDFLARE_ACCOUNT_IDand, the first time or to rotate it,GITHUB_TOKEN(fine-grained, this repository, Actions: write) intools/trigger/deploy.sh. A new signed release opens a pull request that bumpsVERSION; when its CHANGES entry has security fixes, the pull request is labelledsecurityand lists them.- nginx releases are automatic: when the bot pull request builds and passes the smoke test on both architectures and changes only
VERSION,buildmerges it, buildsmain, andpublishsigns it without review, but only whenVERSIONis the only file changed since the commit of the last published image (commitinstable.json). Anything else, modules included, waits for a merge and thereleaseapproval. watchalso checks every module and libmodsecurity hourly (release tags;ngx_brotliand the GeoIP2 module by their default branch, they have no current tags) and opens one pull request per group;lua-nginx-module,stream-lua-nginx-moduleandlua-resty-coremove together.- A module pull request lists the compared commits and the repository's published security advisories since the pin, and is labelled
securitywhen a commit names a CVE, an advisory, a memory safety fix or a bypass. - Modules tracked by tags move to their default branch when it has fix commits (not docs, ci, tests) past the pin and the newest tag whose subjects match those words: such fixes can wait months for a release.
scanalso keeps one issue, "Unfixed vulnerabilities in linked libraries": HIGH or CRITICAL findings without a Debian fix in packages that nginx, its modules or libmodsecurity load. Ids checked as not affecting the image go totools/watch/unfixed.ignorewith the reason.scanruns Trivy on the newest published image every 6 hours: fixable HIGH or CRITICAL Debian packages open asecuritypull request that changesREFRESH, which makes the runtime stage reinstall and upgrade its packages.patches/is for emergencies only (seepatches/README.md).
- Every pull request builds
ghcr.io/ingrest-dev/edge:test-<version>-<commit>for amd64 and arm64 and runstest/smoke.sh. Test it on a panel by pinning that tag. test/smoke.shcovers what the panel's Lua uses: every phase (init, init_worker, ssl_client_hello withngx.ssl.clienthelloandngx.ctxpassed to requests over TCP and QUIC, ssl_certificate, balancer with retries, header_filter, log, stream preread, balancer and log), timers, light threads, cosockets, shared dicts, request bodies, the bundled libraries, brotli, zstd, ModSecurity, HTTP/3 and stream SNI passthrough.- A merge to
mainpublishes<version>and<version>-<commit>, thenpublishwaits for approval in thereleaseenvironment and adds the image digest to the signed manifeststable.jsonin the releasechannels. Signing runs one at a time in thechannelenvironment, which holdsEDGE_KEY; it refuses a build older than the newest published one and puts the previous manifest back when an upload fails. publishis the last job ofbuild(workflow_call), not aworkflow_runworkflow: runs started with the workflow token, like the bot's build ofmain, trigger no other workflows. A newer build ofmaincancels a release still waiting for approval; a publish past that gate still finishes.- Panels take the newest image in the manifest whose
min_panelis not above their own version. SetMIN_PANELin the pull request when an image needs a newer panel. - Label a pull request
securityto let panels with automatic security updates install it at once. - The manifest is signed with the minisign key in
keys/edge.pub.
docker build --build-arg VERSION=$(cat VERSION) -t edge .
sh test/smoke.sh edge