Skip to content

security(images): refresh OS packages and pinned dependencies in the runtime images - #18

Merged
chris-piekarski merged 8 commits into
release/2.72from
security/runtime-image-refresh-2.72
Oct 13, 2026
Merged

chris-piekarski merged 8 commits into
release/2.72from
security/runtime-image-refresh-2.72

Conversation

@chris-piekarski

Copy link
Copy Markdown

Summary

This refreshes the OS packages and pinned dependencies in the server, UI, and YOLOv7 sidecar images on top of 2.72.1. CVAT's own code is unchanged. There are no database migrations and no settings or compose changes.

The PR targets release/2.72, which was cut from the 2.72.1 commit f3370b39. Forward-porting these changes to develop is tracked separately.

Server image (Dockerfile)

  • OS packages. The build now upgrades the Ubuntu base image's packages (apt-get upgrade), so the image includes OS fixes published since the base image was cut, such as curl, OpenSSL, and Perl.
  • smokescreen. smokescreen eb1ac09 is now built with Go 1.27.2, with these module versions:
    • golang.org/x/net v0.61.0
    • golang.org/x/text v0.43.0
    • github.com/sirupsen/logrus v1.10.1
  • Unused requirements files. The all, development, and testing requirements manifests and the standalone DICOM converter are no longer copied into /opt/cvat. The production image never installs them, so image scanners were reporting packages the image does not contain. Dockerfile.ci copies its requirements from the build context, so CI is unaffected.
  • Python pins. These transitive pins are bumped, regenerated with cvat/requirements/regenerate.sh --no-upgrade --upgrade-package …:
    • PyJWT 2.15.1
    • NLTK 3.10.3
    • AnyIO 4.14.2
    • fontTools 4.66.1

UI image (Dockerfile.ui)

  • Runtime base. The UI is served from nginxinc/nginx-unprivileged:1.31.6-alpine3.24-slim (OpenSSL 3.5.9, PCRE2 10.49), pinned by digest.
  • Node build stage. The node:lts-slim stage is pinned to the Node 24.19.0 digest, so the bundle does not change when the lts tag moves.

YOLOv7 sidecar (yolov7/)

Testing

Done locally:

  • smokescreen. I ran the stage's commands with Go 1.27.2. It builds. go version -m shows x/net v0.61.0, x/text v0.43.0, and logrus v1.10.1. govulncheck -mode=binary finds no vulnerabilities.
  • smokescreen unit tests. Every package passes except pkg/smokescreen, where TestHostSquareBrackets fails. It fails the same way on unmodified eb1ac09 with Go 1.27.2.
  • COPY --parents --exclude. In a test build, only base.*, production.*, and utils/dataset_manifest/requirements.txt reach /opt/cvat.
  • Requirements. I regenerated them in an Ubuntu 24.04 / Python 3.12 container with pip-compile-multi (pip-tools 7.6.2). Only the four pins above changed.
  • nginx-unprivileged. The pinned digest contains Alpine 3.24.2, libssl3 and libcrypto3 3.5.9-r0, and pcre2 10.49-r0.
  • hadolint. hadolint 2.12.0 with -t error, as CI runs it, passes. Lines this PR changes have no new findings.

Still to run:

  • Fork CI on this PR, including the full server and UI image builds and the unit and REST tests

🤖 Generated with Claude Code

chris-piekarski and others added 7 commits October 13, 2026 15:46
smokescreen eb1ac09 pins golang.org/x/net v0.17.0, golang.org/x/text
v0.13.0 and logrus v1.9.0, and the image built it with Go 1.26.5. All of
them have known vulnerabilities. Build it with Go 1.27.2 and bump x/net to
v0.61.0, x/text to v0.43.0 (the version x/net v0.61.0 requires) and logrus
to v1.10.1. Re-vendor afterwards, since the module builds from vendor/.

govulncheck finds no vulnerabilities in the resulting binary. The
smokescreen unit tests pass except TestHostSquareBrackets, which fails the
same way on unmodified eb1ac09 with this Go version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The final stage installed its packages on top of whatever the Ubuntu 24.04
base image shipped, so fixes published since the base was cut (curl,
OpenSSL, Perl and others) only arrived when the base was rebuilt. Run
apt-get upgrade before installing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…image

COPY --parents copied every requirements manifest into /opt/cvat: the all,
development and testing ones that production does not install, and the
standalone DICOM converter's requirements. Image scanners then reported
vulnerable versions of packages the image does not contain. Exclude them;
base and production stay, matching what is installed. Dockerfile.ci copies
its requirements from the build context, so CI is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with cvat/requirements/regenerate.sh --no-upgrade and an
--upgrade-package for each, so only these transitive pins move:

- PyJWT 2.13.0 -> 2.15.1 (via django-allauth)
- NLTK 3.10.0 -> 3.10.3 (via datumaro)
- AnyIO 4.13.0 -> 4.14.2 (via watchfiles)
- fontTools 4.58.4 -> 4.66.1 (via matplotlib)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The nginx-unprivileged 1.31.2 Alpine 3.23 image ships OpenSSL 3.5.7. The
1.31.6 Alpine 3.24 image ships OpenSSL 3.5.9 and PCRE2 10.49; pin it by
digest. Pin the node:lts-slim build stage to the Node 24.19.0 digest as
well, so the bundle does not change when the lts tag moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take yolov7/ and its changelog fragment unchanged from develop (#16), so a
build of this branch never rebuilds the sidecar from the NVIDIA PyTorch
21.08 base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: c0b0176b-2df6-4366-8dd0-e46d8a918670

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chris-piekarski
chris-piekarski marked this pull request as ready for review October 13, 2026 21:55
The test stack's minio/mc image can no longer be pulled from Docker Hub,
so every REST and e2e job on this base fails while starting the stack,
whatever the change under test. Upstream fixed this in cvat-ai#11178;
this is that one-line change.

(cherry picked from commit 4891790)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chris-piekarski

Copy link
Copy Markdown
Author

Added d7b2f30a8, a cherry-pick of cvat-ai#11178 (test-only, one line). In the previous run, every REST and e2e job failed while starting the test stack with pull access denied for minio/mc. That Docker Hub image is gone, so any CI run on this base fails the same way, whatever the change. The server and UI image builds passed. With this commit, those jobs run against the new images.

@chris-piekarski

Copy link
Copy Markdown
Author

Test status for review: the server and UI image builds and the unit tests passed. The REST and e2e jobs cannot run on this base, because its test stack's MinIO images are no longer pullable. minio/mc is gone from Docker Hub, and quay.io/minio/minio:RELEASE.2022-09-17T00-09-45Z now returns unauthorized. Upstream replaced MinIO with Moto in cvat-ai#11225, a 26-file test change. That is not backported here. The failure is the same on any run of this base and does not come from this change.

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.

2 participants