Skip to content

Commit 19f41d4

Browse files
committed
Fixes github "workflow does not contain permissions" check.
The workflow should only be allowed to read from the repository.
1 parent 5220e72 commit 19f41d4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/c-cpp.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
build-amd64:
1111
name: Build and run tests on Linux amd64
1212
runs-on: ubuntu-22.04
13-
13+
permissions:
14+
contents: read
15+
pull-requests: read
1416
steps:
1517
- uses: actions/checkout@v4
1618
with:
@@ -35,6 +37,9 @@ jobs:
3537
build-macos-M1:
3638
name: Build and run tests on MacOS M1 (ARM64)
3739
runs-on: macos-14
40+
permissions:
41+
contents: read
42+
pull-requests: read
3843
steps:
3944
- uses: actions/checkout@v4
4045
with:
@@ -56,6 +61,9 @@ jobs:
5661
build-windows:
5762
name: Build and run tests on Windows
5863
runs-on: windows-2019
64+
permissions:
65+
contents: read
66+
pull-requests: read
5967
steps:
6068
- uses: actions/checkout@v4
6169
with:

0 commit comments

Comments
 (0)