Skip to content

Commit 1f531b4

Browse files
committed
ci: restrict permissions of the github actions
Relate to #1154
1 parent c919bfc commit 1f531b4

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

Diff for: .github/workflows/dependencies-diff.yml

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- src/main/scripts/show-spring-boot-version-diff.sh
1212
- .github/workflows/dependencies-diff.yml
1313

14+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
15+
permissions:
16+
contents: read # for "git clone"
17+
1418
defaults:
1519
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
1620
run:

Diff for: .github/workflows/integration-tests.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
push:
55
pull_request:
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
# NOTE: actions/upload-artifact makes no use of permissions
10+
# See https://github.com/actions/upload-artifact/issues/197#issuecomment-832279436
11+
contents: read # for "git clone"
12+
713
defaults:
814
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
915
run:

Diff for: .github/workflows/static-analysis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
pull_request:
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
contents: read # for "git clone"
10+
711
defaults:
812
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
913
run:

Diff for: .github/workflows/unit-tests.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
pull_request:
66

7+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
8+
permissions:
9+
contents: read # for "git clone"
10+
711
defaults:
812
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
913
run:

0 commit comments

Comments
 (0)