Skip to content

Commit 267d63c

Browse files
Specify permissons in GH Action workflows
This would improve OpenSSF Scorecard value for dpctl
1 parent 114b2b1 commit 267d63c

7 files changed

+19
-0
lines changed

.github/workflows/conda-package.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- master
77
pull_request:
88

9+
permissions: read-all
10+
911
env:
1012
PACKAGE_NAME: dpctl
1113
MODULE_NAME: dpctl

.github/workflows/cpp_style_checks.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
push:
1010
branches: [master]
1111

12+
permissions: read-all
13+
1214
jobs:
1315
formatting-check:
1416
name: clang-format

.github/workflows/generate-coverage.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
push:
55
branches: [master]
66

7+
permissions: read-all
8+
79
jobs:
810
generate-coverage:
911
name: Generate coverage and push to Coveralls.io
1012
runs-on: ubuntu-20.04
13+
permissions:
14+
pull-requests: write
1115

1216
env:
1317
ONEAPI_ROOT: /opt/intel/oneapi

.github/workflows/generate-docs.yml

+5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ on:
66
pull_request:
77
types: [opened, synchronize, reopened, closed]
88

9+
permissions: read-all
10+
911
jobs:
1012
build-and-deploy:
1113
name: Build and Deploy Documentation
1214
runs-on: ubuntu-20.04
15+
permissions:
16+
contents: write
17+
pull-requests: write
1318
steps:
1419
- name: Cancel Previous Runs
1520
uses: styfle/[email protected]

.github/workflows/os-llvm-sycl-build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches: [master]
66

7+
permissions: read-all
8+
79
jobs:
810
install-compiler:
911
name: Build with nightly build of DPC++ toolchain

.github/workflows/pre-commit.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches: [master]
77

8+
permissons: read-all
9+
810
jobs:
911
pre-commit:
1012
runs-on: ubuntu-20.04

.github/workflows/python_style_checks.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
push:
1010
branches: [master]
1111

12+
permissions: read-all
13+
1214
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1315
jobs:
1416
# The isort job sorts all imports in .py, .pyx, .pxd files

0 commit comments

Comments
 (0)