Skip to content

Commit 29ca7df

Browse files
authored
chore(ci): add explicit least-privilege workflow permissions (#3082)
1 parent 09de790 commit 29ca7df

File tree

10 files changed

+33
-0
lines changed

10 files changed

+33
-0
lines changed

.github/workflows/check-md-link.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ on:
3232
- 'mkdocs/**'
3333
workflow_dispatch:
3434

35+
permissions:
36+
contents: read
37+
3538
jobs:
3639
markdown-link-check:
3740
runs-on: ubuntu-latest

.github/workflows/codeql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ on:
2727
schedule:
2828
- cron: '16 4 * * 1'
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
analyze:
3235
name: Analyze Actions
3336
runs-on: ubuntu-latest
3437
permissions:
38+
contents: read
3539
security-events: write
3640
packages: read
3741

.github/workflows/license_check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
name: "Run License Check"
2121
on: pull_request
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
2427
rat:
2528
runs-on: ubuntu-latest

.github/workflows/nightly-pypi-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ on:
2424
- cron: "0 0 * * *" # Runs at midnight UTC every day
2525
workflow_dispatch: # Allows manual triggering
2626

27+
permissions:
28+
contents: read
29+
2730
jobs:
2831
set-version:
2932
if: github.repository == 'apache/iceberg-python' # Only run for apache repo

.github/workflows/pypi-build-artifacts.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
required: true
2727
type: string
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
pypi-build-artifacts:
3134
name: Build artifacts for PyPi on ${{ matrix.os }}

.github/workflows/python-ci-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
- 'main'
2626
pull_request:
2727

28+
permissions:
29+
contents: read
30+
2831

2932
concurrency:
3033
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/python-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ on:
3838
- '!LICENSE'
3939
- '!NOTICE'
4040

41+
permissions:
42+
contents: read
43+
4144
concurrency:
4245
group: ${{ github.workflow }}-${{ github.ref }}
4346
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

.github/workflows/python-release-docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ name: "Release Docs"
2121
on:
2222
workflow_dispatch:
2323

24+
permissions:
25+
contents: read
26+
2427
concurrency:
2528
group: ${{ github.workflow }}-${{ github.ref }}
2629
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2730

2831
jobs:
2932
docs:
3033
runs-on: ubuntu-latest
34+
permissions:
35+
contents: write
3136

3237
steps:
3338
- uses: actions/checkout@v6

.github/workflows/python-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ on:
3636
type: number
3737
required: true
3838

39+
permissions:
40+
contents: read
41+
3942
jobs:
4043
validate-inputs:
4144
runs-on: ubuntu-latest

.github/workflows/svn-build-artifacts.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
required: true
2727
type: string
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
svn-build-artifacts:
3134
name: Build artifacts for SVN on ${{ matrix.os }}

0 commit comments

Comments
 (0)