Skip to content

ci: scan the released Python 3.15 image - #541

Merged
uniqueg merged 1 commit into
devfrom
ci/scan-python-3-15
Oct 27, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/scan-python-3-15

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

v0.18.0 is released, so the scheduled scan no longer needs to skip the
Python 3.15 image. This removes the first-release: "0.18.0" matrix entry
for Python 3.15 and everything only it used (the FIRST_RELEASE env var,
the version_ge helper and skip/notice branch, and the if: on the scan
step). The 3.15 job now scans elixircloud/foca:0.18.0-py3.15 like the
other versions.

Closes #540

Verification

  • Docker Hub API: elixircloud/foca:0.18.0-py3.15 exists (linux/amd64,
    pushed 2026-10-27T01:30Z); v0.18.0 is the latest final tag on main.
  • actionlint .github/workflows/scan.yml: no findings.
  • zizmor --offline .github/workflows/scan.yml: one low self-repository
    finding on uses: ./.github/actions/scan-image, which is pre-existing on
    dev and unrelated to this change.
  • CI: all checks passed (CI passed, run 40438332300; image/publish
    jobs skipped as intended on PRs).

Review

Light lane: CI-only change that removes a temporary skip in the scheduled
scan workflow; it touches no secrets, permissions or the release workflow.
I reviewed the diff myself; no reviewer subagents.

Declined review findings

  • Sourcery (medium): forks whose latest release predates 0.18.0 would now
    fail the Python 3.15 scan instead of skipping. Declined: the entry was
    temporary by design and compared against upstream's first release, not
    the fork's; ci: scan the released Python 3.15 image #540 asks for its removal, and a failing scan is a correct
    signal that an image is missing.

Open questions

None.

🤖 Generated with Claude Code

v0.18.0 is released with its Python 3.15 image, so drop the
first-release entry for Python 3.15 and the skip logic that only
it used; the 3.15 job now scans 0.18.0-py3.15 like the others.

Closes #540

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the scheduled scan workflow so Python 3.15 is treated like the other supported versions and scans elixircloud/foca:0.18.0-py3.15 now that v0.18.0 has been released; the change is limited to CI workflow cleanup and does not alter secrets, permissions, or release behavior.

Flow diagram for scheduled Python image scanning

flowchart TD
    A[Scheduled scan workflow] --> B[Build matrix for Python 3.11 through 3.15]
    B --> C[Resolve latest release tag]
    C --> D[Construct Docker image tag]
    D --> E[Scan image]
    E --> F[elixircloud/foca:0.18.0-py3.15]
Loading

File-Level Changes

Change Details Files
Enable scheduled vulnerability scanning for the released Python 3.15 image by removing its temporary pre-release skip configuration.
  • Remove the first-release matrix metadata for Python 3.15.
  • Delete the release-version comparison, notice, and skip-output logic.
  • Always run the scan step after the image reference is generated.
.github/workflows/scan.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#540 Remove the temporary first-release skip so scheduled scans treat the Python 3.15 image like the other versions. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1098fa6) to head (610ecc6).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #541   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           55        55           
  Lines         6667      6667           
=========================================
  Hits          6667      6667           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 27, 2026 02:31

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/scan.yml" line_range="77-83" />
<code_context>
-              [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n 1)" = "$2" ]
-          }
-          if [ -n "${FIRST_RELEASE}" ] \
-              && ! version_ge "${tag#v}" "${FIRST_RELEASE}"; then
-              message="No image scanned: ${tag} has no Python ${PY_VERSION} image (first in ${FIRST_RELEASE})"
-              echo "::notice title=No Python ${PY_VERSION} image yet::${message}"
-              echo "${message}" >> "${GITHUB_STEP_SUMMARY}"
-              echo "skip=true" >> "${GITHUB_OUTPUT}"
-              exit 0
-          fi
           # Scheduled runs have no event payload, so the repository name is
           # taken from `GITHUB_REPOSITORY` (`<owner>/<name>`)
</code_context>
<issue_to_address>
**Fork scans fail before Python 3.15 release**

When a fork uses the documented `DOCKERHUB_ORG` setup and its latest release predates its first Python 3.15 image, the image step now always constructs a Python 3.15 tag from the fork’s latest release, so Trivy fails to pull that tag when the fork has not published a Python 3.15 image. The scheduled scan then fails instead of skipping that variant.

Keep a release/image-availability check for Python 3.15, or otherwise skip that matrix entry when the fork has not published the image.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: .github/workflows/scan.yml:83


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/workflows/scan.yml Resolved
@uniqueg
uniqueg merged commit feaa834 into dev Oct 27, 2026
30 checks passed
@uniqueg
uniqueg deleted the ci/scan-python-3-15 branch October 27, 2026 02:35
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.

ci: scan the released Python 3.15 image

1 participant