Skip to content

Commit

Permalink
[CI] Fix bad OSSF recomendations (#13187)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stdale-intel authored Mar 28, 2024
1 parent a1c1e04 commit bf93fbd
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/sycl-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ on:
- 'clang/docs/**'
- 'sycl/doc/**'

permissions:
contents: read
permissions: read-all

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ on:
options:
- 3

permissions:
contents: read
permissions: read-all

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-linux-matrix-e2e-on-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:
Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
default: '{"LIT_FILTER":""}'

permissions:
contents: read
permissions: read-all

jobs:
linux_e2e_on_nightly:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
detect_changes:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-macos-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ on:
required: false
default: ""

permissions:
contents: read
permissions: read-all

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
schedule:
- cron: '0 3 * * *'

permissions:
contents: read
permissions: read-all

jobs:
ubuntu2204_build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-post-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ on:
- ./devops/actions/cleanup
- ./devops/actions/cached_checkout

permissions:
contents: read
permissions: read-all

jobs:
build-lin:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
schedule:
- cron: '30 1 * * *'

permissions:
contents: read
permissions: read-all

jobs:
close-issues:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-sync-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: main branch sync
on:
workflow_dispatch:

permissions:
contents: read
permissions: read-all

jobs:
sync:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-update-gpu-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
- cron: '0 3 * * 2'
workflow_dispatch:

permissions:
contents: read
permissions: read-all

jobs:
update_driver_linux:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ on:
type: choice
options:
- 3
permissions:
contents: read
permissions: read-all

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-windows-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ on:
- 'devops/containers/**'
- 'devops/actions/build_container/**'

permissions:
contents: read
permissions: read-all

concurrency:
# Cancel a currently running workflow from the same PR, branch or tag.
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ on:
default: '{}'
required: False

permissions:
contents: read
permissions: read-all

jobs:
run:
Expand Down

0 comments on commit bf93fbd

Please sign in to comment.