ci: install workflow tools from hash-pinned requirements#31
Merged
Conversation
`docs.yml` and `release.yml` installed mkdocs, mkdocs-material and build by version only. OpenSSF Scorecard flags both as PinnedDependenciesID (alerts #3, #8), and a version pin does not protect against a yanked and re-uploaded artifact. Both now install with `pip install --require-hashes`, from files compiled with `pip-compile --generate-hashes` against the Python each workflow runs (3.12 for docs, 3.14 for release). This mirrors the existing `.github/pre-commit/requirements.txt`, which Dependabot already keeps up to date, so the hashes stay maintained. Watchpoints for the two new directories are added to `dependabot.yml`. Verified in containers: `mkdocs build --strict` under UBI9/python-312 and `python -m build` under Fedora 44 (Python 3.14.6), both after a `--require-hashes` install.
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.
Resolves the two
PinnedDependenciesIDScorecard alerts (#3, #8).docs.ymlandrelease.ymlinstalledmkdocs,mkdocs-materialandbuildby version only. A version pin does not protect against a yanked and re-uploaded artifact, which is why Scorecard scorespipCommand not pinned by hashat 8/10.Both workflows now install with
pip install --require-hashes, from files compiled withpip-compile --generate-hashes --strip-extrasagainst the interpreter each workflow actually runs:.github/docs/requirements.txtdocs.yml.github/release/requirements.txtrelease.ymlThis mirrors the existing
.github/pre-commit/requirements.txt. Dependabot already maintains that hash-pinned file (see Linuxfabrik/monitoring-plugins#1094, Linuxfabrik/lfops#234), so the "--require-hashesblocks Dependabot" concern does not apply. Watchpoints for both new directories are added to.github/dependabot.yml.Verification
Both jobs were run end-to-end in containers after a
--require-hashesinstall:mkdocs build --strictunder UBI9/python-312 - exit 0python -m buildunder Fedora 44 (Python 3.14.6) - exit 0, produces sdist and wheelactionlintis clean on both workflows.