Skip to content

Commit bf93fbd

Browse files
authored
[CI] Fix bad OSSF recomendations (#13187)
the OSSF tool sucks and don't use its recommended default settings. It suggested permissions content:read as default, but that broke most of our workflows, instead use the GitHub recommended permissions: read-all
1 parent a1c1e04 commit bf93fbd

13 files changed

+13
-26
lines changed

.github/workflows/sycl-docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ on:
1111
- 'clang/docs/**'
1212
- 'sycl/doc/**'
1313

14-
permissions:
15-
contents: read
14+
permissions: read-all
1615

1716
jobs:
1817
build:

.github/workflows/sycl-linux-build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ on:
103103
options:
104104
- 3
105105

106-
permissions:
107-
contents: read
106+
permissions: read-all
108107

109108
jobs:
110109
build:

.github/workflows/sycl-linux-matrix-e2e-on-nightly.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ on:
1010
Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
1111
default: '{"LIT_FILTER":""}'
1212

13-
permissions:
14-
contents: read
13+
permissions: read-all
1514

1615
jobs:
1716
linux_e2e_on_nightly:

.github/workflows/sycl-linux-precommit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ concurrency:
2929
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3030
cancel-in-progress: true
3131

32-
permissions:
33-
contents: read
32+
permissions: read-all
3433

3534
jobs:
3635
detect_changes:

.github/workflows/sycl-macos-build-and-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ on:
1919
required: false
2020
default: ""
2121

22-
permissions:
23-
contents: read
22+
permissions: read-all
2423

2524
jobs:
2625
build:

.github/workflows/sycl-nightly.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
schedule:
66
- cron: '0 3 * * *'
77

8-
permissions:
9-
contents: read
8+
permissions: read-all
109

1110
jobs:
1211
ubuntu2204_build:

.github/workflows/sycl-post-commit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ on:
1919
- ./devops/actions/cleanup
2020
- ./devops/actions/cached_checkout
2121

22-
permissions:
23-
contents: read
22+
permissions: read-all
2423

2524
jobs:
2625
build-lin:

.github/workflows/sycl-stale-issues.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ on:
44
schedule:
55
- cron: '30 1 * * *'
66

7-
permissions:
8-
contents: read
7+
permissions: read-all
98

109
jobs:
1110
close-issues:

.github/workflows/sycl-sync-main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: main branch sync
33
on:
44
workflow_dispatch:
55

6-
permissions:
7-
contents: read
6+
permissions: read-all
87

98
jobs:
109
sync:

.github/workflows/sycl-update-gpu-driver.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
- cron: '0 3 * * 2'
66
workflow_dispatch:
77

8-
permissions:
9-
contents: read
8+
permissions: read-all
109

1110
jobs:
1211
update_driver_linux:

.github/workflows/sycl-windows-build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ on:
5050
type: choice
5151
options:
5252
- 3
53-
permissions:
54-
contents: read
53+
permissions: read-all
5554

5655
jobs:
5756
build:

.github/workflows/sycl-windows-precommit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ on:
2323
- 'devops/containers/**'
2424
- 'devops/actions/build_container/**'
2525

26-
permissions:
27-
contents: read
26+
permissions: read-all
2827

2928
concurrency:
3029
# Cancel a currently running workflow from the same PR, branch or tag.

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ on:
3333
default: '{}'
3434
required: False
3535

36-
permissions:
37-
contents: read
36+
permissions: read-all
3837

3938
jobs:
4039
run:

0 commit comments

Comments
 (0)