Skip to content

Commit eaba3b8

Browse files
committed
ci: use fine-grained job-token permissions
Not much changes, but splitting the global workflow permissions from the job permissions is best practice. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
1 parent 3bda239 commit eaba3b8

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
# Sets permissions of the GITHUB_TOKEN to checkout the repository
1212
permissions:
1313
contents: read
14-
id-token: write
15-
attestations: write
1614

1715
env:
1816
WEB_EXT_VERS: 8.2.0
@@ -42,6 +40,9 @@ jobs:
4240
4341
build-xpi:
4442
runs-on: ubuntu-latest
43+
permissions:
44+
id-token: write
45+
attestations: write
4546
steps:
4647
- name: checkout repository
4748
uses: actions/checkout@v4

.github/workflows/deploy-update-manifest.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ on:
1111

1212
permissions:
1313
contents: read
14-
pages: write
15-
id-token: write
1614

1715
concurrency:
1816
group: "pages"
1917
cancel-in-progress: false
2018

2119
jobs:
2220
deploy:
21+
permissions:
22+
pages: write
23+
id-token: write
2324
environment:
2425
name: github-pages
2526
url: ${{ steps.deployment.outputs.page_url }}

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ on:
1010
- 'v*.*'
1111
- 'v*.*.*'
1212

13-
# Sets permissions of the GITHUB_TOKEN to checkout the repository
14-
permissions:
15-
contents: write
16-
pull-requests: write
17-
id-token: write
18-
attestations: write
13+
permissions: {}
1914

2015
env:
2116
WEB_EXT_VERS: 8.2.0
2217

2318
jobs:
2419
release-extension:
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
id-token: write
24+
attestations: write
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: checkout repository

0 commit comments

Comments
 (0)