Skip to content

ci: verify yarn installer checksum before executing - #7050

Open
javier20dev25 wants to merge 1 commit into
fastify:mainfrom
javier20dev25:ci/verify-yarn-installer-checksum
Open

javier20dev25 wants to merge 1 commit into
fastify:mainfrom
javier20dev25:ci/verify-yarn-installer-checksum

Conversation

@javier20dev25

Copy link
Copy Markdown

Description

The yarn job in package-manager-ci.yml (which runs on every push to main) executes remote code without any integrity check:

curl -o- -L https://yarnpkg.com/install.sh | bash

The URL is mutable and unpinned: whatever the endpoint serves at runtime is piped straight to a shell on the runner. Following GitHub's supply-chain hardening guidance, this pins the installer and verifies its SHA-256 checksum before execution, so CI only runs the exact installer that was reviewed at merge time.

No behavior change otherwise — the installer and the yarn steps run exactly as before. The hash will need bumping when the upstream installer changes (the one-liner prints a clear recognition failure then).

Verification

  • Current https://yarnpkg.com/install.sh checksum: 90798f6ad4c931e58afd7c6b8a2120bd5480022f298c4bb6a521755ccf297a42 (recomputed before this PR).
  • sha256sum -c --quiet fails closed: a modified installer aborts the job before anything runs.
  • Workflow-only change; no test impact.

Detected with Sentinel Cloud (Sentinel Security Intelligence). More about the tool on my profile: https://github.com/javier20dev25

@github-actions github-actions Bot added the github actions Github actions related label Sep 24, 2026
@Tony133
Tony133 requested a review from Fdawgs September 24, 2026 08:11
@Fdawgs
Fdawgs removed their request for review September 24, 2026 09:02
@Fdawgs

Fdawgs commented Sep 24, 2026

Copy link
Copy Markdown
Member

@Tony133

Tony133 commented Sep 24, 2026

Copy link
Copy Markdown
Member

@Tony133 You'll need to tag someone else for now. https://github.com/orgs/fastify/discussions/98 😸

Okay, I've read it—no problem. Thanks for the reply 😉👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Github actions related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants