Skip to content

chore(security): pin the remaining in-workflow package installs (Scorecard Pinned-Dependencies) - #521

Merged
ffroliva merged 2 commits into
developfrom
chore/scorecard-pinned-deps
Aug 14, 2026
Merged

ffroliva merged 2 commits into
developfrom
chore/scorecard-pinned-deps

Conversation

@ffroliva

Copy link
Copy Markdown
Owner

Summary

Closes the three open Scorecard Pinned-Dependencies code-scanning alerts (the exact three: pages.yml:35 pip, Dockerfile.triage:22 npm, Dockerfile.triage:1 base image):

  • pages.yml — MkDocs Material now installs via pip install --require-hashes -r website/requirements.txt, compiled with uv pip compile --universal --generate-hashes --python-version 3.12 from website/requirements.in (platform-independent artifact, 29 fully hash-pinned entries).
  • Dockerfile.triage — base image pinned to the exact digest Scorecard's remediation prescribes (node:20-slim@sha256:2cf067…); the floating npm install -g @anthropic-ai/claude-code is replaced by npm ci --omit=dev from a committed package.json + package-lock.json (lockfileVersion 3, all entries registry.npmjs.org with sha512 integrity) + a /usr/local/bin/claude symlink.
  • ci.yml — the deps-audit gate pins pip-audit==2.10.1 (uvx has no dependabot ecosystem; bump by hand). The non-gating weekly deps-watch job deliberately keeps a floating pip-audit — fresh advisory tooling is its purpose (commented in-file).
  • dependabot.yml — three new entries keep the pins fresh: uv for /website (NOT pip, which would regenerate the file in pip-compile format and clobber the uv header — same pip-vs-uv class the root entry documents), npm + docker for /scripts/autopilot (dependabot-core's docker fetcher regex /dockerfile|containerfile/i is unanchored — Dockerfile.triage matches, verified from source).

Companion repo-state change (already done, no code): Scorecard alerts #6 SAST / #7 Fuzzing / #9 CIIBestPractices dismissed won't-fix with recorded reasons; #8 CodeReview and #1 BranchProtection left open (owner-only toggles).

Verification

  • Scratch 3.12 venv: pip install --require-hashes exit 0 → mkdocs build green (both before and after the --universal recompile).
  • docker build of the triage image from the pinned digest succeeds end-to-end; containerized claude --version prints 2.1.232 (matches the lockfile pin).
  • check_repo_hygiene.py (748 files) + check_doc_links.py green; all three YAMLs parse.
  • Council review (branch mode): YELLOW → both should-fixes + nit applied in the second commit, re-verified.
  • Live-verify (Flow): N/A — deferred with reason: no Flow-facing surface in this diff (CI/workflow/container config only).

Test plan

  • CI green (including the pages workflow path is untouched until merge to develop; website/** trigger covers the new requirements files)
  • SonarCloud gate green (config-only diff)

🤖 Generated with Claude Code

Closes the three open Scorecard Pinned-Dependencies alerts:
- pages.yml installs MkDocs Material via pip install --require-hashes from
  a compiled website/requirements.txt (source: website/requirements.in).
- Dockerfile.triage pins node:20-slim by digest and installs the Claude
  Code CLI via npm ci from a committed lockfile instead of a floating
  npm install -g.
- ci.yml pins the pip-audit tool version for a reproducible audit gate.

New dependabot entries (pip /website, npm + docker /scripts/autopilot)
keep the pins fresh. Verified locally: hash-pinned install + mkdocs build
green in a scratch 3.12 venv; the triage image builds from the pinned
digest and the containerized claude --version runs.
- dependabot /website entry: pip -> uv ecosystem (pip would regenerate
  the file with pip-compile and clobber the uv header; uv recompiles
  .in -> .txt natively) — same pip-vs-uv class the root entry documents.
- website/requirements.txt recompiled with --universal so the artifact
  is platform-independent (colorama turns out to be unconditional via
  mkdocs-material, not a Windows leak).
- deps-watch.yml: one-line comment marking its pip-audit as deliberately
  floating (non-gating weekly watch wants fresh advisory tooling);
  CHANGELOG wording clarified to match.
@ffroliva
ffroliva merged commit e8557dc into develop Aug 14, 2026
14 checks passed
@ffroliva
ffroliva deleted the chore/scorecard-pinned-deps branch August 14, 2026 07:58
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