You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The image installs the app's dependencies from the version ranges in requirements.txt (which are also the package's dependencies, via pyproject.toml), including their own dependencies, unpinned. Two builds of the same commit can therefore get different versions, and a compromised or broken release of a dependency gets into the image without a review. #121 pinned the base image by digest, but not the Python packages installed on top of it.
This was deferred from the low-severity review findings in #117.
How?
Generate a lock file with exact versions and hashes for the image (e.g. pip-compile --generate-hashes or uv pip compile --generate-hashes), for the Python version of the base image.
Install it in the Dockerfile with pip install --require-hashes, instead of requirements.txt. The app itself is already installed with --no-deps.
Keep the version ranges in requirements.txt for installs as a package.
Let Dependabot update the lock file, and check in CI that it matches requirements.txt.
Docs: how to update the lock file (README, contributing section).
Acceptance criteria
The image build installs only locked, hash-checked packages.
Update on the premise: requirements.txt is gone. The dependencies (with their version ranges) are now in pyproject.toml (project.dependencies), and the image build installs them via scripts/image_requirements.py, which also leaves out a temporary FOCA commit reference (foca @ git+...@<sha>) and checks the base image's FOCA instead.
The plan in the issue (a lock compiled with pip-compile/uv pip compile --generate-hashes, updated by Dependabot's pip ecosystem) doesn't work well with Dependabot: for a pyproject.toml source it bumps pins one by one without re-resolving, and not together with the ranges. So the implementation instead uses:
uv.lock (exact versions and hashes for all dependencies and extras), checked in CI with uv lock --check (lint job; uv comes with the dev extra).
In the image build: uv export --frozen --no-dev --no-emit-project (uv mounted from a digest-pinned uv image, not kept in the image), the FOCA commit reference filtered out as before (it has no hash), then pip install --require-hashes --only-binary :all: --no-deps.
Dependabot: the root entry moves from pip to uv, which updates pyproject.toml and uv.lock together; the docker entry also updates the uv image.
Docs: "Dependencies" in the development guide, and the packaging guideline in the contributing guide.
The acceptance criteria stay as they are; the Dependabot criterion can only be verified once dev reaches main (Dependabot reads its config from the default branch).
Activity
uniqueg commentedon Oct 28, 2026
Update on the premise:
requirements.txtis gone. The dependencies (with their version ranges) are now inpyproject.toml(project.dependencies), and the image build installs them viascripts/image_requirements.py, which also leaves out a temporary FOCA commit reference (foca @ git+...@<sha>) and checks the base image's FOCA instead.The plan in the issue (a lock compiled with
pip-compile/uv pip compile --generate-hashes, updated by Dependabot'spipecosystem) doesn't work well with Dependabot: for apyproject.tomlsource it bumps pins one by one without re-resolving, and not together with the ranges. So the implementation instead uses:uv.lock(exact versions and hashes for all dependencies and extras), checked in CI withuv lock --check(lint job; uv comes with thedevextra).uv export --frozen --no-dev --no-emit-project(uv mounted from a digest-pinned uv image, not kept in the image), the FOCA commit reference filtered out as before (it has no hash), thenpip install --require-hashes --only-binary :all: --no-deps.piptouv, which updatespyproject.tomlanduv.locktogether; thedockerentry also updates the uv image.The acceptance criteria stay as they are; the Dependabot criterion can only be verified once
devreachesmain(Dependabot reads its config from the default branch).