From f800fd0904ed17277ec8d65fec00cd55191010cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignas=20Vy=C5=A1niauskas?= Date: Fri, 24 Apr 2026 14:55:08 +0300 Subject: [PATCH] Pin down GHA to SHA references to prevent compromise --- .github/workflows/release.yml | 20 ++++++++++---------- .github/workflows/test.yml | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e445edd..ea8ee58 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,20 +14,20 @@ jobs: build-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: fetch-depth: 0 - run: git fetch --tags --force origin ${{ github.ref }} - run: git checkout ${{ github.ref }} - run: git describe --always HEAD - - uses: cachix/install-nix-action@v31 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: DeterminateSystems/magic-nix-cache-action@v11 + - uses: DeterminateSystems/magic-nix-cache-action@def9f5a5c6a6b8751c0534e8813a5d0ad2635660 # v11 - run: nix develop --command make crossbuild_mac - run: nix develop --command make crossbuild_mac_bundles - name: 'Upload Artifacts' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 id: upload with: name: binaries-macos @@ -36,20 +36,20 @@ jobs: build-others: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: fetch-depth: 0 - run: git fetch --tags --force origin ${{ github.ref }} - run: git checkout ${{ github.ref }} - run: git describe --always HEAD - - uses: cachix/install-nix-action@v31 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: DeterminateSystems/magic-nix-cache-action@v11 + - uses: DeterminateSystems/magic-nix-cache-action@def9f5a5c6a6b8751c0534e8813a5d0ad2635660 # v11 - run: nix develop --command make crossbuild - name: 'Upload Artifacts' id: upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: binaries-others path: bin/* @@ -59,11 +59,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: fetch-depth: 0 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: pattern: binaries-* path: artifacts/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c4e342..78ccaef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,11 +8,11 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v31 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: DeterminateSystems/magic-nix-cache-action@v11 + - uses: DeterminateSystems/magic-nix-cache-action@def9f5a5c6a6b8751c0534e8813a5d0ad2635660 # v11 - run: nix develop --command gofmt -d . && test -z "$(nix develop --command gofmt -l .)" - run: nix develop --command make build - run: nix develop --command make test @@ -20,21 +20,21 @@ jobs: crossbuild-linux-and-win: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v31 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: DeterminateSystems/magic-nix-cache-action@v11 + - uses: DeterminateSystems/magic-nix-cache-action@def9f5a5c6a6b8751c0534e8813a5d0ad2635660 # v11 - run: nix develop --command make crossbuild test-and-crossbuild-mac: runs-on: macos-latest steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v31 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: DeterminateSystems/magic-nix-cache-action@v11 + - uses: DeterminateSystems/magic-nix-cache-action@def9f5a5c6a6b8751c0534e8813a5d0ad2635660 # v11 - run: nix develop --command make build - run: nix develop --command make test - run: nix develop --command make crossbuild_mac