Skip to content

ci: pin the library to commit SHAs - #20

Merged
hieronx merged 4 commits into
mainfrom
chore/pin-and-protect-lib
Nov 4, 2026
Merged

hieronx merged 4 commits into
mainfrom
chore/pin-and-protect-lib

Conversation

@hieronx

@hieronx hieronx commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Consumers and this library's own composite refs pointed at @main, so any push to main reached every consumer's next run with their secrets. This PR makes the pin explicit and enforced.

  • Internal composite refs and the Lighthouse config checkout now name a full commit SHA (ea07231, current main), marked # lib-pin. Inside the library the SHA is an earlier commit, so the new action versions below reach the library's own composites only after a follow-up bump.
  • lib-ci gains a step that parses every workflow and action as YAML and fails any first-party uses: or lib checkout whose ref is not a full 40-hex SHA. pinact can't validate the marker, so .pinact.yaml skips first-party refs by name. PyYAML is installed hash-pinned.
  • checkout, setup-node and pnpm/action-setup move to the versions the app repos run (v7.0.1, v7.0.0, v5.0.0; the pnpm pin is the commit, not the tag object). @lhci/cli and yamllint were unpinned; now 0.15.1 and 1.35.1.
  • CODEOWNERS covers README.md, lighthouserc.json and a new dependabot.yml explicitly. Dependabot bumps third-party action SHAs monthly and ignores first-party refs.

Internal composite refs and the Lighthouse config checkout pointed at @main,
so any push to main reached every consumer's next run. They now name a full
commit SHA and lib-ci rejects any other form. Also pins lhci and yamllint,
moves checkout/setup-node/pnpm-setup to the versions the apps already run,
adds an opt-in provenance attestation to build-app, and extends CODEOWNERS
to the remaining shared files and a new dependabot config.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hieronx
hieronx requested a review from gpmayorga as a code owner November 4, 2026 08:13
hieronx and others added 2 commits November 4, 2026 09:19
b307475 was the annotated tag object for v5.0.0, not a commit; use the commit
fc06bc1. The lib-ci first-party check now parses the YAML instead of grepping,
so it also covers lib-ci.yml and any spacing or quoting of the repository key.
Attest before the release upload so an unsupported repo fails before anything
is published.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No consumer can use artifact attestations (private repos on a Team plan), so
the input and step were untestable dead code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hieronx hieronx changed the title ci: pin the library to commit SHAs and add provenance option ci: pin the library to commit SHAs Nov 4, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hieronx
hieronx merged commit 939a2c2 into main Nov 4, 2026
@hieronx
hieronx deleted the chore/pin-and-protect-lib branch November 4, 2026 08:25
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