Repository navigation
fix(docker): pick up Debian security fixes and block untrusted libvips loaders - #3053
Conversation
…updates The image build reused its registry cache for the runtime stage's apt-get layer until the debian:trixie-slim tag moved, so published images missed Debian security fixes released in between. CI now pulls fresh base images and rebuilds the runtime stage on every build, and the stage runs apt-get upgrade for packages already in the base image. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
libvips marks loaders that are not hardened against hostile input, such as PDF (Poppler), ImageMagick, OpenEXR and FITS, as untrusted. Silo decodes artwork from providers, media folders and uploads, and bimg routes any %PDF input to the Poppler loader. Block untrusted loaders for the process and keep SVG, which provider logos use. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 42 seconds. View limit details
Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Problem
Related issue: N/A
Validation tasks: none
Published Docker images miss Debian security fixes, and Silo lets libvips decode PDFs from untrusted artwork.
CI reuses its registry layer cache for the runtime stage, so the
apt-get installlayer is rebuilt only when thedebian:trixie-slimtag moves. Fixes Debian ships in between never reach the image. The currentlatest(build-1700) haslibbrotli1 1.1.0-2+b7, which has a high-severity out-of-bounds write in its decoder (CVE-2026-111497), and an olderlibheif. Debian already publishes fixed versions of both. Trivy counts 55 findings in the image that have a Debian fix available.Silo decodes artwork from metadata providers, media folders and uploads, and bimg picks the decoder from the leading bytes. Any input starting with
%PDFgoes to the libvips Poppler loader. libvips marks that loader untrusted, along with ImageMagick, OpenEXR, FITS and others, because it is not hardened against hostile input. Silo has no use for PDF artwork.Approach
pull: true,no-cache-filters: runtime). The stage also runsapt-get upgradefor packages already in the base image. The frontend and Go stages keep using the cache until their base images change. Each image build now downloads the runtime packages and the Intel compute runtime again.imageutilblocks every libvips loader marked untrusted, then re-enables SVG, because providers such as TMDB serve logos as SVG. JPEG, PNG, WebP, GIF, TIFF, HEIF and AVIF use trusted loaders and are unaffected. Where libvips links ImageMagick 6, for example on Ubuntu 24.04, the block also keeps bimg from handing BMP, PSD, ICO and similar formats to ImageMagick. bimg does not recognize the loader name of the ImageMagick 7 that the image ships, so those formats were already rejected there. libvips older than 8.13 has no untrusted flag and keeps every loader.Most findings that remain are in libraries Silo cannot reach (OpenEXR, matio, cfitsio) or in tools it never runs (util-linux, systemd-homed, GnuPG), and Debian has no fix for them yet. The npm findings (
undici,brace-expansion) come from the npm bundled withnode:24-slimand will clear when that image updates.Validation
latestbuild-1700 has 55 Debian findings with an available fix. This branch, built like CI on the same commit, has none.internal/jellycompatHDR routing tests that fail the same way on a clean localmaincheckout and pass inmain's CI. The web steps passed when rerun withCI=true, and actionlint 1.7.12 passed viago run.docker.ymlcallstrusted-linux-build.yml@main, so the workflow change takes effect only after merge.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3053/
Risks
Image builds take longer, because the runtime stage no longer comes from the cache. Artwork that is a PDF no longer decodes. Neither do BMP, PSD or ICO artwork on installs whose libvips links ImageMagick 6. The Docker image already rejected those three formats.
Checklist
AI Disclosure
no-cache-filtersoverrides the imported registry cache, whether anything depends on the final stage being unnamed, init order against bimg'svips_init, the SVG class name and version guard, and whether the tests catch a regression. It found that the PDF loader is untrusted and now blocked, which the code comment had called trusted. It also found that the first test could not detect a missing block, and that one workflow comment overstated what stays cached. All three are fixed: the comment names PDF, a PDF case now fails without the block, and the workflow comment is corrected.🤖 Generated with Claude Code