Skip to content

Commit acedf31

Browse files
sashashuraeps1lon
andauthored
GitHub Workflows security hardening (#1193)
* build: harden validate.yml permissions Signed-off-by: Alex <[email protected]> * Update validate.yml Signed-off-by: Alex <[email protected]> Co-authored-by: Sebastian Silbermann <[email protected]>
1 parent fe12e5b commit acedf31

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/validate.yml

+10
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ on:
1212
- 'alpha'
1313
- '!all-contributors/**'
1414
pull_request: {}
15+
16+
permissions: {}
17+
1518
jobs:
1619
main:
20+
permissions:
21+
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
22+
contents: read # to fetch code (actions/checkout)
1723
# ignore all-contributors PRs
1824
if: ${{ !contains(github.head_ref, 'all-contributors') }}
1925
strategy:
@@ -56,6 +62,10 @@ jobs:
5662
flags: node-${{ matrix.node }}
5763

5864
release:
65+
permissions:
66+
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
67+
contents: write # to create release tags (cycjimmy/semantic-release-action)
68+
5969
needs: main
6070
runs-on: ubuntu-latest
6171
if:

0 commit comments

Comments
 (0)