Skip to content

Commit 414186c

Browse files
committed
Use minimum required permissions for GitHub workflows
This reduces the attack surface if the workflows are ever compromised.
1 parent 5219a70 commit 414186c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- master
1111
pull_request:
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
build-and-test:
1518
runs-on: ubuntu-latest

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
permissions:
9+
# The generated docs are written to the `gh-pages` branch.
10+
contents: write
11+
812
jobs:
913
build-and-deploy-docs:
1014
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)