Python 3.9 is no longer in ubuntu-latest

Open Beginner friendly
#48 0 comments 3 reactions 0 assignees View on GitHub

@zachsplat is already working on this.

Since Nov 2, 2026.

  • #49 by @zachsplat — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, python
Domain
ci-cd

Research direction

The issue points to the action requesting Python 3.9 on ubuntu-latest; start by reading the action's metadata and the step that selects the Python version, then compare it with the versions manifest linked in the report. Reproduce with a workflow that runs this action on ubuntu-latest, update the version to one available there, and check that the Bandit job completes. Done means the action no longer fails with the 3.9 not-found error on ubuntu-latest while remaining usable on supported runners.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
The latest version of this action (1.0.1) tries to use Python 3.9, but the ubuntu-latest does not include Python 3.9. GitHub Actions is switching to Ubuntu 26.04, which no longer includes Python 3.9.

To Reproduce
Steps to reproduce the behavior:

  1. Create a GitHub Actions job that runs two steps: actions/checkout followed by PyCQA/bandit-action.

Problem behavior
The job fails with the following error:

Error: The version '3.9' with architecture 'x64' was not found for Ubuntu 26.04.

Additional context
actions/runner-images#14748 talks about the change of ubuntu-latest to point to Ubuntu 26.04. The rollout began last week, and will finish in November.

For a list of what Python versions are on what Ubuntu versions, check out the file at https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json: To get a list of versions, pipe the file through to jq .[].version. Piping it through to jq '.[] | select(.version == "3.9.25")' reveals that 3.9.25 is only available on Ubuntu releases 24.04 and 22.04.

#27 has also mentioned about the deprecated Python 3.9, so it's possible this Issue could be called a duplicate.

As a workaround, folks using this action can change their "Bandit Analyze" job to use the ubuntu-24.04 runner. At least, that worked for me!

Dominant language
No language data
Stars
32
Forks
16
Avg merge
2h 23m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PyCQA/bandit-action

All issues in PyCQA/bandit-action

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.