Repository navigation
[Backport release/3.0.0] Update container security dependencies - #7812
Conversation
|
run-ci |
|
| for architecture, checksum in hashes.items(): | ||
| with self.subTest(architecture=architecture): | ||
| self.env["TEST_ARCH"] = architecture | ||
| result = self._run() |
There was a problem hiding this comment.
Architecture subtests share previous results
Both architecture runs append to the same events and checksums files. The arm64 assertions for removal ordering, notice installation, and system filter configuration can therefore be satisfied by the earlier amd64 run, masking an arm64-specific regression that skips those operations. Clear both logs before each invocation so the assertions check only the current run.
| for architecture, checksum in hashes.items(): | |
| with self.subTest(architecture=architecture): | |
| self.env["TEST_ARCH"] = architecture | |
| result = self._run() | |
| for architecture, checksum in hashes.items(): | |
| with self.subTest(architecture=architecture): | |
| (self.root / "events").write_text("", encoding="utf-8") | |
| (self.root / "checksums").write_text("", encoding="utf-8") | |
| self.env["TEST_ARCH"] = architecture | |
| result = self._run() |
| def test_bad_checksum_cannot_remove_or_install_anything(self): | ||
| self.env["TEST_CHECKSUM"] = "fail" | ||
| result = self._run() | ||
| self.assertNotEqual(result.returncode, 0) | ||
| events = (self.root / "events").read_text() | ||
| self.assertNotIn("remove ", events) | ||
| self.assertNotIn("install ", events) |
There was a problem hiding this comment.
Vendor checksum rejection remains untested
Setting TEST_CHECKSUM to fail makes the first, binary-archive check fail, so this test never reaches the vendor checksum. Removing vendor verification entirely would still leave the suite green. Make the mock distinguish the two archives and add a case where the binary checksum succeeds but the vendor checksum fails. Assert that the installer exits before extracting the vendor archive or removing/installing packages.
There was a problem hiding this comment.
Isaac Lab Review Bot
The dependency and Git LFS security updates are consistently applied, but the new regression check covering both Dockerfiles is not triggered when Dockerfile.base alone changes.
- Design and architecture: The shared checksum-verified Git LFS installer is used by both container images and included in the dependency-cache hash. However, the kit-less workflow is the added execution path for the regression test, and its change detector omits docker/Dockerfile.base, leaving that side of the two-image contract unenforced for base-only edits.
- API: No Python public APIs, CLI arguments, or configuration fields change. The dependency manifest and lockfile consistently reflect the updated GitPython, Pillow, and PyArrow selections.
- Implementation: The installer verifies architecture and checksums before removing or installing Git LFS, preserves notices, and is exercised through offline tests. Add docker/Dockerfile.base to the kit-less workflow change patterns, or otherwise ensure the assertion covering that file runs when it changes.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| ^docker/docker-compose\.yaml$ :: Kit-less Compose definition | ||
| ^docker/test/test_container_profiles\.py$ :: Kit-less profile tests | ||
| ^docker/test/test_dockerfile_nonroot\.py$ :: Dockerfile contract tests | ||
| ^docker/test/test_security_dependencies\.py$ :: Container dependency tests |
There was a problem hiding this comment.
🔵 Suggestion · Design Architecture — Dockerfile.base guard never triggered by its own edits
The new test asserts that docker/Dockerfile.base still copies and runs install_git_lfs.sh, but this workflow is the only place the test is invoked and its change-detection list matches only ^docker/Dockerfile\.kitless$. An edit that drops the verified installer from Dockerfile.base would not run this job, so the guard silently never fires for that file. Add a Dockerfile.base pattern or scope the assertion to the kit-less image.
Summary
Ports the focused security updates from internal MR7 onto develop.
Type of change
Release backport
Backport of #7811
Validation
Checklist