From 2e022c2498863f7a9fe15596a5e85790b5edbda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Almeida?= Date: Sun, 3 May 2026 22:19:49 +0100 Subject: [PATCH] revert: keep curl install for git-cliff, add sha512 verification instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit (18b2a5c) replaced our `curl | tar` install with orhun/git-cliff-action@v4 under the banner "supply chain". On reflection that swap doesn't actually improve anything: - @v4 is a moving tag, not a digest pin — same trust as a tagged curl URL. - Both depend on trusting the same maintainer (orhun). - The action adds a third-party step we don't audit. The legitimate concern from the review was "no integrity verification on the downloaded tarball." Address that directly: pin the asset version, embed its published sha512, and abort if the download doesn't match. The hash for v2.6.1's x86_64-linux-gnu tarball came from https://github.com/orhun/git-cliff/releases/download/v2.6.1/.sha512. This restores the original setup with a real integrity check and one fewer external dependency. --- .github/workflows/release.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 275b454fac..e9bfd33f86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,23 @@ jobs: with: node-version: "24" + - name: Install git-cliff + env: + # Pinned to v2.6.1. To bump, also update the sha512 below — fetch the + # new one from: + # https://github.com/orhun/git-cliff/releases/download//.sha512 + CLIFF_VERSION: "2.6.1" + CLIFF_ASSET: "git-cliff-2.6.1-x86_64-unknown-linux-gnu.tar.gz" + CLIFF_SHA512: "b1e7a6b70fc794accdccd9717eff5a8bf8b507f0308da44d837d935be31b18b19db3758d1a9bb4975fbca7d01ddaae251229a753ae2cd2ecc24845cfc50d067f" + run: | + set -euo pipefail + curl -sSL "https://github.com/orhun/git-cliff/releases/download/v${CLIFF_VERSION}/${CLIFF_ASSET}" -o /tmp/git-cliff.tar.gz + echo "${CLIFF_SHA512} /tmp/git-cliff.tar.gz" | sha512sum -c - + tar -xz -C /tmp -f /tmp/git-cliff.tar.gz + sudo mv "/tmp/git-cliff-${CLIFF_VERSION}/git-cliff" /usr/local/bin/ + rm -rf /tmp/git-cliff.tar.gz "/tmp/git-cliff-${CLIFF_VERSION}" + git-cliff --version + - name: Configure git identity run: | git config user.email "release-bot@kandev" @@ -148,12 +165,9 @@ jobs: pnpm -C apps install --no-frozen-lockfile - name: Generate CHANGELOG - uses: orhun/git-cliff-action@v4 - with: - config: cliff.toml - args: --tag ${{ steps.compute.outputs.tag }} env: - OUTPUT: CHANGELOG.md + TAG: ${{ steps.compute.outputs.tag }} + run: git-cliff --tag "$TAG" -o CHANGELOG.md - name: Create release PR + merge + tag (or dry-run) if: ${{ !inputs.dry_run }}