Skip to content

Track Python base image with Dependabot, pinned to 3.14 - #416

Merged
irvingpop merged 3 commits into
mainfrom
dependabot-docker-pin-3.14
Nov 23, 2026
Merged

irvingpop merged 3 commits into
mainfrom
dependabot-docker-pin-3.14

Conversation

@irvingpop

Copy link
Copy Markdown
Member

Summary

Dependabot never opened Docker base image PRs for this repo, unlike operationcode-pybot. Two causes:

  1. No .github/dependabot.yml existed on main.
  2. The Dockerfile used ARG PYTHON_IMAGE + FROM ${PYTHON_IMAGE}. Dependabot does not resolve ARG variables in FROM, so it could not see the image.

Changes

  • Add .github/dependabot.yml with a weekly docker entry.
  • Ignore semver-minor and semver-major updates for python. We stay on Python 3.14; Dependabot will only propose 3.14.x patch bumps. Remove the rule when we move to 3.15.
  • Dockerfile: add a base stage with the literal tag python:3.14.10-slim-trixie. Other stages use FROM base. Same image, same stage names. PYTHON_IMAGE was not used anywhere else (CI and compose use only target:).

Verification

  • docker build --target development and --target runtime pass.
  • docker scout on the runtime image: 0 critical, 4 high. main has the same 4 high. All are in Debian openssl 3.5.9-1~deb13u1, with no fix yet. Future 3.14.x patch PRs from Dependabot should pick up the fix.

🤖 Generated with Claude Code

Use a literal tag in a base stage so Dependabot can read it; drop the
unused PYTHON_IMAGE ARG. Ignore python major/minor bumps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@irvingpop
irvingpop requested a review from kylemh as a code owner November 23, 2026 16:03
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🟢 All clear: Claude of Duty review passed

Mission: Review the code. Protect the branch. Deploy the future.

Tip

No findings. This review found no reason to block. Nothing to do for this review.
The merge box shows whether the other required checks pass.

File checks Review Security Supply chain Dependency review Coverage
✅ ok, 1 signal ✅ ran, 0 findings ✅ ran, 0 findings ✅ ran, 0 findings ✅ ok ✅ complete

Run 45215034399, attempt 1 for head f444135 into main. The required workflow in the merge box is the result that counts.

Claude of Duty never approves a PR. A human reviewer gives the final approval.

📋 Full review record: reasons, checks, signals, finding details, model summaries, token usage

Reviewed snapshot

Head SHA Merge base SHA Base branch Run
f444135233f7db2323caead3c5c9541e376660e4 ea02c8fcd41d315062e829bae838f835eab6cdd8 main 45215034399, attempt 1

Reasons the gate failed

None. No reason applies.

Checks (code, no model)

Check Result Detail
Hard blocks ✅ none
Coverage ✅ complete files in comparison 5, files collected 5, trees complete
Model view full estimate 17,296 tokens, limit 200,000 tokens, multiplier 1x
Dependency changes ✅ none
Dependency review job ✅ success

Signals (context only, never block)

  • ⚠️ Sensitive path changed: change to Dockerfile, in Dockerfile

Dependency changes

None.

Finding details

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Blocking is decided by code from category and severity, never by the model. A finding in a blocking category blocks only at high or critical severity.

No findings. All three passes completed.

Model summaries

Model output from untrusted input. Check it before you act on it. Verified means only that the quoted text is at that place. It does not mean the claim is true.

