Skip to content

Commit 63bcbee

Browse files
authored
chore: add job-level permissions to workflows (#1177)
1 parent 61b17a5 commit 63bcbee

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/build_test_publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: Build
22

3+
permissions: {}
4+
35
on:
46
push:
57
branches: [main]
68
pull_request:
79
branches: [main]
8-
9-
permissions:
10-
id-token: write
11-
contents: write
12-
1310
jobs:
1411
build_test_publish:
12+
permissions:
13+
id-token: write
14+
contents: write
1515
name: Build, test and publish
1616
runs-on: ubuntu-latest
1717
steps:

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#
1212
name: 'CodeQL Advanced'
1313

14+
permissions: {}
15+
1416
on:
1517
push:
1618
branches: ['main']

.github/workflows/force-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
name: Force Release
22

3-
permissions:
4-
contents: write
3+
permissions: {}
54

65
on:
76
workflow_dispatch:
87

98
jobs:
109
force-release:
10+
permissions:
11+
contents: write
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout repository

.github/workflows/git_mirror.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: Mirror to Codeberg and GitLab
22

3-
permissions:
4-
contents: read
3+
permissions: {}
54

65
on:
76
push:
87
branches: [main]
98

109
jobs:
1110
mirror:
11+
permissions:
12+
contents: read
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: ffflorian/actions/git-mirror@baf8fb2e65ebe6564870f56315a09bc01ab7e0f7

.github/workflows/yarn_update.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Check for yarn updates
22

3-
permissions:
4-
contents: write
5-
pull-requests: write
3+
permissions: {}
64

75
on:
86
schedule:
@@ -16,6 +14,9 @@ on:
1614

1715
jobs:
1816
yarn-update-check:
17+
permissions:
18+
contents: write
19+
pull-requests: write
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Update yarn

0 commit comments

Comments
 (0)