Skip to content

Commit c43512a

Browse files
authored
GitHub Workflows security hardening (#1162)
1 parent 801ad37 commit c43512a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/validate.yml

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- 'alpha'
1313
- '!all-contributors/**'
1414
pull_request: {}
15+
permissions:
16+
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
17+
contents: read # to fetch code (actions/checkout)
18+
1519
jobs:
1620
main:
1721
continue-on-error: ${{ matrix.react != 'latest' }}
@@ -58,6 +62,10 @@ jobs:
5862
flags: ${{ matrix.react }}
5963

6064
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+
6169
needs: main
6270
runs-on: ubuntu-latest
6371
if:

0 commit comments

Comments
 (0)