Skip to content

Commit 36d7ccb

Browse files
committed
ci: Use least privilege principle for permissions
Declares only the required permissions per workflow.
1 parent 0c7aefd commit 36d7ccb

File tree

6 files changed

+20
-0
lines changed

6 files changed

+20
-0
lines changed

.github/workflows/ci.yml

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

10+
# No permissions are required for this workflow
11+
permissions: {}
12+
1013
jobs:
1114
test:
1215
name: General checks, tests and coverage reporting

.github/workflows/commitlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
1115
jobs:
1216
commitlint:
1317
runs-on: ubuntu-latest

.github/workflows/e2e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- main
1010
workflow_dispatch:
1111

12+
# No permissions are required for this workflow
13+
permissions: {}
14+
1215
jobs:
1316
e2e:
1417
runs-on: ubuntu-24.04

.github/workflows/issues.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
schedule:
44
- cron: '00 20 * * *'
55

6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
610
jobs:
711
stale:
812
name: Flag and close stale issues

.github/workflows/reuse-compliance.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- main
1010

11+
# No permissions are required for this workflow
12+
permissions: {}
13+
1114
jobs:
1215
compliance-check:
1316
name: Compliance Check

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- main
1010

11+
# No permissions are required for this workflow
12+
permissions: {}
13+
1114
jobs:
1215
test:
1316
name: Unit and Integration

0 commit comments

Comments
 (0)