Skip to content

Commit

Permalink
Merge pull request #938 from pnacht/token-permissions
Browse files Browse the repository at this point in the history
Set minimal permissions for GitHub workflows
  • Loading branch information
taku910 committed Dec 23, 2023
2 parents a5262b5 + 3ced0ec commit b937146
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CIFuzz
on: [pull_request]

permissions:
contents: read

jobs:
Fuzzing:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
build:
strategy:
Expand All @@ -19,6 +22,9 @@ jobs:
arch: x86
runs-on: ${{ matrix.os }}

permissions:
contents: write # svenstaro/upload-release-action

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cross_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
build_wheels:
outputs:
Expand All @@ -20,6 +23,9 @@ jobs:
runs-on: ${{ matrix.os }}
name: Build wheels on ${{ matrix.os }}

permissions:
contents: write # svenstaro/upload-release-action

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
Expand Down Expand Up @@ -53,7 +59,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python -m pip install cibuildwheel==2.12.0
python -m pip install cibuildwheel==2.16.2
- name: Build wheels
working-directory: ${{github.workspace}}/python
Expand Down

0 comments on commit b937146

Please sign in to comment.