Skip to content

Commit f55da1f

Browse files
committed
GitHub Actions: Reduce permissions to guard against malicious 3rd party actions
1 parent 93c082c commit f55da1f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
matrix:
3636
os: [ubuntu-latest, windows-latest, macos-latest]
3737
runs-on: ${{ matrix.os }}
38+
permissions:
39+
contents: read
3840
steps:
3941
- name: Setup PostgreSQL
4042
uses: ikalnytskyi/action-setup-postgres@v4
@@ -152,6 +154,8 @@ jobs:
152154
matrix:
153155
os: [ubuntu-latest, windows-latest, macos-latest]
154156
runs-on: ${{ matrix.os }}
157+
permissions:
158+
contents: read
155159
steps:
156160
- name: Git checkout
157161
uses: actions/checkout@v3
@@ -201,6 +205,8 @@ jobs:
201205
matrix:
202206
os: [ubuntu-latest, windows-latest, macos-latest]
203207
runs-on: ${{ matrix.os }}
208+
permissions:
209+
contents: read
204210
steps:
205211
- name: Git checkout
206212
uses: actions/checkout@v3

0 commit comments

Comments
 (0)