Skip to content

Commit 75ee03e

Browse files
authored
ci: Set explict top-level permissions for GHA (#198)
1 parent 830af54 commit 75ee03e

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches: [main]
66

7+
permissions: read-all
8+
79
jobs:
810
metadata:
911
name: Check if version changed
@@ -137,6 +139,8 @@ jobs:
137139
needs: [metadata, build, provenance]
138140
if: needs.metadata.outputs.release == 'true'
139141
runs-on: ubuntu-latest
142+
permissions:
143+
contents: write
140144
steps:
141145
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
142146
- name: Download artifacts

.github/workflows/chore.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: true
1010

11+
permissions: read-all
12+
1113
jobs:
1214
check-pr-title:
1315
name: Check PR Title

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}
1010
cancel-in-progress: true
1111

12+
permissions: read-all
13+
1214
jobs:
1315
pre-commit-checks:
1416
name: Pre-commit Checks

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
schedule:
1111
- cron: "16 22 * * 5"
1212

13+
permissions: read-all
14+
1315
jobs:
1416
analyze:
1517
name: Analyze (${{ matrix.language }})

0 commit comments

Comments
 (0)