Skip to content

Commit e700605

Browse files
committed
build: harden validate.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
1 parent edffb7c commit e700605

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/validate.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
- 'alpha'
1313
- '!all-contributors/**'
1414
pull_request: {}
15+
16+
permissions:
17+
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
18+
contents: read # to fetch code (actions/checkout)
19+
1520
jobs:
1621
main:
1722
# ignore all-contributors PRs
@@ -56,6 +61,10 @@ jobs:
5661
flags: node-${{ matrix.node }}
5762

5863
release:
64+
permissions:
65+
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
66+
contents: write # to create release tags (cycjimmy/semantic-release-action)
67+
5968
needs: main
6069
runs-on: ubuntu-latest
6170
if:

0 commit comments

Comments
 (0)