chore(ci): hash-pin website build deps via require-hashes lock (Scorecard)#456
Merged
Merged
Conversation
…card) Resolves two OSSF Scorecard Pinned-Dependencies findings (code-scanning #89, #73): the deploy-docs and build-guides-freshness workflows ran `pip install -r website/requirements.txt`, which pins exact versions but not by sha256 hash. - Add website/requirements.lock — a fully hash-pinned (sha256) lock compiled from the curated website/requirements.txt via `uv pip compile --generate-hashes`, covering the full transitive tree. - Both workflows now `pip install --require-hashes -r website/requirements.lock` (and key the pip cache on the lock). - website/requirements.txt stays the human-curated top-level source with a regenerate-the-lock pointer in its header; the lock carries a GENERATED / do-not-edit-by-hand header with the same regen command. requirements.txt is hand-bumped (Dependabot's pip ecosystem only watches the repo root, not website/), so there is no auto-update drift between the two files. Verified the require-hashes install succeeds in a clean venv and resolves mkdocs-material 9.7.6 / pymdown-extensions 10.21.3 / mkdocs-glightbox 0.5.2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: SoundMindsAI <eric.starr@soundminds.ai>
There was a problem hiding this comment.
Code Review
This pull request introduces a hash-pinned dependency lock file (website/requirements.lock) generated via uv to ensure reproducible and secure public-site builds. Additionally, it updates the comments in website/requirements.txt to document the lock file's purpose and provide instructions on how to regenerate it. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
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.
What
Resolves the two code-fixable OSSF Scorecard Pinned-Dependencies mediums on the code-scanning page:
.github/workflows/build-guides-freshness.yml:68pip installnot pinned by hash.github/workflows/deploy-docs.yml:44pip installnot pinned by hashBoth workflows installed
website/requirements.txt, which pins exact versions (==) but not by sha256 hash.How
website/requirements.lock— a fully hash-pinned (sha256) lock compiled from the curatedwebsite/requirements.txtviauv pip compile --generate-hashes, covering the whole transitive tree.pip install --require-hashes -r website/requirements.lockand key the pip cache on the lock.website/requirements.txtstays the human-curated top-level source (with a regenerate-the-lock pointer in its header); the lock carries a GENERATED / do-not-edit header with the same regen command.requirements.txtis hand-bumped — Dependabot'spipecosystem only watches the repo root (uv.lock), notwebsite/— so there's no auto-update drift between the two files.Verification
✅ Ran
pip install --require-hashes -r website/requirements.lockin a clean venv — succeeds and resolves mkdocs-material 9.7.6 / pymdown-extensions 10.21.3 / mkdocs-glightbox 0.5.2.Scope notes (other Scorecard mediums)
npm install -g pnpm@9not hash-pinned, ui/Dockerfile) — not fixed here. corepack was removed fromnode:26-bookworm-slim, and the slim base has nocurl/wget, so every "pin pnpm" workaround re-introduces an equal-or-worse unpinned install (npm install -g corepackorapt-get install curl). Dismissed as accepted-risk instead.🤖 Generated with Claude Code