Pass Status Model Summary
Review ✅ ok claude-sonnet-5-5 The PR adds a Dependabot config, replaces the ARG-based image reference with a literal `base` stage in the Dockerfile, pins Python to 3.14.x in pyproject.toml and poetry.lock, and removes the ensurepip bundled wheels in the runtime image. I found no clear correctness bugs.
Security ✅ ok claude-sonnet-5-5 The PR adds a Dependabot config, introduces a literal base stage in the Dockerfile, pins Python to 3.14 in pyproject/lockfile, removes bundled ensurepip wheels in the runtime image, and updates the README. I found no injection, secret, authentication, or weakened-control issues in the changed code. The ensurepip wheel removal is a mild hardening step.
Supply chain ✅ ok claude-sonnet-5-5 This PR adds a Dependabot config (pip, github-actions, docker), refactors the Dockerfile to use a literal `FROM python:3.14.10-slim-trixie AS base` stage so Dependabot can see the image, deletes the ensurepip bundled wheels in the runtime image, and narrows the Python constraint to >=3.14,<3.15 in pyproject.toml and poetry.lock. I found no obfuscation, no encoded payloads, no new network calls, no dependency changes and no text aimed at an AI reviewer. The base image is still the official python image with the same tag. The Dependabot config uses official ecosystems only, with cooldowns and grouping. Nothing here looks malicious or like a risky supply-chain change.

Token usage

Pass Input Output Cache write Cache read Attempts
Review 723 119 0 15869 1
Security 1049 140 0 15869 1
Supply chain 1241 258 15869 0 1
Total 3013 517 15869 31738 3

@irvingpop

Copy link
Copy Markdown
Member Author

Compared this with the same fix in operationcode-pybot (OperationCode/operationcode-pybot#470). Two gaps here, and one thing we took from this PR:

  1. Poetry still allows 3.15. pyproject.toml keeps python = "^3.14", so Poetry will resolve for 3.15 while Dependabot is held on 3.14. Suggest python = ">=3.14,<3.15", then poetry lock (no package versions should change, only the content-hash and python-versions), and update any README text that says "3.14 or greater".

  2. pip is likely still in the runtime image. The runtime stage has no pip uninstall, so the base image's pip (and its vendored urllib3 2.7.0, msgpack 1.1.2, setuptools 70.3.0, which have HIGH CVEs) ships to production. The wheel bundled for ensurepip carries the same packages. In pybot the runtime stage does:

    # pip is not used at runtime, and its vendored packages carry CVEs; the wheel bundled for ensurepip carries them too
    RUN python -m pip uninstall -y pip && \
        rm -f /usr/local/lib/python3.14/ensurepip/_bundled/*.whl

    Only safe if nothing in the container runs pip or python -m venv at runtime. Note that docker scout and current Trivy do not report pip's vendored packages, so a clean scan does not prove they are absent. Check with docker run --rm --entrypoint python <image> -m pip --version.

  3. Taken from here: the update-types: [semver-major, semver-minor] ignore is better than the versions: [">=3.15"] form we had. It needs no edit when we move minors on purpose. pybot#470 is switching to it.

Not verified: I did not build this image, so point 2 is inferred from the Dockerfile.

Python constraint is now >=3.14,<3.15 to match the Dependabot ignore.
Runtime already uninstalled pip; also delete the ensurepip bundled
wheels, which carry the same vendored CVEs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kylemh
kylemh previously approved these changes Nov 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude of Duty review, run 45213750455: 1 inline finding(s). Model output from untrusted input. Check it before you act on it. The gate result is in the summary comment.

Comment thread Dockerfile Outdated
python -m pip uninstall -y -q pip && \
/usr/local/bin/python -m pip uninstall -y -q pip
/usr/local/bin/python -m pip uninstall -y -q pip && \
rm -f /usr/local/lib/python3.14/ensurepip/_bundled/*.whl

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low bug, confidence low, pass review

Hard-coded python3.14 path in ensurepip wheel removal

The path hard-codes python3.14. With rm -f, a future minor bump of the base image would silently skip the removal and leave the vulnerable bundled wheels. The pin and Dependabot ignore rules currently keep the image on 3.14, so impact is low.

Model output from untrusted input. Check it before you act on it.

…4 path

Add grouped pip and github-actions updates with a 7-day cooldown. Use
python3.* in the ensurepip wheel cleanup so a base image bump keeps it
working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@irvingpop
irvingpop merged commit c44d74e into main Nov 23, 2026
10 checks passed
@irvingpop
irvingpop deleted the dependabot-docker-pin-3.14 branch November 23, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants