Skip to content

Images: hadolint, Trivy image scan (app gates PRs), Debian security updates in the app image, daily live scan (sc-9611) - #259

Open
ndbroadbent wants to merge 1 commit into
mainfrom
ci-images
Open

ndbroadbent wants to merge 1 commit into
mainfrom
ci-images

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Fourth PR for sc-9611: Dockerfile lint and image scanning. It's stacked on #257 and retargets as the stack merges.

hadolint 2.15.1, in CI's security job and the pre-commit hook (.hadolint.yaml; fails on warnings):

  • DL3008 (pin apt versions) is ignored, with the reason. Debian's archive drops superseded versions, so a pinned version stops installing at the next security update. The base image is pinned by digest instead.
  • The renderer's two warnings (DL3003, DL4006, both in the PDFBox download step) are ignored on the command line, not in the file. Any edit to renderer.Dockerfile rebuilds the renderer, so they get fixed in that rebuild (sc-9674).

Trivy on the built images (images job). It flags fixable HIGH/CRITICAL vulnerabilities, ignores carry an expiry in .trivyignore.yaml, and it fails on forbidden licences (AGPL and the like):

  • App image: gates pull requests. The PR build now loads the image into the runner (load: true) so it can be scanned; main still pushes it. On main the scan only reports, so a CVE published today never holds back a deploy.
  • Renderer image: report-only until sc-9674 rebuilds it on purpose.
  • Audit workflow: a new live-image job scans the app image production runs (the commit api.visualci.com/status reports), daily and on demand.

It starts green. The pinned debian:trixie-slim is still Debian's newest image, and it has fixable HIGH CVEs in openssl (libssl3t64 3.5.9 → 3.5.10) and zstd. The app's runtime stage now runs apt-get upgrade. CI passes today's date as SECURITY_UPDATES_DATE, so BuildKit's layer cache never keeps older packages. The renderer is untouched: editing its Dockerfile changes its inputs hash, and a rebuild pulls unpinned fonts/MuPDF/JDK packages that can move pixels. That's sc-9674, with a pixel-diff review before it merges.

FROM stays tag-only, and AGENTS.md now says why. CI already replaces each base image with the digest-pinned mirror copy (build-contexts, .github/mirror.txt). Those digests are linux/amd64 only, so putting them in FROM would break local builds on arm64.

Checked locally: hadolint, actionlint and zizmor all come back clean. I couldn't scan the private GHCR images from this box (the gh token has no read:packages); I scanned the public base image at the same digest instead. The PR's own images job is the real test of the app gate.


Test this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@ndbroadbent
ndbroadbent force-pushed the ci-audits branch 7 times, most recently from 302e1b3 to a669251 Compare December 5, 2026 16:43
@ndbroadbent
ndbroadbent deleted the branch ci-audits December 5, 2026 16:55
@ndbroadbent ndbroadbent closed this Dec 5, 2026
@ndbroadbent ndbroadbent reopened this Dec 5, 2026
@ndbroadbent
ndbroadbent changed the base branch from ci-audits to main December 5, 2026 16:56
… images (app gates pull requests, renderer reports until sc-9674); the app image takes Debian's security updates; the live app image scanned daily (sc-9611)

The pinned debian:trixie-slim (Debian's newest) has fixable HIGH CVEs in openssl and zstd: the app's runtime stage now
runs apt-get upgrade, with today's date as a build arg so BuildKit's cache never keeps old packages. FROM lines keep
tags: CI pins them by digest through build-contexts (amd64-only digests would break local arm64 builds).
@ndbroadbent

Copy link
Copy Markdown
Member Author

Reopened. This PR closed itself at 16:55 when I merged #257 with --delete-branch. Its base was #257's branch, and GitHub closes a PR whose base branch is deleted. The work is still wanted. It's now based on main, rebased to its one commit (07a9510), and goes through CI again.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant