Repository navigation
Description
Problem
The FOCA image keeps pip "as images built from this one install their packages with it" (docker/Dockerfile). pip vendors its own copies of urllib3, setuptools and msgpack, and these are flagged by image scans. FOCA and every app image built on it (cloud-registry, proTES, trs-filer) therefore carry the same entries in .trivyignore.yaml: setuptools 70.3.0, urllib3 2.7.0 and msgpack 1.1.2, among them CVE-2026-114613. All of them expire on 2027-01-31, so after that day every image scan fails again, in every repo at once. Only pip uses these copies, and only at build time. Upgrading pip doesn't fix this for good, because the next vendored CVE brings the problem back.
Proposal
Fix it once, in the FOCA image:
- The final stage of
docker/Dockerfilehas no pip: uninstall it after the packages are installed, so that its vendored packages are gone too. FOCA's builder stage keeps whatever it needs. - Document how images built on FOCA install their packages without pip: with
uvfrom a stage pinned by digest (the apps already have one), e.g.uv pip install --system --require-hashes --no-deps -r requirements.txt.uvitself is not copied into the final image. The same applies to derived images that add plugins. - Drop the pip-related entries from FOCA's
.trivyignore.yaml. - Add an image test that fails if pip (or a
pipdist-info) is in the final image. Check that Trivy doesn't flag the copy bundled withensurepip.
This is a breaking change for images that run pip install on top of the FOCA image: note it in the migration guide of 0.20.0.
Each app then bumps its FOCA base, switches its install steps to uv and removes its ignore entries, in one follow-up issue per app (blocked by this issue).
Acceptance criteria
- The final FOCA image contains no pip, and an image test checks this.
- FOCA's
.trivyignore.yamlhas no entries for packages vendored by pip, and the image scan passes. - The docs (image docs and the 0.20.0 migration guide) show how to install packages on top of the FOCA image with
uv.
Activity
[-]build: drop pip from image before CVE ignore ends[/-][+]build!: remove pip from the FOCA image[/+]