Repository navigation
Conversation
The workflow installed its build and lint tools with version pins only. Transitive dependencies were not pinned at all: cmake-format pulls in cmakelang, which pulls in six, and both floated to the latest release on every run. Move the list into .github/workflows/requirements.txt with a SHA-256 hash for every release file, and install it with --require-hashes. Add --only-binary to keep pip from falling back to an sdist, whose setup.py would run during the build. nanobind==2.9 is written as its exact release, 2.9.0. No versions change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kwasd
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The smoke workflow installed its build and lint tools with version pins only:
The
==pins cover the six direct dependencies, but not their transitive ones.cmake-formatrequirescmakelang, which requiressix, and both resolved towhatever was newest on PyPI at the time of the run. A malicious release of either
would have executed in CI. The pinned direct versions hid that.
This also satisfies the OpenSSF Scorecard
Pinned-DependenciesfindingpipCommand not pinned by hashfor.github/workflows/smoke.yml:43.Changes
.github/workflows/requirements.txt: the six tools plus the twotransitive dependencies, each with a SHA-256 hash for every file of that
release. The header documents how to regenerate it.
pip install --require-hashes --only-binary :all: -r ....--require-hashesfails unless every requirement, including transitive ones, ispinned and hashed.
--only-binarystops pip from falling back to an sdist, whosesetup.pywould otherwise run during the build.No tool versions change.
nanobind==2.9is written as its exact release,2.9.0.Testing
Installed into a clean venv, which reports the intended versions:
Checked that it fails closed: corrupting every hash of one entry aborts the
install with
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILEand exit status 1.
Every file pip selects is
py3-none-any,py2.py3-none-anyormanylinux_x86_64. None carries a CPython tag, so the file keeps working if therunner's Python version changes.
Notes for maintainers
gives both commands.
.github/dependabot.ymlcurrently watches pip only in/python, so it nevertracked this list. That is why
smoke.ymlstill pinnednanobind==2.9whilepython/pyproject.tomlhad moved to3.1.0. Adding a pip entry for/.github/workflowswould let Dependabot keep this file current. Left out ofthis PR to keep it focused.
scripts/create-venv.shcarries the same Scorecard finding. It is not hashpinnable, because it installs
torch-mlirdev wheels from a feed that moves.It is also not called by any workflow. Worth a separate look: it has no version
pins at all, and its
--extra-index-urlgives no index priority, so thehighest version across both indexes wins.
🤖 Generated with Claude Code