Skip to content

Commit

Permalink
Add explicit permissions to GitHub workflows (#2899)
Browse files Browse the repository at this point in the history
* build: harden release.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden main.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>

* Update .github/workflows/release.yml

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
  • Loading branch information
sashashura and Andarist committed Dec 1, 2022
1 parent 92be52d commit acb72a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Expand Up @@ -6,6 +6,9 @@ on:
- main
pull_request:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
test:
name: 'Tests on ${{matrix.platform}}'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -8,8 +8,14 @@ on:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions: {}
jobs:
release:
permissions:
contents: write # to create release
issues: write # to post issue comments
pull-requests: write # to create pull request

name: Release
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit acb72a4

Please sign in to comment.