Skip to content

Commit 43ae338

Browse files
committed
Fix Token-Permissions OpenSSF remarks
1 parent 6663f0a commit 43ae338

File tree

9 files changed

+49
-0
lines changed

9 files changed

+49
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: '0 0 * * *'
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
analyze:
1013
name: Analyze

.github/workflows/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: "Label PRs"
33
on:
44
- pull_request_target
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
label-pull-requests:
811
runs-on: ubuntu-24.04

.github/workflows/mac.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
on:
22
workflow_call:
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
clang-build:
69
runs-on: macOS-latest

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- cron: '0 0 * * *'
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1316
cancel-in-progress: >-
@@ -18,10 +21,16 @@ concurrency:
1821
jobs:
1922
pre-commit:
2023
uses: ./.github/workflows/pre-commit.yml
24+
permissions:
25+
contents: read
26+
packages: read
2127
ubuntu:
2228
needs:
2329
- pre-commit
2430
uses: ./.github/workflows/ubuntu.yml
31+
permissions:
32+
contents: read
33+
packages: read
2534
mac:
2635
needs:
2736
- pre-commit
@@ -36,8 +45,15 @@ jobs:
3645
- mac
3746
- windows
3847
uses: ./.github/workflows/perf.yml
48+
permissions:
49+
contents: read
50+
packages: read
3951

4052
pages:
4153
needs:
4254
- perf
4355
uses: ./.github/workflows/pages.yml
56+
permissions:
57+
contents: read
58+
pages: write
59+
id-token: write

.github/workflows/perf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
on:
22
workflow_call:
33

4+
permissions:
5+
contents: read
6+
packages: read
7+
48
jobs:
59
ubuntu-gcc-build-perf-stats:
610
runs-on: ubuntu-24.04

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
pull_request:
66
workflow_call:
77

8+
permissions:
9+
contents: read
10+
packages: read
11+
812
jobs:
913
pre-commit:
1014
runs-on: ubuntu-24.04

.github/workflows/static-analysis-pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ concurrency:
1919
github.event_name != 'merge_group' &&
2020
!startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
2121
22+
permissions:
23+
contents: read
24+
packages: read
25+
2226
jobs:
2327
clang-tidy:
2428
runs-on: ubuntu-24.04

.github/workflows/ubuntu.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
on:
22
workflow_call:
33

4+
permissions:
5+
contents: read
6+
packages: read
7+
48
jobs:
59
gcc-build:
610
runs-on: ${{ matrix.os }}
@@ -330,6 +334,11 @@ jobs:
330334
- gcc-test-extended
331335
- clang-test-extended
332336
runs-on: ubuntu-24.04
337+
permissions:
338+
contents: read
339+
packages: read
340+
issues: write
341+
pull-requests: write
333342
container:
334343
image: ghcr.io/learning-process/ppc-ubuntu:1.1
335344
credentials:

.github/workflows/windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
on:
22
workflow_call:
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
msvc-build:
69
runs-on: windows-latest

0 commit comments

Comments
 (0)