Skip to content

chore(ci): hash-pin website build deps via require-hashes lock (Scorecard)#456

Merged
SoundMindsAI merged 1 commit into
mainfrom
chore/scorecard-pinned-deps-and-dismissals
Jun 5, 2026
Merged

chore(ci): hash-pin website build deps via require-hashes lock (Scorecard)#456
SoundMindsAI merged 1 commit into
mainfrom
chore/scorecard-pinned-deps-and-dismissals

Conversation

@SoundMindsAI

Copy link
Copy Markdown
Owner

What

Resolves the two code-fixable OSSF Scorecard Pinned-Dependencies mediums on the code-scanning page:

Alert Location Finding
#89 .github/workflows/build-guides-freshness.yml:68 pip install not pinned by hash
#73 .github/workflows/deploy-docs.yml:44 pip install not pinned by hash

Both workflows installed website/requirements.txt, which pins exact versions (==) but not by sha256 hash.

How

  • Added website/requirements.lock — a fully hash-pinned (sha256) lock compiled from the curated website/requirements.txt via uv pip compile --generate-hashes, covering the whole transitive tree.
  • Both workflows now run 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 header with the same regen command.

requirements.txt is hand-bumped — Dependabot's pip ecosystem only watches the repo root (uv.lock), not website/ — so there's no auto-update drift between the two files.

Verification

✅ Ran pip install --require-hashes -r website/requirements.lock in 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)

🤖 Generated with Claude Code

…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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SoundMindsAI SoundMindsAI merged commit bcae403 into main Jun 5, 2026
29 of 30 checks passed
@SoundMindsAI SoundMindsAI deleted the chore/scorecard-pinned-deps-and-dismissals branch June 5, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant