1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 09:29:49 +02:00

GitHub Workflows security hardening (#5138)

* build: harden comment.yml permissions

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

* build: harden ci.yml permissions

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

* build: harden release.yml permissions

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

Signed-off-by: Alex <aleksandrosansan@gmail.com>
This commit is contained in:
Alex
2022-10-03 18:17:04 +03:00
committed by GitHub
parent 347865cafc
commit 8c32d26bfc
3 changed files with 20 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ on:
- push
- pull_request
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
ci:
name: ${{ matrix.command }}

View File

@@ -6,8 +6,16 @@ on:
types:
- created
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: read # to get info about PR (cirrus-actions/rebase)
jobs:
rebase:
permissions:
contents: write # to push code to rebase (cirrus-actions/rebase)
pull-requests: read # to get info about PR (cirrus-actions/rebase)
name: rebase
runs-on: ubuntu-latest
if: |
@@ -25,6 +33,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release_next:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)
name: release:next
runs-on: ubuntu-latest
if: |

View File

@@ -5,8 +5,13 @@ on:
branches:
- main
permissions: {}
jobs:
release:
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: ${{ matrix.channel }}
runs-on: ubuntu-latest
strategy: