mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 01:50:06 +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:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -4,6 +4,9 @@ on:
|
|||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
name: ${{ matrix.command }}
|
name: ${{ matrix.command }}
|
||||||
|
12
.github/workflows/comment.yml
vendored
12
.github/workflows/comment.yml
vendored
@@ -6,8 +6,16 @@ on:
|
|||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
pull-requests: read # to get info about PR (cirrus-actions/rebase)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebase:
|
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
|
name: rebase
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
@@ -25,6 +33,10 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release_next:
|
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
|
name: release:next
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -5,8 +5,13 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
permissions:
|
||||||
|
contents: write # to create release (changesets/action)
|
||||||
|
pull-requests: write # to create pull request (changesets/action)
|
||||||
|
|
||||||
name: ${{ matrix.channel }}
|
name: ${{ matrix.channel }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
Reference in New Issue
Block a user