Skip to content

Commit 3059922

Browse files
authored
GitHub actions: workflow hardening (#290)
Signed-off-by: Marco Pracucci <[email protected]>
1 parent e3ec67f commit 3059922

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/validate_pr.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
11
name: Validate PR
2+
23
on:
34
pull_request:
45
paths-ignore:
56
- 'docs/**'
67
- '*.md'
8+
9+
permissions:
10+
contents: read
11+
712
jobs:
813
lint:
914
name: Lint
1015
runs-on: ubuntu-latest
1116
steps:
1217
- uses: actions/checkout@v3
18+
with:
19+
persist-credentials: false
1320
- uses: actions/setup-go@v4
1421
with:
1522
go-version: '1.21'
1623
cache: false
1724
- name: golangci-lint
18-
uses: golangci/[email protected]
25+
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
1926
with:
2027
version: v1.54.2
2128
unit_tests:
2229
name: Unit-Tests
2330
runs-on: ubuntu-latest
2431
steps:
2532
- uses: actions/checkout@v3
33+
with:
34+
persist-credentials: false
2635
- name: Set up Go 1.21
2736
uses: actions/setup-go@v4
2837
with:
@@ -34,6 +43,8 @@ jobs:
3443
runs-on: ubuntu-latest
3544
steps:
3645
- uses: actions/checkout@v3
46+
with:
47+
persist-credentials: false
3748
- name: Set up Go 1.21
3849
uses: actions/setup-go@v4
3950
with:

0 commit comments

Comments
 (0)