Skip to content

fix(ci): pin pip build dependency by hash for Scorecard compliance#361

Merged
rhuanbarreto merged 2 commits into
mainfrom
fix/pin-pip-build-hash
May 28, 2026
Merged

fix(ci): pin pip build dependency by hash for Scorecard compliance#361
rhuanbarreto merged 2 commits into
mainfrom
fix/pin-pip-build-hash

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Pin pip install build to build==1.5.0 with --require-hashes and SHA-256 hashes (wheel + sdist) in publish-shims.yml
  • Resolves code scanning alert #16 — Scorecard Pinned-Dependencies flagged the unpinned pip command as a medium-severity supply chain risk

Details

The publish-pypi job installs the Python build package to create the PyPI shim sdist/wheel. Previously this was pip install build with no version pin or hash verification, which Scorecard flagged as pipCommand not pinned by hash.

The fix adds:

  • Version pin: build==1.5.0
  • --require-hashes flag to enforce hash verification
  • Both the wheel (py3-none-any.whl) and source tarball (tar.gz) SHA-256 hashes, so pip verifies the download regardless of which format it resolves

Test plan

  • bun run validate passes (lint, typecheck, format, tests, ADR check, knip, build)
  • All 29 ADR rules pass, including CI-001 (pinned actions)
  • Verify next PyPI publish succeeds with the pinned dependency

Pin `pip install build` to version 1.5.0 with `--require-hashes` and
SHA-256 hashes for both the wheel and source tarball. This resolves
GitHub code scanning alert #16 (Scorecard Pinned-Dependencies) which
flagged the unpinned pip command as a medium-severity supply chain risk.

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 28, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: b1fb602
Status: ✅  Deploy successful!
Preview URL: https://c5b0227d.archgate-cli.pages.dev
Branch Preview URL: https://fix-pin-pip-build-hash.archgate-cli.pages.dev

View logs

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Metric Value
Lines 90.0% (6550 / 7278)
Threshold 90% minimum — met
Platforms Linux + Windows

Full HTML report available in workflow artifacts.

Per-directory breakdown
Directory Coverage Lines
src/commands/ 88.1% 2069 / 2348
src/engine/ 93.1% 1207 / 1297
src/formats/ 100.0% 141 / 141
src/helpers/ 89.7% 3133 / 3492

@rhuanbarreto rhuanbarreto merged commit 2282b1e into main May 28, 2026
23 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/pin-pip-build-hash branch May 28, 2026 21:14
@archgatebot archgatebot Bot mentioned this pull request May 28, 2026
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