Skip to content

Commit

Permalink
GitHub Workflows security hardening (#1193)
Browse files Browse the repository at this point in the history
* build: harden validate.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* Update validate.yml

Signed-off-by: Alex <aleksandrosansan@gmail.com>
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
  • Loading branch information
sashashura and eps1lon committed Dec 23, 2022
1 parent fe12e5b commit acedf31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/validate.yml
Expand Up @@ -12,8 +12,14 @@ on:
- 'alpha'
- '!all-contributors/**'
pull_request: {}

permissions: {}

jobs:
main:
permissions:
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
contents: read # to fetch code (actions/checkout)
# ignore all-contributors PRs
if: ${{ !contains(github.head_ref, 'all-contributors') }}
strategy:
Expand Down Expand Up @@ -56,6 +62,10 @@ jobs:
flags: node-${{ matrix.node }}

release:
permissions:
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
contents: write # to create release tags (cycjimmy/semantic-release-action)

needs: main
runs-on: ubuntu-latest
if:
Expand Down

0 comments on commit acedf31

Please sign in to comment.