Skip to content

Commit

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

Signed-off-by: Alex <[email protected]>

* build: harden contrib.yml permissions

Signed-off-by: Alex <[email protected]>

* build: harden tests.yml permissions

Signed-off-by: Alex <[email protected]>
  • Loading branch information
sashashura authored Dec 1, 2022
1 parent 5d436ba commit c3020e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: contrib-${{ github.ref }}
cancel-in-progress: true

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

jobs:
stable:
# Check each OS, all supported Python, minimum versions and latest releases
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

permissions: {}
jobs:
build:
permissions:
contents: read # to fetch code (actions/checkout)

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -80,6 +84,9 @@ jobs:

stable:
# Check each OS, all supported Python, minimum versions and latest releases
permissions:
contents: read # to fetch code (actions/checkout)

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ concurrency:
group: tutorials-${{ github.ref }}
cancel-in-progress: true

permissions: {}
jobs:
tutorial:
runs-on: ubuntu-latest
Expand Down

0 comments on commit c3020e2

Please sign in to comment.