Skip to content

Migrate ci-tools to Lua 5.4 and eliminate kernel-header CVEs#189

Merged
lex57ukr merged 1 commit into
mainfrom
187-cve-ci-tools-jq-tool-refresh
Jul 6, 2026
Merged

Migrate ci-tools to Lua 5.4 and eliminate kernel-header CVEs#189
lex57ukr merged 1 commit into
mainfrom
187-cve-ci-tools-jq-tool-refresh

Conversation

@lex57ukr

@lex57ukr lex57ukr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The scheduled CVE monitor (#187) flagged fixable HIGH/CRITICAL vulnerabilities in ci-tools, and separately keystone needs busted to run on Lua 5.4 to match Pandoc's embedded HsLua runtime (#188). These share a mechanism: the bulk of the CVEs — 79 in linux-libc-dev (kernel headers), including one critical — are dragged into the image transitively by luarocks' -dev dependency chain, and can't be purged without breaking the installed rocks. Rebuilding the lua toolchain for 5.4 via a multi-stage build compiles the rocks in a throwaway builder and ships only the runtime, eliminating those 79 CVEs at the source instead of suppressing them.

Related Issues

Fixes #187
Fixes #188

Changes

  • Multi-stage Dockerfile: a builder stage compiles luacheck + busted for Lua 5.4; the final stage installs only the lua5.4 runtime and copies the compiled rock trees, dropping luarocks, gcc, and the liblua-dev → libc6-dev → linux-libc-dev header chain — removing 79 linux-libc-dev CVEs (incl. the critical) from the image entirely.
  • busted, luacheck, and luassert now run on Lua 5.4.
  • Suppress jq CVE-2026-32316 and CVE-2026-40164 (Debian deb12u2 fix not yet in the mirror), tracked under Update actionlint and shfmt to remove suppressed Go stdlib CVEs #96.
  • Advertise the Lua 5.4 interpreter and luassert in the README and verify script.
  • Pick up minor tool bumps from make resolve (markdownlint-cli2 0.23.0, biome 2.5.2).

Further Comments

Verified locally: make scan exits clean (0 vulns on the debian target), make verify reports Lua 5.4.4 with all tools OK, and the full 217-test bats suite passes. Confirmed the final image ships no linux-libc-dev, libc6-dev, gcc, or luarocks.

@lex57ukr lex57ukr added enhancement New feature or request security Security-related change docker Docker image changes labels Jul 6, 2026
Compile luacheck/busted for Lua 5.4 in a throwaway builder stage and copy
only the runtime plus rock trees into the final image. This drops luarocks,
gcc, and the liblua-dev -> libc6-dev -> linux-libc-dev header chain from the
final image, eliminating 79 linux-libc-dev CVEs (incl. one critical) at the
source rather than suppressing them. busted now runs on Lua 5.4 to match
Pandoc's embedded HsLua runtime.

Suppress jq CVE-2026-32316 and CVE-2026-40164 (deb12u2 fix not yet in the
Debian mirror) and advertise luassert plus the Lua 5.4 interpreter.
@lex57ukr
lex57ukr force-pushed the 187-cve-ci-tools-jq-tool-refresh branch from 1233f73 to d9bb91b Compare July 6, 2026 02:02
@lex57ukr
lex57ukr enabled auto-merge (squash) July 6, 2026 02:02
@lex57ukr
lex57ukr merged commit 0c11512 into main Jul 6, 2026
9 checks passed
@lex57ukr
lex57ukr deleted the 187-cve-ci-tools-jq-tool-refresh branch July 6, 2026 02:03
lex57ukr added a commit that referenced this pull request Jul 6, 2026
The 5.4 rebuild (#189) moved luarocks and gcc to the throwaway builder
stage. zip and unzip had only ever been present as transitive apt deps of
luarocks in the final image, so they silently dropped out.

Both are part of the tool contract downstream bats suites depend on to
assemble and inspect archive-format fixtures (ODT/DOCX/EPUB); their absence
surfaces as `zip: command not found` (status 127). Request them explicitly
so a future dependency shuffle can't drop them again, assert them in
verify.sh, and list them in the README tool inventory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker image changes enhancement New feature or request security Security-related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run busted on Lua 5.4 in ci-tools (match Pandoc's runtime) CVE Monitor: fixable vulnerabilities in ci-tools

1 participant