Skip to content

Commit 8f9eb16

Browse files
committed
feat(ci): fix CodeQL findings
1 parent 4562c4e commit 8f9eb16

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/go.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ on:
88

99
jobs:
1010
build:
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
1115
runs-on: ubuntu-latest
1216
strategy:
1317
matrix:
1418
go: ["1.22", "1.23"]
1519
steps:
1620
- name: Checkout
17-
uses: actions/checkout@v4
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1822

1923
- name: Set up Go ${{ matrix.go }}
20-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
2125
with:
2226
go-version: ${{ matrix.go }}
2327

@@ -31,19 +35,19 @@ jobs:
3135
runs-on: ubuntu-latest
3236
steps:
3337
- name: Set up Go 1.22
34-
uses: actions/setup-go@v5
38+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
3539
with:
3640
go-version: "1.22"
3741

3842
- name: Checkout
39-
uses: actions/checkout@v4
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4044

4145
- name: Generate coverage report
4246
run: |
4347
go test ./... -coverprofile=coverage.txt -covermode=atomic
4448
4549
- name: Upload coverage report
46-
uses: codecov/codecov-action@v4
50+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
4751
env:
4852
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4953
with:

0 commit comments

Comments
 (0)