Skip to content

Commit 914b66f

Browse files
committed
Update workflow permissions for finer-grained access
Refined permissions in release.yml: set top-level to read-only, granted build job read access to contents/packages, and release job write access to contents. Enhances security and clarity. #35
1 parent ac0c248 commit 914b66f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ on:
1414
default: false
1515

1616
permissions:
17-
contents: write
18-
packages: read
17+
contents: read
1918

2019
jobs:
2120
validate:
@@ -32,6 +31,9 @@ jobs:
3231
3332
build:
3433
needs: validate
34+
permissions:
35+
contents: read
36+
packages: read
3537
strategy:
3638
matrix:
3739
include:
@@ -107,6 +109,8 @@ jobs:
107109
runs-on: ubuntu-latest
108110
needs: build
109111
if: github.ref == 'refs/heads/main'
112+
permissions:
113+
contents: write
110114
env:
111115
ARTIFACT_DIR: ./release
112116
steps:

0 commit comments

Comments
 (0)