Skip to content

Commit f9f2fdf

Browse files
rohankmr414claude
andcommitted
ci: pin GitHub Actions to commit SHAs for supply chain security
Replace mutable tag references with immutable commit SHAs across workflow files. Original tags are preserved as inline comments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fb83196 commit f9f2fdf

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
20-
- uses: actions/setup-go@v5
19+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
20+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
2121
with:
2222
go-version-file: ./go.mod
2323
- name: Install dependencies
@@ -29,7 +29,7 @@ jobs:
2929
- name: Vet
3030
run: go vet ./...
3131
- name: Lint
32-
uses: golangci/golangci-lint-action@v8
32+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
3333
with:
3434
version: latest
3535
only-new-issues: true

.github/workflows/release.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
needs: [tests]
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
18-
- uses: actions/setup-go@v5
17+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
18+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
1919
with:
2020
go-version-file: ./go.mod
2121
- name: build the CLI
@@ -25,13 +25,13 @@ jobs:
2525
.github/scripts/plugin-manifest.sh
2626
mv _output/* release
2727
28-
- uses: actions/upload-artifact@v4
28+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
2929
with:
3030
path: release/manifest.yaml
3131
if-no-files-found: error
3232
name: plugin-manifest
3333

34-
- uses: actions/upload-artifact@v4
34+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
3535
with:
3636
path: release/hasura-ndc-go-*
3737
if-no-files-found: error
@@ -44,9 +44,9 @@ jobs:
4444
runs-on: ubuntu-latest
4545
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
4646
steps:
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4848

49-
- uses: actions/download-artifact@v4
49+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
5050
with:
5151
path: release/artifacts
5252
merge-multiple: true
@@ -63,7 +63,7 @@ jobs:
6363
${ROOT}/release/artifacts/hasura-ndc-go-linux-amd64 new -n ndc_go -m hasura-ndc.dev/ndc-go -o /tmp/release/connector-definition
6464
tar -czvf "${ROOT}/release/artifacts/connector-definition.tgz" --directory "/tmp/release/connector-definition/" .
6565
66-
- uses: actions/upload-artifact@v4
66+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
6767
with:
6868
name: connector-definition.tgz
6969
path: ./release/artifacts/connector-definition.tgz
@@ -76,7 +76,7 @@ jobs:
7676
shell: bash
7777

7878
- name: create a draft release
79-
uses: ncipollo/release-action@v1
79+
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
8080
with:
8181
draft: true
8282
tag: v${{ steps.get-version.outputs.tagged_version }}

.github/workflows/test.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
pull-requests: write
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
25-
- uses: actions/setup-go@v5
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
25+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
2626
with:
2727
go-version-file: ./go.mod
2828
- name: Install dependencies
@@ -61,7 +61,7 @@ jobs:
6161
go install github.com/boumenot/gocover-cobertura
6262
gocover-cobertura < ./coverage/profile > coverage.xml
6363
- name: Code Coverage Summary Report
64-
uses: irongut/CodeCoverageSummary@v1.3.0
64+
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
6565
if: ${{ github.event_name == 'pull_request' }}
6666
with:
6767
filename: coverage.xml
@@ -74,10 +74,10 @@ jobs:
7474
output: both
7575
thresholds: "40 70"
7676
- name: Add Coverage PR Comment
77-
uses: marocchino/sticky-pull-request-comment@v2
77+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
7878
if: ${{ github.event_name == 'pull_request' }}
7979
with:
8080
path: code-coverage-results.md
8181
- name: Dump docker logs on failure
8282
if: failure()
83-
uses: jwalton/gh-docker-logs@v2
83+
uses: jwalton/gh-docker-logs@eb53a99ccbbb34d4243439c2c3dac3ed78a926ed # v2

0 commit comments

Comments
 (0)