Skip to content

Commit 77d4126

Browse files
Merge pull request #228 from nikobockerman/ci-set-workflow-permissions
ci: Set explicit permissions to workflows
2 parents 9de3031 + 23a8333 commit 77d4126

11 files changed

+22
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Check - Enforce all checks pass
22
on:
33
pull_request:
4+
permissions:
5+
checks: read
46

57
jobs:
68
wf:
79
uses: nikobockerman/github-workflows/.github/workflows/check-enforce-all-checks.yaml@c40fd048af4cc60e443fb5e0741812d69716d6a6
8-
permissions:
9-
checks: read

.github/workflows/check-github-actions.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- "package.json"
88
- "yarn.lock"
99
workflow_dispatch:
10+
permissions:
11+
contents: read
1012

1113
jobs:
1214
wf:

.github/workflows/check-mypy.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Check - mypy
2-
32
on:
43
pull_request:
54
paths:
@@ -11,6 +10,8 @@ on:
1110
- "uv.lock"
1211
workflow_call:
1312
workflow_dispatch:
13+
permissions:
14+
contents: read
1415

1516
jobs:
1617
mypy:

.github/workflows/check-prettier.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Check - prettier
2-
32
on:
43
pull_request:
54
paths-ignore:
65
- "**.py"
76
- "**/py.typed"
87
workflow_dispatch:
8+
permissions:
9+
contents: read
910

1011
jobs:
1112
wf:

.github/workflows/check-pyright.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Check - pyright
2-
32
on:
43
pull_request:
54
paths:
@@ -13,6 +12,8 @@ on:
1312
- "yarn.lock"
1413
workflow_call:
1514
workflow_dispatch:
15+
permissions:
16+
contents: read
1617

1718
jobs:
1819
pyright:

.github/workflows/check-renovate-config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- ".github/renovate.json5"
66
- ".github/workflows/check-renovate-config.yaml"
77
workflow_dispatch:
8+
permissions:
9+
contents: read
810

911
jobs:
1012
wf:

.github/workflows/check-ruff.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Check - ruff
2-
32
on:
43
pull_request:
54
paths:
@@ -11,6 +10,8 @@ on:
1110
- "uv.lock"
1211
workflow_call:
1312
workflow_dispatch:
13+
permissions:
14+
contents: read
1415

1516
jobs:
1617
ruff:

.github/workflows/check-yarn.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: Check - Yarn and dependencies
2-
32
on:
43
pull_request:
54
paths:
65
- ".github/workflows/check-yarn.yaml"
76
- "package.json"
87
- "yarn.lock"
98
workflow_dispatch:
9+
permissions:
10+
contents: read
1011

1112
jobs:
1213
wf:

.github/workflows/ci.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
@@ -11,6 +10,8 @@ on:
1110
# Run every Monday at 00:30 UTC
1211
- cron: "30 0 * * 1"
1312
workflow_dispatch:
13+
permissions:
14+
contents: read
1415

1516
jobs:
1617
check-github-actions:

.github/workflows/run-all.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Run - all
2-
32
on:
43
pull_request:
54
paths:
@@ -11,6 +10,8 @@ on:
1110
- "uv.lock"
1211
workflow_call:
1312
workflow_dispatch:
13+
permissions:
14+
contents: read
1415

1516
jobs:
1617
run-all:

.github/workflows/test-pytest.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Check - pytest
2-
32
on:
43
pull_request:
54
paths:
@@ -10,6 +9,8 @@ on:
109
- "uv.lock"
1110
workflow_call:
1211
workflow_dispatch:
12+
permissions:
13+
contents: read
1314

1415
jobs:
1516
pytest:

0 commit comments

Comments
 (0)