Skip to content

ci: replace unverified remote curl install with corepack enable in package-manager-ci - #7141

Open
javier20dev25 wants to merge 1 commit into
fastify:mainfrom
javier20dev25:ci/harden-yarn-installation
Open

javier20dev25 wants to merge 1 commit into
fastify:mainfrom
javier20dev25:ci/harden-yarn-installation

Conversation

@javier20dev25

Copy link
Copy Markdown

Problem

During an automated security and CI/CD audit conducted with the Sentinel Security Ecosystem, an unpinned remote download script was flagged in .github/workflows/package-manager-ci.yml:

- name: Install with yarn
  run: |
    curl -o- -L https://yarnpkg.com/install.sh | bash
    yarn install --ignore-engines --ignore-scripts

Piping an unpinned, remote shell script (curl ... | bash) directly into a runner's shell introduces a supply-chain risk if DNS records or upstream CDNs encounter transient hijacking or compromise.

Solution

Since the matrix runs on official Node.js releases (Node 24, 26), modern Node distributions include corepack natively. Replacing the unverified curl ... | bash command with corepack enable securely prepares yarn without making arbitrary, unverified network shell invocations.

Observation on Future Attack Vectors (Low Severity Pattern)

Sentinel flags unpinned network fetches in CI runners as low-severity latent vectors: in zero-trust enterprise pipelines, untracked external fetch execution bypasses lockfile integrity and runner immutability guarantees.


Identified and submitted using the Sentinel Security Ecosystem.

@github-actions github-actions Bot added the github actions Github actions related label Oct 22, 2026
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.

1 participant