Skip to content

Commit e2604b2

Browse files
Pin GitHub Actions to release commit SHAs
Security best practice: pin actions to full commit SHAs instead of mutable tags to prevent supply chain attacks. Pinned versions: - actions/checkout@v4.2.2 (11bd719) - actions/setup-go@v5.5.0 (d35c59a) - golangci/golangci-lint-action@v6.5.0 (4afd733) - goreleaser/goreleaser-action@v6.3.0 (9c156ee) - docker/login-action@v3.4.0 (74a5d14) - docker/metadata-action@v5.7.0 (902fa8e) - docker/build-push-action@v6.18.0 (2634353)
1 parent a3216ef commit e2604b2

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1414

1515
- name: Set up Go
16-
uses: actions/setup-go@v5
16+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
1717
with:
1818
go-version: '1.24'
1919

@@ -29,14 +29,14 @@ jobs:
2929
lint:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333

3434
- name: Set up Go
35-
uses: actions/setup-go@v5
35+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3636
with:
3737
go-version: '1.24'
3838

3939
- name: golangci-lint
40-
uses: golangci/golangci-lint-action@v6
40+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v6.5.0
4141
with:
4242
version: latest

.github/workflows/docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ jobs:
1818
packages: write
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2222

2323
- name: Log in to Container Registry
24-
uses: docker/login-action@v3
24+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
2525
with:
2626
registry: ${{ env.REGISTRY }}
2727
username: ${{ github.actor }}
2828
password: ${{ secrets.GITHUB_TOKEN }}
2929

3030
- name: Extract metadata
3131
id: meta
32-
uses: docker/metadata-action@v5
32+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
3333
with:
3434
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3535
tags: |
@@ -39,7 +39,7 @@ jobs:
3939
type=sha
4040
4141
- name: Build and push
42-
uses: docker/build-push-action@v5
42+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
4343
with:
4444
context: .
4545
push: true

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
release:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
with:
2828
fetch-depth: 0
2929

3030
- name: Set up Go
31-
uses: actions/setup-go@v5
31+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3232
with:
3333
go-version: '1.24'
3434

@@ -42,7 +42,7 @@ jobs:
4242
4343
- name: Run GoReleaser
4444
if: ${{ !inputs.dry_run }}
45-
uses: goreleaser/goreleaser-action@v6
45+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
4646
with:
4747
distribution: goreleaser
4848
version: '~> v2'
@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Run GoReleaser (dry run)
5454
if: ${{ inputs.dry_run }}
55-
uses: goreleaser/goreleaser-action@v6
55+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
5656
with:
5757
distribution: goreleaser
5858
version: '~> v2'

0 commit comments

Comments
 (0)