Skip to content

Commit 4fc55bc

Browse files
committed
ci: set workflow permissions
1 parent 944f4c3 commit 4fc55bc

5 files changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,8 @@ jobs:
3232
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
3333
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
3434
permissions:
35-
# required for all workflows
3635
security-events: write
3736

38-
# required to fetch internal or private CodeQL packs
39-
packages: read
40-
41-
# only required for workflows in private repositories
42-
actions: read
43-
contents: read
44-
4537
strategy:
4638
fail-fast: false
4739
matrix:

.github/workflows/on-push-main.yml

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

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
run-tests:
1114
uses: ./.github/workflows/tests.yml
@@ -14,6 +17,8 @@ jobs:
1417
needs: run-tests
1518
runs-on: ubuntu-latest
1619
name: Build and deploy docs to Github pages
20+
permissions:
21+
contents: write
1722
steps:
1823
- name: Checkout code
1924
uses: actions/checkout@v6

.github/workflows/on-push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
tags-ignore:
1010
- v*
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
run-tests:
1417
uses: ./.github/workflows/tests.yml

.github/workflows/stale.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
schedule:
55
- cron: "0 0 * * *"
66

7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
711
jobs:
812
stale:
913

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
# Workflow call is used for called from another workflow
55
workflow_call:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
pre-commit:
912
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)