Repository navigation
security(images): refresh OS packages and pinned dependencies in the runtime images - #18
Conversation
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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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>
|
Added |
|
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. |
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 commitf3370b39. Forward-porting these changes todevelopis tracked separately.Server image (
Dockerfile)apt-get upgrade), so the image includes OS fixes published since the base image was cut, such as curl, OpenSSL, and Perl.eb1ac09is now built with Go 1.27.2, with these module versions:golang.org/x/netv0.61.0golang.org/x/textv0.43.0github.com/sirupsen/logrusv1.10.1all,development, andtestingrequirements 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.cicopies its requirements from the build context, so CI is unaffected.cvat/requirements/regenerate.sh --no-upgrade --upgrade-package …:UI image (
Dockerfile.ui)nginxinc/nginx-unprivileged:1.31.6-alpine3.24-slim(OpenSSL 3.5.9, PCRE2 10.49), pinned by digest.node:lts-slimstage is pinned to the Node 24.19.0 digest, so the bundle does not change when theltstag moves.YOLOv7 sidecar (
yolov7/)develop(security(yolov7): rebuild the sidecar on Ubuntu 24.04 and Python 3.12 #16), unchanged.Testing
Done locally:
go version -mshows x/net v0.61.0, x/text v0.43.0, and logrus v1.10.1.govulncheck -mode=binaryfinds no vulnerabilities.pkg/smokescreen, whereTestHostSquareBracketsfails. It fails the same way on unmodifiedeb1ac09with Go 1.27.2.COPY --parents --exclude. In a test build, onlybase.*,production.*, andutils/dataset_manifest/requirements.txtreach/opt/cvat.-t error, as CI runs it, passes. Lines this PR changes have no new findings.Still to run:
🤖 Generated with Claude Code