PyCQA/bandit-action on Ubuntu 26.04: "The version '3.8' with architecture 'x64' was not found"
ubuntu-latest is moving from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (what else changes). actions/setup-python has builds for 26.04 only from Python 3.10 (versions-manifest.json). The Bandit action from PyCQA sets up a Python of its own: the v1 tag, which its README tells you to use, still points to v1.0.0 (June 2024) and asks for 3.8, and v1.0.1 asks for 3.9. Neither has an input to change it, so the job fails before Bandit is installed.
What it looks like
Version 3.8 was not found in the local cache ##[error]The version '3.8' with architecture 'x64' was not found for Ubuntu 26.04. The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
It appears under the action's step, from the actions/setup-python@v5 step inside it, even if your workflow has no setup-python step. With @v1.0.1 the version in the message is 3.9.
Where the reports came from
- A project's Bandit check on
PyCQA/bandit-action@v1failed in 7 seconds with the 3.8 message, and its last 10 runs on every branch failed the same way (lightspeed-stack #3141). - The report on the action itself is for v1.0.1 and 3.9 (bandit-action #48). A pull request that changes the default to 3.13 is open (#49); it names another project that moved its Bandit job to
ubuntu-24.04to get past it.
Fix: run Bandit in your own steps
These are the action's own steps, with a Python that 26.04 has:
jobs:
bandit:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- run: pip install 'bandit[sarif,toml]'
- run: bandit -r . -f sarif -o results.sarif || true
- uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
Like the action, this ignores Bandit's exit code and sends the findings to code scanning, so they do not fail the job. Add the options you gave the action as inputs to the bandit line, such as -c, -s, -x or --severity-level. Bandit 1.9.4, the current release, needs Python 3.10 or later, so an old Python also gets an old Bandit.
Or keep the action, at a commit that has the input
- uses: PyCQA/bandit-action@7925d472505a4ec09ef471b22fe99c26fee47443 # main, October 27, 2026
with:
python-version: '3.13'
The python-version input was added on main in September 2025, after v1.0.1, and is not in a release yet. Its default there is still 3.9, so set it. On @v1 or @v1.0.1 the same input only gives a warning ("Unexpected input(s)"), and the action still asks for 3.8 or 3.9.
Or pin the runner
runs-on: ubuntu-24.04 for the Bandit job: setup-python has 3.8 and 3.9 builds for 24.04, so the action works there unchanged, until GitHub retires that image.
Telling it apart
- The same message from a setup-python step of your own is the general case: setup-python's "was not found".
- The action got past setup-python and Bandit reports findings, but the job is green: that is how the action works, since it ignores Bandit's exit code. The findings are in code scanning.
- Look at "Set up job": the Runner Image group shows the image. Until November 19 a re-run can land on 24.04 and pass, so a green re-run proves nothing.
Other 26.04 failures
- BPF on syscalls:sys_enter_* on GitHub's Ubuntu runners: kernel 7.0.0-1017-azure, on the 24.04 and 26.04 images, runs these programs on one CPU only, so eBPF tests lose events without an error;
ubuntu-22.04is not affected. - wg-quick "Permission denied" on Ubuntu 26.04: new AppArmor profiles let
wg-quickandwgread configuration and key files only under/etc/wireguard/, so awg0.confin the workspace fails even withsudo. - setup-swift on Ubuntu 26.04:
swift-actions/setup-swiftv2 stops with "Version "26.04" of Ubuntu is not supported", and swift.org has 26.04 builds only from Swift 6.4.0; use the image's Swift 6.4.1 or theswiftcontainer. - setup-ruby's "Unavailable version" on Ubuntu 26.04: only some patch releases of each Ruby series are built for 26.04, so a pinned 3.4.2 in
.ruby-versionstops at the Ruby step. - apt on Ubuntu 26.04: renamed and removed packages.
- "coreutils: unknown program": most core tools are uutils.
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GitHub and GitHub Actions are trademarks of GitHub, Inc.; Ubuntu is a trademark of Canonical Ltd.; Python is a registered trademark of the Python Software Foundation; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Canonical, the Python Software Foundation, PyCQA or JetBrains.
More: "The ubuntu-latest label will migrate to Ubuntu 26" · setup-python's "was not found" · GitHub Actions plugins for IntelliJ IDEA compared · 日本語