Skip to content

Commit 1538864

Browse files
committed
Set permissions on GitHub workflows
1 parent 0730038 commit 1538864

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: ["main"]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build:
1114
strategy:

.github/workflows/code-coverage.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Code Coverage
33
on:
44
workflow_call:
55

6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
610
jobs:
711
publish-coverage:
812
runs-on: ubuntu-latest

.github/workflows/markdown-link-check.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
name: Check Markdown links
22

33
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
811

912
jobs:
1013
markdown-link-check:

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040

4141
runs-on: ${{ matrix.os }}
4242

43+
permissions:
44+
contents: read
45+
4346
steps:
4447
- name: Clone the repo
4548
uses: actions/checkout@v4
@@ -64,6 +67,9 @@ jobs:
6467
env:
6568
version_suffix_args: ${{ github.event_name != 'release' && format('--version-suffix "{0}"', inputs.version_suffix_override || format('ci.{0}', github.run_number)) || '' }}
6669

70+
permissions:
71+
contents: read
72+
6773
steps:
6874
- uses: actions/checkout@v4
6975

@@ -89,7 +95,13 @@ jobs:
8995

9096
publish-package:
9197
needs: build-package
98+
9299
runs-on: ubuntu-latest
100+
101+
permissions:
102+
contents: read
103+
packages: write
104+
93105
steps:
94106
- uses: actions/checkout@v4
95107

0 commit comments

Comments
 (0)