Skip to content

Commit

Permalink
Specify permissons in GH Action workflows
Browse files Browse the repository at this point in the history
This would improve OpenSSF Scorecard value for dpctl
  • Loading branch information
oleksandr-pavlyk committed Jan 23, 2024
1 parent 114b2b1 commit e8a15dc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- master
pull_request:

permissions: read-all

env:
PACKAGE_NAME: dpctl
MODULE_NAME: dpctl
Expand Down Expand Up @@ -539,6 +541,8 @@ jobs:
array-api-conformity:
needs: build_linux
runs-on: ${{ matrix.runner }}
permissions:
pull-requests: write

strategy:
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cpp_style_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
push:
branches: [master]

permissions: read-all

jobs:
formatting-check:
name: clang-format
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/generate-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ on:
push:
branches: [master]

permissions: read-all

jobs:
generate-coverage:
name: Generate coverage and push to Coveralls.io
runs-on: ubuntu-20.04
permissions:
pull-requests: write

env:
ONEAPI_ROOT: /opt/intel/oneapi
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
pull_request:
types: [opened, synchronize, reopened, closed]

permissions: read-all

jobs:
build-and-deploy:
name: Build and Deploy Documentation
runs-on: ubuntu-20.04
permissions:
contents: write
pull-requests: write
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/os-llvm-sycl-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: [master]

permissions: read-all

jobs:
install-compiler:
name: Build with nightly build of DPC++ toolchain
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches: [master]

permissions: read-all

jobs:
pre-commit:
runs-on: ubuntu-20.04
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python_style_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
push:
branches: [master]

permissions: read-all

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# The isort job sorts all imports in .py, .pyx, .pxd files
Expand Down

0 comments on commit e8a15dc

Please sign in to comment.