Skip to content

build!: remove pip from the FOCA image #556

Closed

Description

@uniqueg

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/Dockerfile has 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 uv from a stage pinned by digest (the apps already have one), e.g. uv pip install --system --require-hashes --no-deps -r requirements.txt. uv itself 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 pip dist-info) is in the final image. Check that Trivy doesn't flag the copy bundled with ensurepip.

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.yaml has 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

  1. added
    priority: low
    status: triage
    type: security
    workload: hours
    priority: medium
    and removed
    priority: low
    on Oct 28, 2026
  2. added this to the v0.20.0 milestone on Nov 2, 2026
  3. changed the title [-]build: drop pip from image before CVE ignore ends[/-] [+]build!: remove pip from the FOCA image[/+] on Nov 2, 2026
  4. added
    type flag: breaking change
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumstatus: triagetype flag: breaking changetype: securityworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions